Initial import of binutils 2.22 on the new vendor branch
[dragonfly.git] / tools / tools / net80211 / scripts / mesh / topology.star
1 #! /bin/sh
2 #
3 # Script for creating a mesh in star topology.
4 # Node 3 will be the center.
5 #
6 # $FreeBSD: src/tools/tools/net80211/scripts/mesh/topology.star,v 1.1 2009/07/11 15:02:45 rpaulo Exp $
7 #
8 PATH=../:.:$PATH
9 . config
10 . config.mesh
11
12 . common
13 ifconfig $WLAN mac:allow
14 MAC=`ifconfig $WLAN | grep ether | awk '{ print $2 }'`
15 case $MAC in
16         $NODE1_MAC)
17                 ifconfig $WLAN inet $NODE1_IP
18                 ifconfig $WLAN mac:add $NODE3_MAC
19                 ;;
20         $NODE2_MAC)
21                 ifconfig $WLAN inet $NODE2_IP
22                 ifconfig $WLAN mac:add $NODE3_MAC
23                 ;;
24         $NODE3_MAC)
25                 ifconfig $WLAN inet $NODE3_IP
26                 ifconfig $WLAN mac:add $NODE1_MAC mac:add $NODE2_MAC mac:add \
27                     $NODE4_MAC mac:add $NODE5_MAC
28                 ;;
29         $NODE4_MAC)
30                 ifconfig $WLAN inet $NODE4_IP
31                 ifconfig $WLAN mac:add $NODE3_MAC
32                 ;;
33         $NODE5_MAC)
34                 ifconfig $WLAN inet $NODE5_IP
35                 ifconfig $WLAN mac:add $NODE3_MAC
36                 ;;
37 esac
38 ifconfig $WLAN up