Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-13 Thread Outback Dingo
Commited SVN rev. 22627.

dingo * r22627 /packages/net/wing/ (10 files in 6 dirs):
[PATCHTEAM] - WING Wireless Mesh Routing Protocol
Signed-off-by: Roberto Riggio roberto.rig...@create-net.org

On Wed, Aug 11, 2010 at 5:55 AM, Roberto Riggio 
roberto.rig...@create-net.org wrote:

 Hi,

 this patch adds support for WING a new routing protocol for wireless
 mesh networks. WING is an extension of the Roofnet routing protocol
 developed by MIT. The new features are: support for multiple radio
 interfaces, and link quality based routing using the WCETT metric.

 The source code is hosted at github.

 Upon install, this package will create a new entry in the network section:

 config 'interface' 'mesh'
option 'proto' 'wing'
option 'profile' 'bulk'
option 'rc' 'static'
option 'ls' 'fcfs'
option 'metric' 'wcett'
option 'prefix' '6'
option 'period' '36000'
option 'tau' '36'
option 'debug' 'true'

 The only mandatory field is proto. After running ifup mesh a new
 interface
 will be created. This interface is called wing-$(ifname) and uses
 multi-hopping.

 Here follows a short description for the other parameters:

 profile, profile to be used for building the configuration for the click
 router (at the moment only one profile is defined)

 rc, rate control algorithm (static, madwifi, autoratefallback)

 ls, outgoing link scheduling policy (fcfs, drr)

 metric, routing metric (etx, ett, wcett)

 period, tau, averaging period for network probes, smoothing window

 Signed-off-by: Roberto Riggio roberto.rig...@create-net.org

 --

 Index: net/wing/files/lib/network/wing.sh
 ===
 --- net/wing/files/lib/network/wing.sh  (revision 0)
 +++ net/wing/files/lib/network/wing.sh  (revision 0)
 @@ -0,0 +1,145 @@
 +
 +scan_wing() {
 +   config_set $1 device wing-$1
 +}
 +
 +coldplug_interface_wing() {
 +setup_interface_wing wing-$1 $1
 +}
 +
 +stop_interface_wing() {
 +   local config=$1
 +   local iface=wing-$config
 +   env -i ACTION=ifdown INTERFACE=$config DEVICE=$iface
 PROTO=wing /sbin/hotplug-call iface
 +   [ -f /var/run/$iface.pid ]  {
 +   kill -9 $(cat /var/run/$iface.pid)
 +   rm /var/run/$iface.pid
 +   }
 +}
 +
 +setup_interface_wing() {
 +
 +local iface=$1
 +local config=$2
 +
 +   local hwmodes=
 +   local freqs=
 +   local ifnames=
 +   local hwaddrs=
 +
 +   config_load wireless
 +   config_foreach wing_list_interfaces wifi-iface
 +
 +   # start click router
 +   if [ $hwmodes =  -o $freqs =  -o $ifnames =  -o
 $hwaddrs =  ]; then
 +   logger -t $config No raw interfaces available. Exiting.
 +   exit 1
 +   fi
 +
 +   local profile rc ls prefix debug
 +
 +   config_get profile $config profile bulk
 +   config_get rc $config rc static
 +   config_get ls $config ls fcfs
 +   config_get metric $config metric wcett
 +   config_get prefix $config prefix 6
 +   config_get period $config period 1
 +   config_get tau $config tau 10
 +   config_get_bool debug $config debug False
 +
 +   local hwaddr=$(echo $hwaddrs | sed 's/ .*//');
 +   local ipaddr=$(printf $prefix.%d.%d.%d $(echo $hwaddr | awk -F:
 '{printf 0x%s 0x%s 0x%s,$4,$5,$6}'))
 +   local netmask=255.0.0.0
 +
 +   if ! wing_template_available profile $profile bulk; then
 +   logger -t $config Unable to configure router. Exiting.
 +   exit 1
 +   fi
 +
 +   if ! wing_template_available rc $rc static; then
 +   logger -t $config Unable to configure rate control.
 Exiting.
 +   exit 1
 +   fi
 +
 +   if ! wing_template_available ls $ls radiotap; then
 +   logger -t $config Unable to configure link scheduler.
 Exiting.
 +   exit 1
 +   fi
 +
 +   if [ $profile =  -o $rc =  ]; then
 +   logger -t $config Unable to generate template. Exiting.
 +   exit 1
 +   fi
 +
 +   [ $debug == 0 ]  dbg= || dbg=-d
 +
 +   /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \
 +   -m $hwmodes -c $freqs -n $ifnames -a $hwaddrs $dbg
 \
 +   | sed -e s/__XR_IFNAME__/$iface/g \
 +   | sed -e s/__XR_IP__/$ipaddr/g \
 +   | sed -e s/__XR_NM__/$netmask/g \
 +   | sed -e s/__XR_PERIOD__/$period/g \
 +   | sed -e s/__XR_TAU__/$tau/g  /tmp/$iface.click
 +
 +   /usr/bin/click-align /tmp/$iface.click  /tmp/$iface-aligned.click
 2/var/log/$iface.log
 +   [ ! -c /dev/net/tun ]  {
 +   mkdir -p /dev/net/
 +   mknod /dev/net/tun c 10 200
 +   if [ ! -c /dev/net/tun ]; then
 +   logger -t $config Device not available
 (/dev/net/tun). Exiting.
 +   exit 1
 +   fi
 +   }
 +
 +   # creating the tun 

Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-12 Thread Xianghua Xiao
which mode will this routing protocol running on top of, is it mesh
mode, adhoc/ibss, or monitoring mode? does it work with 11n/HT(as the
website mentions MIMO)?

I recall meraki somehow is using monitoring mode for its mesh algorithm.

xxiao

On Wed, Aug 11, 2010 at 7:03 AM, Roberto Riggio
roberto.rig...@create-net.org wrote:
 The official website is

 http://www.wing-project.org

 The website contains several info about the routing protocol. An extended
 description of the wing package for openwrt can be found here:

 http://wing-project.org/openwrt:wing

 I've developed most of the code for the routing protocol and for
 the integration with openwrt, so i can probably answer to your
 questions.

 R.

 On 08/11/2010 01:37 PM, L. Aaron Kaplan wrote:

 is there any docu on WING?


 On Aug 11, 2010, at 11:55 AM, Roberto Riggio wrote:



 Hi,

 this patch adds support for WING a new routing protocol for wireless
 mesh networks. WING is an extension of the Roofnet routing protocol
 developed by MIT. The new features are: support for multiple radio
 interfaces, and link quality based routing using the WCETT metric.

 The source code is hosted at github.

 Upon install, this package will create a new entry in the network section:

 config 'interface' 'mesh'
option 'proto' 'wing'
option 'profile' 'bulk'
option 'rc' 'static'
option 'ls' 'fcfs'
option 'metric' 'wcett'
option 'prefix' '6'
option 'period' '36000'
option 'tau' '36'
option 'debug' 'true'

 The only mandatory field is proto. After running ifup mesh a new interface
 will be created. This interface is called wing-$(ifname) and uses
 multi-hopping.

 Here follows a short description for the other parameters:

 profile, profile to be used for building the configuration for the click
 router (at the moment only one profile is defined)

 rc, rate control algorithm (static, madwifi, autoratefallback)

 ls, outgoing link scheduling policy (fcfs, drr)

 metric, routing metric (etx, ett, wcett)

 period, tau, averaging period for network probes, smoothing window

 Signed-off-by: Roberto Riggio roberto.rig...@create-net.org

 --

 Index: net/wing/files/lib/network/wing.sh
 ===
 --- net/wing/files/lib/network/wing.sh(revision 0)
 +++ net/wing/files/lib/network/wing.sh(revision 0)
 @@ -0,0 +1,145 @@
 +
 +scan_wing() {
 + config_set $1 device wing-$1
 +}
 +
 +coldplug_interface_wing() {
 +setup_interface_wing wing-$1 $1
 +}
 +
 +stop_interface_wing() {
 + local config=$1
 + local iface=wing-$config
 + env -i ACTION=ifdown INTERFACE=$config DEVICE=$iface PROTO=wing
 /sbin/hotplug-call iface
 + [ -f /var/run/$iface.pid ]  {
 + kill -9 $(cat /var/run/$iface.pid)
 + rm /var/run/$iface.pid
 + }
 +}
 +
 +setup_interface_wing() {
 +
 +local iface=$1
 +local config=$2
 +
 + local hwmodes=
 + local freqs=
 + local ifnames=
 + local hwaddrs=
 +
 + config_load wireless
 + config_foreach wing_list_interfaces wifi-iface
 + 
 + # start click router
 + if [ $hwmodes =  -o $freqs =  -o $ifnames =  -o $hwaddrs =
  ]; then
 + logger -t $config No raw interfaces available. Exiting.
 + exit 1
 + fi
 +
 + local profile rc ls prefix debug
 +
 + config_get profile $config profile bulk
 + config_get rc $config rc static
 + config_get ls $config ls fcfs
 + config_get metric $config metric wcett
 + config_get prefix $config prefix 6
 + config_get period $config period 1
 + config_get tau $config tau 10
 + config_get_bool debug $config debug False
 +
 + local hwaddr=$(echo $hwaddrs | sed 's/ .*//');
 + local ipaddr=$(printf $prefix.%d.%d.%d $(echo $hwaddr | awk -F: 
 '{printf
 0x%s 0x%s 0x%s,$4,$5,$6}'))
 + local netmask=255.0.0.0
 +
 + if ! wing_template_available profile $profile bulk; then
 + logger -t $config Unable to configure router. Exiting.
 + exit 1
 + fi
 +
 + if ! wing_template_available rc $rc static; then
 + logger -t $config Unable to configure rate control. Exiting.
 + exit 1
 + fi
 +
 + if ! wing_template_available ls $ls radiotap; then
 + logger -t $config Unable to configure link scheduler. 
 Exiting.
 + exit 1
 + fi
 +
 + if [ $profile =  -o $rc =  ]; then
 + logger -t $config Unable to generate template. Exiting.
 + exit 1
 + fi
 +
 + [ $debug == 0 ]  dbg= || dbg=-d
 +
 + /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \
 + -m $hwmodes -c $freqs -n $ifnames -a $hwaddrs $dbg \
 + | sed -e s/__XR_IFNAME__/$iface/g \
 + | sed -e s/__XR_IP__/$ipaddr/g \
 + | sed -e s/__XR_NM__/$netmask/g \
 + | sed -e s/__XR_PERIOD__/$period/g \
 + | sed -e 

Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-12 Thread Benjamin Henrion
On Thu, Aug 12, 2010 at 1:54 PM, Xianghua Xiao xiaoxiang...@gmail.com wrote:
 which mode will this routing protocol running on top of, is it mesh
 mode, adhoc/ibss, or monitoring mode? does it work with 11n/HT(as the
 website mentions MIMO)?

 I recall meraki somehow is using monitoring mode for its mesh algorithm.

It seems to use some ad-hoc mode forged on top of monitor.

-- 
Benjamin Henrion bhenrion at ffii.org
FFII Brussels - +32-484-566109 - +32-2-4148403
In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-12 Thread Roberto Riggio

On 08/12/2010 01:54 PM, Xianghua Xiao wrote:

which mode will this routing protocol running on top of, is it mesh
mode, adhoc/ibss, or monitoring mode? does it work with 11n/HT(as the
website mentions MIMO)?
   

The routing protocols runs on top of interface operating in monitor
mode and supporting frame injection.


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-12 Thread Benjamin Henrion
On Thu, Aug 12, 2010 at 2:15 PM, Roberto Riggio
roberto.rig...@create-net.org wrote:
 On 08/12/2010 01:54 PM, Xianghua Xiao wrote:

 which mode will this routing protocol running on top of, is it mesh
 mode, adhoc/ibss, or monitoring mode? does it work with 11n/HT(as the
 website mentions MIMO)?


 The routing protocols runs on top of interface operating in monitor
 mode and supporting frame injection.

Does it uses adhoc on top of monitor?

Or it uses a custom mode?

-- 
Benjamin Henrion bhenrion at ffii.org
FFII Brussels - +32-484-566109 - +32-2-4148403
In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-12 Thread Roberto Riggio

On 08/12/2010 02:19 PM, Benjamin Henrion wrote:


Does it uses adhoc on top of monitor?

Or it uses a custom mode?

   

It is a custom mode built on top of the monitor mode.

Basically the router creates raw ieee80211 frames
and inject them using radiotap headers.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-12 Thread Roberto Riggio

On 08/12/2010 02:15 PM, Roberto Riggio wrote:

On 08/12/2010 01:54 PM, Xianghua Xiao wrote:

which mode will this routing protocol running on top of, is it mesh
mode, adhoc/ibss, or monitoring mode? does it work with 11n/HT(as the
website mentions MIMO)?

I'm currently trying to integrate some patches posted on linux wireless to
add support for MCS selection

R.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-11 Thread Roberto Riggio

Hi,

this patch adds support for WING a new routing protocol for wireless
mesh networks. WING is an extension of the Roofnet routing protocol
developed by MIT. The new features are: support for multiple radio
interfaces, and link quality based routing using the WCETT metric.

The source code is hosted at github.

Upon install, this package will create a new entry in the network section:

config 'interface' 'mesh'
option 'proto' 'wing'
option 'profile' 'bulk'
option 'rc' 'static'
option 'ls' 'fcfs'
option 'metric' 'wcett'
option 'prefix' '6'
option 'period' '36000'
option 'tau' '36'
option 'debug' 'true'

The only mandatory field is proto. After running ifup mesh a new interface
will be created. This interface is called wing-$(ifname) and uses 
multi-hopping.


Here follows a short description for the other parameters:

profile, profile to be used for building the configuration for the click
router (at the moment only one profile is defined)

rc, rate control algorithm (static, madwifi, autoratefallback)

ls, outgoing link scheduling policy (fcfs, drr)

metric, routing metric (etx, ett, wcett)

period, tau, averaging period for network probes, smoothing window

Signed-off-by: Roberto Riggio roberto.rig...@create-net.org

--

Index: net/wing/files/lib/network/wing.sh
===
--- net/wing/files/lib/network/wing.sh  (revision 0)
+++ net/wing/files/lib/network/wing.sh  (revision 0)
@@ -0,0 +1,145 @@
+
+scan_wing() {
+   config_set $1 device wing-$1
+}
+
+coldplug_interface_wing() {
+setup_interface_wing wing-$1 $1
+}
+
+stop_interface_wing() {
+   local config=$1
+   local iface=wing-$config
+   env -i ACTION=ifdown INTERFACE=$config DEVICE=$iface PROTO=wing 
/sbin/hotplug-call iface
+   [ -f /var/run/$iface.pid ]  {
+   kill -9 $(cat /var/run/$iface.pid)
+   rm /var/run/$iface.pid
+   }
+}
+
+setup_interface_wing() {
+
+local iface=$1
+local config=$2
+
+   local hwmodes=
+   local freqs=
+   local ifnames=
+   local hwaddrs=
+
+   config_load wireless
+   config_foreach wing_list_interfaces wifi-iface
+   
+   # start click router
+   if [ $hwmodes =  -o $freqs =  -o $ifnames =  -o $hwaddrs = 
 ]; then
+   logger -t $config No raw interfaces available. Exiting.
+   exit 1
+   fi
+
+   local profile rc ls prefix debug
+
+   config_get profile $config profile bulk
+   config_get rc $config rc static
+   config_get ls $config ls fcfs
+   config_get metric $config metric wcett
+   config_get prefix $config prefix 6
+   config_get period $config period 1
+   config_get tau $config tau 10
+   config_get_bool debug $config debug False
+
+   local hwaddr=$(echo $hwaddrs | sed 's/ .*//');
+   local ipaddr=$(printf $prefix.%d.%d.%d $(echo $hwaddr | awk -F: '{printf 
0x%s 0x%s 0x%s,$4,$5,$6}'))
+   local netmask=255.0.0.0
+
+   if ! wing_template_available profile $profile bulk; then
+   logger -t $config Unable to configure router. Exiting.
+   exit 1
+   fi
+
+   if ! wing_template_available rc $rc static; then
+   logger -t $config Unable to configure rate control. Exiting.
+   exit 1
+   fi
+
+   if ! wing_template_available ls $ls radiotap; then
+   logger -t $config Unable to configure link scheduler. 
Exiting.
+   exit 1
+   fi
+
+   if [ $profile =  -o $rc =  ]; then
+   logger -t $config Unable to generate template. Exiting.
+   exit 1
+   fi
+
+   [ $debug == 0 ]  dbg= || dbg=-d
+
+   /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \
+   -m $hwmodes -c $freqs -n $ifnames -a $hwaddrs $dbg \
+   | sed -e s/__XR_IFNAME__/$iface/g \
+   | sed -e s/__XR_IP__/$ipaddr/g \
+   | sed -e s/__XR_NM__/$netmask/g \
+   | sed -e s/__XR_PERIOD__/$period/g \
+   | sed -e s/__XR_TAU__/$tau/g  /tmp/$iface.click
+
+   /usr/bin/click-align /tmp/$iface.click  /tmp/$iface-aligned.click 
2/var/log/$iface.log
+   [ ! -c /dev/net/tun ]  {
+   mkdir -p /dev/net/
+   mknod /dev/net/tun c 10 200
+   if [ ! -c /dev/net/tun ]; then
+   logger -t $config Device not available (/dev/net/tun). 
Exiting.
+   exit 1
+   fi
+   }
+
+   # creating the tun interface below will trigger a net subsystem event
+   # prevent it from touching iface by disabling .auto here
+   uci_set_state network $config auto 0
+
+   (/usr/bin/click /tmp/$iface-aligned.click  /var/log/$iface.log 21)
+   sleep 2
+   ps | grep /usr/bin/click | grep -q -v grep || {
+   logger -t $config Unable to start click. Exiting.
+   

Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-11 Thread L. Aaron Kaplan
is there any docu on WING?


On Aug 11, 2010, at 11:55 AM, Roberto Riggio wrote:

 Hi,
 
 this patch adds support for WING a new routing protocol for wireless
 mesh networks. WING is an extension of the Roofnet routing protocol
 developed by MIT. The new features are: support for multiple radio
 interfaces, and link quality based routing using the WCETT metric.
 
 The source code is hosted at github.
 
 Upon install, this package will create a new entry in the network section:
 
 config 'interface' 'mesh'
option 'proto' 'wing'
option 'profile' 'bulk'
option 'rc' 'static'
option 'ls' 'fcfs'
option 'metric' 'wcett'
option 'prefix' '6'
option 'period' '36000'
option 'tau' '36'
option 'debug' 'true'
 
 The only mandatory field is proto. After running ifup mesh a new interface
 will be created. This interface is called wing-$(ifname) and uses 
 multi-hopping.
 
 Here follows a short description for the other parameters:
 
 profile, profile to be used for building the configuration for the click
 router (at the moment only one profile is defined)
 
 rc, rate control algorithm (static, madwifi, autoratefallback)
 
 ls, outgoing link scheduling policy (fcfs, drr)
 
 metric, routing metric (etx, ett, wcett)
 
 period, tau, averaging period for network probes, smoothing window
 
 Signed-off-by: Roberto Riggio roberto.rig...@create-net.org
 
 --
 
 Index: net/wing/files/lib/network/wing.sh
 ===
 --- net/wing/files/lib/network/wing.sh(revision 0)
 +++ net/wing/files/lib/network/wing.sh(revision 0)
 @@ -0,0 +1,145 @@
 +
 +scan_wing() {
 + config_set $1 device wing-$1
 +}
 +
 +coldplug_interface_wing() {
 +setup_interface_wing wing-$1 $1
 +}
 +
 +stop_interface_wing() {
 + local config=$1
 + local iface=wing-$config
 + env -i ACTION=ifdown INTERFACE=$config DEVICE=$iface PROTO=wing 
 /sbin/hotplug-call iface
 + [ -f /var/run/$iface.pid ]  {
 + kill -9 $(cat /var/run/$iface.pid)
 + rm /var/run/$iface.pid
 + }
 +}
 +
 +setup_interface_wing() {
 +
 +local iface=$1
 +local config=$2
 +
 + local hwmodes=
 + local freqs=
 + local ifnames=
 + local hwaddrs=
 +
 + config_load wireless
 + config_foreach wing_list_interfaces wifi-iface
 + 
 + # start click router
 + if [ $hwmodes =  -o $freqs =  -o $ifnames =  -o $hwaddrs 
 =  ]; then
 + logger -t $config No raw interfaces available. Exiting.
 + exit 1
 + fi
 +
 + local profile rc ls prefix debug
 +
 + config_get profile $config profile bulk
 + config_get rc $config rc static
 + config_get ls $config ls fcfs
 + config_get metric $config metric wcett
 + config_get prefix $config prefix 6
 + config_get period $config period 1
 + config_get tau $config tau 10
 + config_get_bool debug $config debug False
 +
 + local hwaddr=$(echo $hwaddrs | sed 's/ .*//');
 + local ipaddr=$(printf $prefix.%d.%d.%d $(echo $hwaddr | awk -F: 
 '{printf 0x%s 0x%s 0x%s,$4,$5,$6}'))
 + local netmask=255.0.0.0
 +
 + if ! wing_template_available profile $profile bulk; then
 + logger -t $config Unable to configure router. Exiting.
 + exit 1
 + fi
 +
 + if ! wing_template_available rc $rc static; then
 + logger -t $config Unable to configure rate control. Exiting.
 + exit 1
 + fi
 +
 + if ! wing_template_available ls $ls radiotap; then
 + logger -t $config Unable to configure link scheduler. 
 Exiting.
 + exit 1
 + fi
 +
 + if [ $profile =  -o $rc =  ]; then
 + logger -t $config Unable to generate template. Exiting.
 + exit 1
 + fi
 +
 + [ $debug == 0 ]  dbg= || dbg=-d
 +
 + /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \
 + -m $hwmodes -c $freqs -n $ifnames -a $hwaddrs $dbg \
 + | sed -e s/__XR_IFNAME__/$iface/g \
 + | sed -e s/__XR_IP__/$ipaddr/g \
 + | sed -e s/__XR_NM__/$netmask/g \
 + | sed -e s/__XR_PERIOD__/$period/g \
 + | sed -e s/__XR_TAU__/$tau/g  /tmp/$iface.click
 +
 + /usr/bin/click-align /tmp/$iface.click  /tmp/$iface-aligned.click 
 2/var/log/$iface.log
 + [ ! -c /dev/net/tun ]  {
 + mkdir -p /dev/net/
 + mknod /dev/net/tun c 10 200
 + if [ ! -c /dev/net/tun ]; then
 + logger -t $config Device not available 
 (/dev/net/tun). Exiting.
 + exit 1
 + fi
 + }
 +
 + # creating the tun interface below will trigger a net subsystem event
 + # prevent it from touching iface by disabling .auto here
 + uci_set_state network $config auto 0
 +
 + (/usr/bin/click /tmp/$iface-aligned.click  /var/log/$iface.log 21)
 + sleep 2
 + ps | grep /usr/bin/click | grep -q -v 

Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-11 Thread Outback Dingo
I believe it is part of this project

https://www.ict-smartnet.eu/

On Wed, Aug 11, 2010 at 7:37 AM, L. Aaron Kaplan aa...@lo-res.org wrote:

 is there any docu on WING?


 On Aug 11, 2010, at 11:55 AM, Roberto Riggio wrote:

  Hi,
 
  this patch adds support for WING a new routing protocol for wireless
  mesh networks. WING is an extension of the Roofnet routing protocol
  developed by MIT. The new features are: support for multiple radio
  interfaces, and link quality based routing using the WCETT metric.
 
  The source code is hosted at github.
 
  Upon install, this package will create a new entry in the network
 section:
 
  config 'interface' 'mesh'
 option 'proto' 'wing'
 option 'profile' 'bulk'
 option 'rc' 'static'
 option 'ls' 'fcfs'
 option 'metric' 'wcett'
 option 'prefix' '6'
 option 'period' '36000'
 option 'tau' '36'
 option 'debug' 'true'
 
  The only mandatory field is proto. After running ifup mesh a new
 interface
  will be created. This interface is called wing-$(ifname) and uses
 multi-hopping.
 
  Here follows a short description for the other parameters:
 
  profile, profile to be used for building the configuration for the click
  router (at the moment only one profile is defined)
 
  rc, rate control algorithm (static, madwifi, autoratefallback)
 
  ls, outgoing link scheduling policy (fcfs, drr)
 
  metric, routing metric (etx, ett, wcett)
 
  period, tau, averaging period for network probes, smoothing window
 
  Signed-off-by: Roberto Riggio roberto.rig...@create-net.org
 
  --
 
  Index: net/wing/files/lib/network/wing.sh
  ===
  --- net/wing/files/lib/network/wing.sh(revision 0)
  +++ net/wing/files/lib/network/wing.sh(revision 0)
  @@ -0,0 +1,145 @@
  +
  +scan_wing() {
  + config_set $1 device wing-$1
  +}
  +
  +coldplug_interface_wing() {
  +setup_interface_wing wing-$1 $1
  +}
  +
  +stop_interface_wing() {
  + local config=$1
  + local iface=wing-$config
  + env -i ACTION=ifdown INTERFACE=$config DEVICE=$iface
 PROTO=wing /sbin/hotplug-call iface
  + [ -f /var/run/$iface.pid ]  {
  + kill -9 $(cat /var/run/$iface.pid)
  + rm /var/run/$iface.pid
  + }
  +}
  +
  +setup_interface_wing() {
  +
  +local iface=$1
  +local config=$2
  +
  + local hwmodes=
  + local freqs=
  + local ifnames=
  + local hwaddrs=
  +
  + config_load wireless
  + config_foreach wing_list_interfaces wifi-iface
  +
  + # start click router
  + if [ $hwmodes =  -o $freqs =  -o $ifnames =  -o
 $hwaddrs =  ]; then
  + logger -t $config No raw interfaces available. Exiting.
  + exit 1
  + fi
  +
  + local profile rc ls prefix debug
  +
  + config_get profile $config profile bulk
  + config_get rc $config rc static
  + config_get ls $config ls fcfs
  + config_get metric $config metric wcett
  + config_get prefix $config prefix 6
  + config_get period $config period 1
  + config_get tau $config tau 10
  + config_get_bool debug $config debug False
  +
  + local hwaddr=$(echo $hwaddrs | sed 's/ .*//');
  + local ipaddr=$(printf $prefix.%d.%d.%d $(echo $hwaddr | awk -F:
 '{printf 0x%s 0x%s 0x%s,$4,$5,$6}'))
  + local netmask=255.0.0.0
  +
  + if ! wing_template_available profile $profile bulk; then
  + logger -t $config Unable to configure router. Exiting.
  + exit 1
  + fi
  +
  + if ! wing_template_available rc $rc static; then
  + logger -t $config Unable to configure rate control.
 Exiting.
  + exit 1
  + fi
  +
  + if ! wing_template_available ls $ls radiotap; then
  + logger -t $config Unable to configure link scheduler.
 Exiting.
  + exit 1
  + fi
  +
  + if [ $profile =  -o $rc =  ]; then
  + logger -t $config Unable to generate template. Exiting.
  + exit 1
  + fi
  +
  + [ $debug == 0 ]  dbg= || dbg=-d
  +
  + /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \
  + -m $hwmodes -c $freqs -n $ifnames -a $hwaddrs $dbg
 \
  + | sed -e s/__XR_IFNAME__/$iface/g \
  + | sed -e s/__XR_IP__/$ipaddr/g \
  + | sed -e s/__XR_NM__/$netmask/g \
  + | sed -e s/__XR_PERIOD__/$period/g \
  + | sed -e s/__XR_TAU__/$tau/g  /tmp/$iface.click
  +
  + /usr/bin/click-align /tmp/$iface.click  /tmp/$iface-aligned.click
 2/var/log/$iface.log
  + [ ! -c /dev/net/tun ]  {
  + mkdir -p /dev/net/
  + mknod /dev/net/tun c 10 200
  + if [ ! -c /dev/net/tun ]; then
  + logger -t $config Device not available
 (/dev/net/tun). Exiting.
  + exit 1
  + fi
  + }
  +
  + # creating the tun interface below will trigger a 

Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-11 Thread Outback Dingo
which then links to

http://www.wing-project.org/

On Wed, Aug 11, 2010 at 7:37 AM, L. Aaron Kaplan aa...@lo-res.org wrote:

 is there any docu on WING?


 On Aug 11, 2010, at 11:55 AM, Roberto Riggio wrote:

  Hi,
 
  this patch adds support for WING a new routing protocol for wireless
  mesh networks. WING is an extension of the Roofnet routing protocol
  developed by MIT. The new features are: support for multiple radio
  interfaces, and link quality based routing using the WCETT metric.
 
  The source code is hosted at github.
 
  Upon install, this package will create a new entry in the network
 section:
 
  config 'interface' 'mesh'
 option 'proto' 'wing'
 option 'profile' 'bulk'
 option 'rc' 'static'
 option 'ls' 'fcfs'
 option 'metric' 'wcett'
 option 'prefix' '6'
 option 'period' '36000'
 option 'tau' '36'
 option 'debug' 'true'
 
  The only mandatory field is proto. After running ifup mesh a new
 interface
  will be created. This interface is called wing-$(ifname) and uses
 multi-hopping.
 
  Here follows a short description for the other parameters:
 
  profile, profile to be used for building the configuration for the click
  router (at the moment only one profile is defined)
 
  rc, rate control algorithm (static, madwifi, autoratefallback)
 
  ls, outgoing link scheduling policy (fcfs, drr)
 
  metric, routing metric (etx, ett, wcett)
 
  period, tau, averaging period for network probes, smoothing window
 
  Signed-off-by: Roberto Riggio roberto.rig...@create-net.org
 
  --
 
  Index: net/wing/files/lib/network/wing.sh
  ===
  --- net/wing/files/lib/network/wing.sh(revision 0)
  +++ net/wing/files/lib/network/wing.sh(revision 0)
  @@ -0,0 +1,145 @@
  +
  +scan_wing() {
  + config_set $1 device wing-$1
  +}
  +
  +coldplug_interface_wing() {
  +setup_interface_wing wing-$1 $1
  +}
  +
  +stop_interface_wing() {
  + local config=$1
  + local iface=wing-$config
  + env -i ACTION=ifdown INTERFACE=$config DEVICE=$iface
 PROTO=wing /sbin/hotplug-call iface
  + [ -f /var/run/$iface.pid ]  {
  + kill -9 $(cat /var/run/$iface.pid)
  + rm /var/run/$iface.pid
  + }
  +}
  +
  +setup_interface_wing() {
  +
  +local iface=$1
  +local config=$2
  +
  + local hwmodes=
  + local freqs=
  + local ifnames=
  + local hwaddrs=
  +
  + config_load wireless
  + config_foreach wing_list_interfaces wifi-iface
  +
  + # start click router
  + if [ $hwmodes =  -o $freqs =  -o $ifnames =  -o
 $hwaddrs =  ]; then
  + logger -t $config No raw interfaces available. Exiting.
  + exit 1
  + fi
  +
  + local profile rc ls prefix debug
  +
  + config_get profile $config profile bulk
  + config_get rc $config rc static
  + config_get ls $config ls fcfs
  + config_get metric $config metric wcett
  + config_get prefix $config prefix 6
  + config_get period $config period 1
  + config_get tau $config tau 10
  + config_get_bool debug $config debug False
  +
  + local hwaddr=$(echo $hwaddrs | sed 's/ .*//');
  + local ipaddr=$(printf $prefix.%d.%d.%d $(echo $hwaddr | awk -F:
 '{printf 0x%s 0x%s 0x%s,$4,$5,$6}'))
  + local netmask=255.0.0.0
  +
  + if ! wing_template_available profile $profile bulk; then
  + logger -t $config Unable to configure router. Exiting.
  + exit 1
  + fi
  +
  + if ! wing_template_available rc $rc static; then
  + logger -t $config Unable to configure rate control.
 Exiting.
  + exit 1
  + fi
  +
  + if ! wing_template_available ls $ls radiotap; then
  + logger -t $config Unable to configure link scheduler.
 Exiting.
  + exit 1
  + fi
  +
  + if [ $profile =  -o $rc =  ]; then
  + logger -t $config Unable to generate template. Exiting.
  + exit 1
  + fi
  +
  + [ $debug == 0 ]  dbg= || dbg=-d
  +
  + /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \
  + -m $hwmodes -c $freqs -n $ifnames -a $hwaddrs $dbg
 \
  + | sed -e s/__XR_IFNAME__/$iface/g \
  + | sed -e s/__XR_IP__/$ipaddr/g \
  + | sed -e s/__XR_NM__/$netmask/g \
  + | sed -e s/__XR_PERIOD__/$period/g \
  + | sed -e s/__XR_TAU__/$tau/g  /tmp/$iface.click
  +
  + /usr/bin/click-align /tmp/$iface.click  /tmp/$iface-aligned.click
 2/var/log/$iface.log
  + [ ! -c /dev/net/tun ]  {
  + mkdir -p /dev/net/
  + mknod /dev/net/tun c 10 200
  + if [ ! -c /dev/net/tun ]; then
  + logger -t $config Device not available
 (/dev/net/tun). Exiting.
  + exit 1
  + fi
  + }
  +
  + # creating the tun interface below will trigger a net subsystem
 

Re: [OpenWrt-Devel] [PATCH] New wireless mesh network routing protocol

2010-08-11 Thread Roberto Riggio

The official website is

http://www.wing-project.org

The website contains several info about the routing protocol. An extended
description of the wing package for openwrt can be found here:

http://wing-project.org/openwrt:wing

I've developed most of the code for the routing protocol and for
the integration with openwrt, so i can probably answer to your
questions.

R.

On 08/11/2010 01:37 PM, L. Aaron Kaplan wrote:

is there any docu on WING?


On Aug 11, 2010, at 11:55 AM, Roberto Riggio wrote:

   

Hi,

this patch adds support for WING a new routing protocol for wireless
mesh networks. WING is an extension of the Roofnet routing protocol
developed by MIT. The new features are: support for multiple radio
interfaces, and link quality based routing using the WCETT metric.

The source code is hosted at github.

Upon install, this package will create a new entry in the network section:

config 'interface' 'mesh'
option 'proto' 'wing'
option 'profile' 'bulk'
option 'rc' 'static'
option 'ls' 'fcfs'
option 'metric' 'wcett'
option 'prefix' '6'
option 'period' '36000'
option 'tau' '36'
option 'debug' 'true'

The only mandatory field is proto. After running ifup mesh a new interface
will be created. This interface is called wing-$(ifname) and uses multi-hopping.

Here follows a short description for the other parameters:

profile, profile to be used for building the configuration for the click
router (at the moment only one profile is defined)

rc, rate control algorithm (static, madwifi, autoratefallback)

ls, outgoing link scheduling policy (fcfs, drr)

metric, routing metric (etx, ett, wcett)

period, tau, averaging period for network probes, smoothing window

Signed-off-by: Roberto Riggioroberto.rig...@create-net.org

--

Index: net/wing/files/lib/network/wing.sh
===
--- net/wing/files/lib/network/wing.sh  (revision 0)
+++ net/wing/files/lib/network/wing.sh  (revision 0)
@@ -0,0 +1,145 @@
+
+scan_wing() {
+   config_set $1 device wing-$1
+}
+
+coldplug_interface_wing() {
+setup_interface_wing wing-$1 $1
+}
+
+stop_interface_wing() {
+   local config=$1
+   local iface=wing-$config
+   env -i ACTION=ifdown INTERFACE=$config DEVICE=$iface PROTO=wing 
/sbin/hotplug-call iface
+   [ -f /var/run/$iface.pid ]   {
+   kill -9 $(cat /var/run/$iface.pid)
+   rm /var/run/$iface.pid
+   }
+}
+
+setup_interface_wing() {
+
+local iface=$1
+local config=$2
+
+   local hwmodes=
+   local freqs=
+   local ifnames=
+   local hwaddrs=
+
+   config_load wireless
+   config_foreach wing_list_interfaces wifi-iface
+   
+   # start click router
+   if [ $hwmodes =  -o $freqs =  -o $ifnames =  -o $hwaddrs = 
 ]; then
+   logger -t $config No raw interfaces available. Exiting.
+   exit 1
+   fi
+
+   local profile rc ls prefix debug
+
+   config_get profile $config profile bulk
+   config_get rc $config rc static
+   config_get ls $config ls fcfs
+   config_get metric $config metric wcett
+   config_get prefix $config prefix 6
+   config_get period $config period 1
+   config_get tau $config tau 10
+   config_get_bool debug $config debug False
+
+   local hwaddr=$(echo $hwaddrs | sed 's/ .*//');
+   local ipaddr=$(printf $prefix.%d.%d.%d $(echo $hwaddr | awk -F: '{printf 
0x%s 0x%s 0x%s,$4,$5,$6}'))
+   local netmask=255.0.0.0
+
+   if ! wing_template_available profile $profile bulk; then
+   logger -t $config Unable to configure router. Exiting.
+   exit 1
+   fi
+
+   if ! wing_template_available rc $rc static; then
+   logger -t $config Unable to configure rate control. Exiting.
+   exit 1
+   fi
+
+   if ! wing_template_available ls $ls radiotap; then
+   logger -t $config Unable to configure link scheduler. 
Exiting.
+   exit 1
+   fi
+
+   if [ $profile =  -o $rc =  ]; then
+   logger -t $config Unable to generate template. Exiting.
+   exit 1
+   fi
+
+   [ $debug == 0 ]   dbg= || dbg=-d
+
+   /usr/bin/click_config -p $profile -r $rc -s $ls -l $metric \
+   -m $hwmodes -c $freqs -n $ifnames -a $hwaddrs $dbg \
+   | sed -e s/__XR_IFNAME__/$iface/g \
+   | sed -e s/__XR_IP__/$ipaddr/g \
+   | sed -e s/__XR_NM__/$netmask/g \
+   | sed -e s/__XR_PERIOD__/$period/g \
+   | sed -e s/__XR_TAU__/$tau/g   /tmp/$iface.click
+
+   /usr/bin/click-align /tmp/$iface.click   /tmp/$iface-aligned.click 
2/var/log/$iface.log
+   [ ! -c /dev/net/tun ]   {
+   mkdir -p /dev/net/
+   mknod /dev/net/tun c 10 200
+   if [ ! -c /dev/net/tun ]; then
+   logger -t $config Device not