├── 0 ├── Makefile ├── bypassmac.xml ├── bypassnem.xml ├── bypassphy.xml ├── eelgenerator.xml ├── eventservice.xml └── transvirtual.xml ├── 1 ├── Makefile ├── bridge_with10.py ├── eelgenerator.xml ├── eventservice.xml ├── host-prestop ├── mgen ├── otestpoint-broker.xml ├── otestpointd.xml.template ├── position_10.py ├── probe-emane-physicallayer.xml ├── probe-emane-rfpipe.xml ├── probe-emane-virtualtransport.xml ├── rfpipemac.xml ├── rfpipenem.xml └── transvirtual.xml ├── 2 ├── Makefile ├── eelgenerator.xml ├── eventservice.xml ├── host-poststart ├── host-prestop ├── otestpoint-broker.xml ├── otestpoint-recorder.xml.template ├── otestpointd.xml.template ├── platform.xml ├── probe-emane-physicallayer.xml.template ├── probe-emane-rfpipe.xml.template ├── rfpipemac.xml ├── rfpipenem.xml ├── satcomnem.xml ├── scenario.eel └── transvirtual.xml ├── 3 ├── Makefile ├── eelgenerator.xml ├── eventservice.xml ├── host-prestop ├── ieee80211abgmac.xml ├── ieee80211abgnem.xml ├── mgen ├── otestpoint-broker.xml ├── otestpointd.xml.template ├── probe-emane-ieee80211abg.xml ├── probe-emane-physicallayer.xml ├── probe-emane-virtualtransport.xml ├── routing.conf └── transvirtual.xml ├── 5 ├── Makefile ├── eelgenerator.xml ├── eventservice.xml ├── host-poststart ├── ieee80211abgmac.xml ├── ieee80211abgnem.xml ├── mgen1 ├── mgen2 ├── mgen3 ├── mgen4 ├── otestpoint-broker.xml ├── otestpointd1.xml ├── otestpointd2.xml ├── otestpointd3.xml ├── otestpointd4.xml ├── platform1.xml ├── platform2.xml ├── platform3.xml ├── platform4.xml ├── probe-emane-ieee80211abg.xml ├── probe-emane-physicallayer.xml ├── probe-emane-rfpipe.xml ├── probe-emane-virtualtransport.xml ├── rfpipemac.xml ├── rfpipenem.xml ├── scenario.eel └── transvirtual.xml ├── 6 ├── Makefile ├── antenna30dsector.xml ├── antennaprofilemanifest.xml.in ├── blockageaft.xml ├── eelgenerator.xml ├── eventservice.xml ├── host-poststart ├── host-prestop ├── otestpoint-broker.xml ├── otestpointd.xml.template ├── platform1.xml ├── platform2.xml ├── platform3.xml ├── platform4.xml ├── probe-emane-physicallayer.xml ├── probe-emane-rfpipe.xml ├── probe-emane-virtualtransport.xml ├── rfpipemac.xml ├── rfpipenem.xml ├── scenario.eel └── transvirtual.xml ├── 7 ├── Makefile ├── commeffectnem.xml ├── commeffectshim.xml ├── host-poststart ├── host-prestop ├── node-prestart ├── otestpoint-broker.xml ├── otestpoint-recorder.xml.template ├── otestpointd.xml.template ├── platform.xml ├── probe-emane-commeffect.xml.template ├── probe-emane-rawtransport.xml.template ├── routing.conf.template └── transraw.xml ├── 8 ├── Makefile ├── eelgenerator.xml ├── eventservice.xml ├── host-prestop ├── mgen ├── otestpoint-broker.xml ├── otestpointd.xml.template ├── probe-emane-physicallayer.xml ├── probe-emane-tdmaeventschedulerradiomodel.xml ├── probe-emane-virtualtransport.xml ├── scenario.eel ├── schedule-tx_3.xml ├── schedule-tx_3_with_rx.xml ├── schedule.xml ├── tdmanem.xml ├── tdmaradiomodel.xml └── transvirtual.xml ├── COPYING ├── Copyright ├── Makefile ├── README.md ├── rules.mk ├── scenario ├── scenario-without_nem10.eel └── scenario.eel ├── scripts ├── demo-init ├── democtl-host └── olsrlinkview.py └── templates ├── demo-start.template ├── demo-stop.template ├── eventdaemon.xml.template ├── gpsdlocationagent.xml.template ├── otestpoint-recorder.xml.template ├── platform.xml.template └── routing.conf.template /0/Makefile: -------------------------------------------------------------------------------- 1 | TOP_DIR=.. 2 | 3 | DEMO_ID=0 4 | 5 | NEM_XML=bypassnem.xml 6 | 7 | GENERATED_PLATFORMS= \ 8 | platform1.xml \ 9 | platform2.xml 10 | 11 | GENERATED_EVENTDAEMONS= \ 12 | eventdaemon1.xml \ 13 | eventdaemon2.xml 14 | 15 | GENERATED_GPSDLOCATIONAGENTS= \ 16 | gpsdlocationagent1.xml \ 17 | gpsdlocationagent2.xml 18 | 19 | GENERATED_MGENINPUTS= 20 | 21 | GENERATED_ROUTINGCONFS= \ 22 | routing1.conf \ 23 | routing2.conf 24 | 25 | NO-%: 26 | touch $@ 27 | 28 | GENERATED_EXTRA= \ 29 | NO-host-emaneeventservice \ 30 | NO-node-emane \ 31 | NO-node-emaneeventd \ 32 | NO-node-emanetransportd \ 33 | NO-node-gpsd \ 34 | NO-node-routing 35 | 36 | include ../rules.mk 37 | 38 | 39 | -------------------------------------------------------------------------------- /0/bypassmac.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /0/bypassnem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /0/bypassphy.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /0/eelgenerator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /0/eventservice.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /0/transvirtual.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /1/Makefile: -------------------------------------------------------------------------------- 1 | TOP_DIR=.. 2 | 3 | DEMO_ID=1 4 | 5 | NEM_XML=rfpipenem.xml 6 | 7 | TEMPLATE_OTESTPOINTD=otestpointd.xml.template 8 | 9 | GENERATED_PLATFORMS= \ 10 | platform1.xml \ 11 | platform2.xml \ 12 | platform3.xml \ 13 | platform4.xml \ 14 | platform5.xml \ 15 | platform6.xml \ 16 | platform7.xml \ 17 | platform8.xml \ 18 | platform9.xml \ 19 | platform10.xml 20 | 21 | GENERATED_EVENTDAEMONS= \ 22 | eventdaemon1.xml \ 23 | eventdaemon2.xml \ 24 | eventdaemon3.xml \ 25 | eventdaemon4.xml \ 26 | eventdaemon5.xml \ 27 | eventdaemon6.xml \ 28 | eventdaemon7.xml \ 29 | eventdaemon8.xml \ 30 | eventdaemon9.xml \ 31 | eventdaemon10.xml 32 | 33 | GENERATED_GPSDLOCATIONAGENTS= \ 34 | gpsdlocationagent1.xml \ 35 | gpsdlocationagent2.xml \ 36 | gpsdlocationagent3.xml \ 37 | gpsdlocationagent4.xml \ 38 | gpsdlocationagent5.xml \ 39 | gpsdlocationagent6.xml \ 40 | gpsdlocationagent7.xml \ 41 | gpsdlocationagent8.xml \ 42 | gpsdlocationagent9.xml \ 43 | gpsdlocationagent10.xml 44 | 45 | GENERATED_MGENINPUTS= 46 | 47 | GENERATED_ROUTINGCONFS= \ 48 | routing1.conf \ 49 | routing2.conf \ 50 | routing3.conf \ 51 | routing4.conf \ 52 | routing5.conf \ 53 | routing6.conf \ 54 | routing7.conf \ 55 | routing8.conf \ 56 | routing9.conf \ 57 | routing10.conf 58 | 59 | GENERATED_OTESTPOINTDS= \ 60 | otestpointd1.xml \ 61 | otestpointd2.xml \ 62 | otestpointd3.xml \ 63 | otestpointd4.xml \ 64 | otestpointd5.xml \ 65 | otestpointd6.xml \ 66 | otestpointd7.xml \ 67 | otestpointd8.xml \ 68 | otestpointd9.xml \ 69 | otestpointd10.xml 70 | 71 | GENERATED_OTESTPOINTRECORDERS= \ 72 | otestpoint-recorder1.xml \ 73 | otestpoint-recorder2.xml \ 74 | otestpoint-recorder3.xml \ 75 | otestpoint-recorder4.xml \ 76 | otestpoint-recorder5.xml \ 77 | otestpoint-recorder6.xml \ 78 | otestpoint-recorder7.xml \ 79 | otestpoint-recorder8.xml \ 80 | otestpoint-recorder9.xml \ 81 | otestpoint-recorder10.xml 82 | 83 | NO-%: 84 | touch $@ 85 | 86 | GENERATED_EXTRA= \ 87 | NO-host-emaneeventservice 88 | 89 | include ../rules.mk 90 | 91 | -------------------------------------------------------------------------------- /1/bridge_with10.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | try: 3 | from emane.events import EventService 4 | from emane.events import PathlossEvent 5 | except: 6 | from emanesh.events import EventService 7 | from emanesh.events import PathlossEvent 8 | 9 | # create the event service 10 | service = EventService(('224.1.2.8',45703,'emanenode0')) 11 | 12 | # create an event setting the pathloss between 1 & 10 13 | event = PathlossEvent() 14 | event.append(1,forward=90) 15 | event.append(10,forward=90) 16 | 17 | # publish the event 18 | service.publish(1,event) 19 | service.publish(10,event) 20 | 21 | # create an event setting the pathloss between 9 & 10 22 | event = PathlossEvent() 23 | event.append(9,forward=90) 24 | event.append(10,forward=90) 25 | 26 | # publish the event 27 | service.publish(9,event) 28 | service.publish(10,event) 29 | -------------------------------------------------------------------------------- /1/eelgenerator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /1/eventservice.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /1/host-prestop: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | if [ $# -ne 2 ] 4 | then 5 | "host-prestop: invalid number of arguments" >&2 6 | exit 1 7 | fi 8 | 9 | demo=$1 10 | count=$2 11 | 12 | echo "Running host-prestop demo $demo node count $2" 13 | 14 | for nodeid in $(seq 1 $count) 15 | do 16 | name=node-$nodeid 17 | echo "Collecting statistics and configuration from $name" 18 | emanesh $name show > persist/$nodeid/var/log/emane.show 19 | emanesh $name get stat '*' all > persist/$nodeid/var/log/emane.stats 20 | emanesh $name get table '*' all > persist/$nodeid/var/log/emane.tables 21 | emanesh $name get config '*' all > persist/$nodeid/var/log/emane.config 22 | done 23 | -------------------------------------------------------------------------------- /1/mgen: -------------------------------------------------------------------------------- 1 | TTL 64 2 | 3 | 0.0 LISTEN UDP 5001 4 | 5 | 0.0 JOIN 225.1.20.1 INTERFACE bmf0 6 | 7 | 1.0 ON 1 UDP SRC 5001 DST 225.1.20.1/5001 PERIODIC [1 512] INTERFACE bmf0 8 | -------------------------------------------------------------------------------- /1/otestpoint-broker.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /1/otestpointd.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /1/position_10.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | try: 3 | from emane.events import EventService 4 | from emane.events import LocationEvent 5 | except: 6 | from emanesh.events import EventService 7 | from emanesh.events import LocationEvent 8 | 9 | # create the event service 10 | service = EventService(('224.1.2.8',45703,'emanenode0')) 11 | 12 | # create an event setting 10's position 13 | event = LocationEvent() 14 | event.append(10,latitude=40.031290,longitude=-74.523095,altitude=3.000000) 15 | 16 | # publish the event 17 | service.publish(0,event) 18 | 19 | -------------------------------------------------------------------------------- /1/probe-emane-physicallayer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /1/probe-emane-rfpipe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /1/probe-emane-virtualtransport.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /1/rfpipemac.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | -------------------------------------------------------------------------------- /1/rfpipenem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /1/transvirtual.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /2/Makefile: -------------------------------------------------------------------------------- 1 | TOP_DIR=.. 2 | 3 | NODE_COUNT=7 4 | 5 | DEMO_ID=2 6 | 7 | NEM_XML= 8 | 9 | PLATFORMS=platform.xml 10 | 11 | GENERATED_PLATFORMS= 12 | 13 | GENERATED_EVENTDAEMONS= 14 | 15 | GENERATED_GPSDLOCATIONAGENTS= 16 | 17 | GENERATED_MGENINPUTS= 18 | 19 | GENERATED_ROUTINGCONFS= \ 20 | routing1.conf \ 21 | routing2.conf \ 22 | routing3.conf \ 23 | routing4.conf \ 24 | routing5.conf \ 25 | routing6.conf \ 26 | routing7.conf 27 | 28 | GENERATED_OTESTPOINTDS= 29 | 30 | GENERATED_OTESTPOINTRECORDERS= 31 | 32 | GENERATED_EXTRA= \ 33 | host-otestpointd1.xml \ 34 | host-otestpointd2.xml \ 35 | host-otestpointd3.xml \ 36 | host-otestpointd4.xml \ 37 | host-otestpointd5.xml \ 38 | host-otestpointd6.xml \ 39 | host-otestpointd7.xml \ 40 | host-otestpointd8.xml \ 41 | host-otestpointd9.xml \ 42 | host-otestpoint-recorder1.xml \ 43 | host-otestpoint-recorder2.xml \ 44 | host-otestpoint-recorder3.xml \ 45 | host-otestpoint-recorder4.xml \ 46 | host-otestpoint-recorder5.xml \ 47 | host-otestpoint-recorder6.xml \ 48 | host-otestpoint-recorder7.xml \ 49 | host-otestpoint-recorder8.xml \ 50 | host-otestpoint-recorder9.xml \ 51 | probe-emane-physicallayer1.xml \ 52 | probe-emane-physicallayer2.xml \ 53 | probe-emane-physicallayer3.xml \ 54 | probe-emane-physicallayer4.xml \ 55 | probe-emane-physicallayer5.xml \ 56 | probe-emane-physicallayer6.xml \ 57 | probe-emane-physicallayer7.xml \ 58 | probe-emane-physicallayer8.xml \ 59 | probe-emane-physicallayer9.xml \ 60 | probe-emane-rfpipe1.xml \ 61 | probe-emane-rfpipe2.xml \ 62 | probe-emane-rfpipe3.xml \ 63 | probe-emane-rfpipe4.xml \ 64 | probe-emane-rfpipe5.xml \ 65 | probe-emane-rfpipe6.xml \ 66 | probe-emane-rfpipe7.xml \ 67 | probe-emane-rfpipe8.xml \ 68 | probe-emane-rfpipe9.xml 69 | 70 | host-otestpointd%.xml: otestpointd.xml.template 71 | sed -e 's|@NEMID[@]|$*|g' $< > $@ 72 | 73 | host-otestpoint-recorder%.xml: otestpoint-recorder.xml.template 74 | sed -e 's|@NEMID[@]|$*|g' $< > $@ 75 | 76 | probe-emane-physicallayer%.xml: probe-emane-physicallayer.xml.template 77 | sed -e 's|@NEMID[@]|$*|g' $< > $@ 78 | 79 | probe-emane-rfpipe%.xml: probe-emane-rfpipe.xml.template 80 | sed -e 's|@NEMID[@]|$*|g' $< > $@ 81 | 82 | include ../rules.mk 83 | 84 | -------------------------------------------------------------------------------- /2/eelgenerator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /2/eventservice.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /2/host-poststart: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | start_otestpointd() 4 | { 5 | local xml=$1 6 | local logfile=$2 7 | local pidfile=$3 8 | local uuidfile=$4 9 | 10 | if [ -f $xml ]; then 11 | 12 | echo "Starting otestpointd: $xml" 13 | 14 | otestpointd "$xml" -d -l 3 -f "$logfile" \ 15 | --pidfile "$pidfile" --uuidfile "$uuidfile" 16 | 17 | retval=$? 18 | else 19 | echo "Missing otestpointd XML: $xml" 20 | retval=1 21 | fi 22 | 23 | return $retval 24 | } 25 | 26 | start_otestpoint_recorder() 27 | { 28 | local xml=$1 29 | local logfile=$2 30 | local pidfile=$3 31 | local uuidfile=$4 32 | 33 | if [ -f $xml ]; then 34 | 35 | echo "Starting otestpoint-recorder: $xml" 36 | 37 | otestpoint-recorder "$xml" -d -l 3 -f "$logfile" \ 38 | --pidfile "$pidfile" --uuidfile "$uuidfile" 39 | 40 | retval=$? 41 | else 42 | echo "Missing otestpoint-recorder XML: $xml" 43 | retval=1 44 | fi 45 | 46 | return $retval 47 | } 48 | 49 | 50 | for node in `seq 1 8` 51 | do 52 | start_otestpoint_recorder \ 53 | host-otestpoint-recorder$node.xml \ 54 | $PWD/persist/host/var/log/otestpoint-recorder$node.log \ 55 | $PWD/persist/host/var/run/otestpoint-recorder$node.pid \ 56 | $PWD/persist/host/var/run/otestpoint-recorder$node.uuid 57 | 58 | start_otestpointd \ 59 | host-otestpointd$node.xml \ 60 | $PWD/persist/host/var/log/otestpointd$node.log \ 61 | $PWD/persist/host/var/run/otestpointd$node.pid \ 62 | $PWD/persist/host/var/run/otestpointd$node.uuid 63 | done 64 | 65 | -------------------------------------------------------------------------------- /2/host-prestop: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | if [ $# -ne 2 ] 4 | then 5 | "host-prestop: invalid number of arguments" >&2 6 | exit 1 7 | fi 8 | 9 | demo=$1 10 | count=$2 11 | 12 | echo "Running host-prestop demo $demo node count $2" 13 | 14 | echo "Collecting statistics and configuration" 15 | emanesh localhost show > persist/host/var/log/emane.show 16 | emanesh localhost get stat '*' all > persist/host/var/log/emane.stats 17 | emanesh localhost get table '*' all > persist/host/var/log/emane.tables 18 | emanesh localhost get config '*' all > persist/host/var/log/emane.config 19 | 20 | 21 | echo "Stopping all otestpointd instances" 22 | kill -QUIT $(find persist -name otestpointd*.pid -exec cat {} \;) 23 | 24 | echo "Stopping all otestpoint-recorder instances" 25 | kill -QUIT $(find persist -name otestpoint-recorder*.pid -exec cat {} \;) 26 | -------------------------------------------------------------------------------- /2/otestpoint-broker.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /2/otestpoint-recorder.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /2/otestpointd.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /2/platform.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /2/probe-emane-physicallayer.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /2/probe-emane-rfpipe.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /2/rfpipemac.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | -------------------------------------------------------------------------------- /2/rfpipenem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /2/satcomnem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /2/scenario.eel: -------------------------------------------------------------------------------- 1 | 0.0 nem:1 pathloss nem:2,90 nem:3,90 2 | 0.0 nem:2 pathloss nem:1,90 nem:3,90 3 | 0.0 nem:3 pathloss nem:1,90 nem:2,90 4 | 0.0 nem:4 pathloss nem:5,90 nem:6,90 5 | 0.0 nem:5 pathloss nem:4,90 nem:6,90 6 | 0.0 nem:6 pathloss nem:4,90 nem:5,90 7 | 0.0 nem:7 pathloss nem:8,90 nem:9,90 8 | 0.0 nem:8 pathloss nem:7,90 9 | 0.0 nem:9 pathloss nem:7,90 10 | -------------------------------------------------------------------------------- /2/transvirtual.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /3/Makefile: -------------------------------------------------------------------------------- 1 | TOP_DIR=.. 2 | 3 | DEMO_ID=3 4 | 5 | NEM_XML=ieee80211abgnem.xml 6 | 7 | TEMPLATE_OTESTPOINTD=otestpointd.xml.template 8 | 9 | GENERATED_PLATFORMS= \ 10 | platform1.xml \ 11 | platform2.xml \ 12 | platform3.xml \ 13 | platform4.xml \ 14 | platform5.xml \ 15 | platform6.xml \ 16 | platform7.xml \ 17 | platform8.xml \ 18 | platform9.xml \ 19 | platform10.xml 20 | 21 | GENERATED_EVENTDAEMONS= \ 22 | eventdaemon1.xml \ 23 | eventdaemon2.xml \ 24 | eventdaemon3.xml \ 25 | eventdaemon4.xml \ 26 | eventdaemon5.xml \ 27 | eventdaemon6.xml \ 28 | eventdaemon7.xml \ 29 | eventdaemon8.xml \ 30 | eventdaemon9.xml \ 31 | eventdaemon10.xml 32 | 33 | GENERATED_GPSDLOCATIONAGENTS= \ 34 | gpsdlocationagent1.xml \ 35 | gpsdlocationagent2.xml \ 36 | gpsdlocationagent3.xml \ 37 | gpsdlocationagent4.xml \ 38 | gpsdlocationagent5.xml \ 39 | gpsdlocationagent6.xml \ 40 | gpsdlocationagent7.xml \ 41 | gpsdlocationagent8.xml \ 42 | gpsdlocationagent9.xml \ 43 | gpsdlocationagent10.xml 44 | 45 | GENERATED_MGENINPUTS= 46 | 47 | GENERATED_ROUTINGCONFS= \ 48 | routing1.conf \ 49 | routing2.conf \ 50 | routing3.conf \ 51 | routing4.conf \ 52 | routing5.conf \ 53 | routing6.conf \ 54 | routing7.conf \ 55 | routing8.conf \ 56 | routing9.conf \ 57 | routing10.conf 58 | 59 | GENERATED_OTESTPOINTDS= \ 60 | otestpointd1.xml \ 61 | otestpointd2.xml \ 62 | otestpointd3.xml \ 63 | otestpointd4.xml \ 64 | otestpointd5.xml \ 65 | otestpointd6.xml \ 66 | otestpointd7.xml \ 67 | otestpointd8.xml \ 68 | otestpointd9.xml \ 69 | otestpointd10.xml 70 | 71 | GENERATED_OTESTPOINTRECORDERS= \ 72 | otestpoint-recorder1.xml \ 73 | otestpoint-recorder2.xml \ 74 | otestpoint-recorder3.xml \ 75 | otestpoint-recorder4.xml \ 76 | otestpoint-recorder5.xml \ 77 | otestpoint-recorder6.xml \ 78 | otestpoint-recorder7.xml \ 79 | otestpoint-recorder8.xml \ 80 | otestpoint-recorder9.xml \ 81 | otestpoint-recorder10.xml 82 | 83 | include ../rules.mk 84 | 85 | -------------------------------------------------------------------------------- /3/eelgenerator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /3/eventservice.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /3/host-prestop: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | if [ $# -ne 2 ] 4 | then 5 | "host-prestop: invalid number of arguments" >&2 6 | exit 1 7 | fi 8 | 9 | demo=$1 10 | count=$2 11 | 12 | echo "Running host-prestop demo $demo node count $2" 13 | 14 | for nodeid in $(seq 1 $count) 15 | do 16 | name=node-$nodeid 17 | echo "Collecting statistics and configuration from $name" 18 | emanesh $name show > persist/$nodeid/var/log/emane.show 19 | emanesh $name get stat '*' all > persist/$nodeid/var/log/emane.stats 20 | emanesh $name get table '*' all > persist/$nodeid/var/log/emane.tables 21 | emanesh $name get config '*' all > persist/$nodeid/var/log/emane.config 22 | done 23 | -------------------------------------------------------------------------------- /3/ieee80211abgmac.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /3/ieee80211abgnem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /3/mgen: -------------------------------------------------------------------------------- 1 | TTL 64 2 | 3 | 0.0 LISTEN UDP 5001 4 | 5 | 0.0 JOIN 225.1.20.1 INTERFACE bmf0 6 | 7 | 1.0 ON 1 UDP SRC 5001 DST 225.1.20.1/5001 PERIODIC [1 512] INTERFACE bmf0 8 | -------------------------------------------------------------------------------- /3/otestpoint-broker.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /3/otestpointd.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /3/probe-emane-ieee80211abg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /3/probe-emane-physicallayer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /3/probe-emane-virtualtransport.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /3/routing.conf: -------------------------------------------------------------------------------- 1 | # 2 | # olsr.org OLSR daemon config file 3 | # 4 | # Lines starting with a # are discarded 5 | # 6 | # This file was shipped with olsrd 0.X.X 7 | # 8 | # This file is an example of a typical 9 | # configuration using the LQ extention 10 | 11 | # Debug level(0-9) 12 | # If set to 0 the daemon runs in the background 13 | 14 | DebugLevel 0 15 | 16 | # IP version to use (4 or 6) 17 | 18 | IpVersion 4 19 | 20 | # Clear the screen each time the internal state changes 21 | 22 | ClearScreen yes 23 | 24 | LinkQualityAging 0.2 25 | 26 | Interface "emane0" "emane1" 27 | { 28 | HelloInterval 1.0 29 | HelloValidityTime 5.0 30 | } 31 | 32 | LoadPlugin "olsrd_txtinfo.so.0.1" 33 | { 34 | PlParam "accept" "0.0.0.0" 35 | } 36 | 37 | LoadPlugin "olsrd_bmf.so.1.7.0" 38 | { 39 | PlParam "DoLocalBroadcast" "no" 40 | 41 | PlParam "CapturePacketsOnOlsrInterfaces" "no" 42 | 43 | PlParam "BmfMechanism" "Broadcast" 44 | 45 | PlParam "NonOlsrIf" "eth2" 46 | 47 | PlParam "FanOutLimit" "0" 48 | 49 | PlParam "BroadcastRetransmitCount" "1" 50 | } 51 | -------------------------------------------------------------------------------- /3/transvirtual.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /5/Makefile: -------------------------------------------------------------------------------- 1 | TOP_DIR=.. 2 | 3 | DEMO_ID=5 4 | 5 | NEM_XML= 6 | 7 | PLATFORMS= \ 8 | platform1.xml \ 9 | platform2.xml \ 10 | platform3.xml \ 11 | platform4.xml 12 | 13 | GENERATED_EVENTDAEMONS= 14 | 15 | GENERATED_GPSDLOCATIONAGENTS= 16 | 17 | GENERATED_MGENINPUTS= 18 | 19 | GENERATED_ROUTINGCONFS= 20 | 21 | GENERATED_OTESTPOINTRECORDERS= \ 22 | otestpoint-recorder1.xml \ 23 | otestpoint-recorder2.xml \ 24 | otestpoint-recorder3.xml \ 25 | otestpoint-recorder4.xml 26 | 27 | include ../rules.mk 28 | -------------------------------------------------------------------------------- /5/eelgenerator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /5/eventservice.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /5/host-poststart: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | echo -n "Waiting for 5 second delay.." 4 | 5 | sleep 5 6 | 7 | echo 8 | 9 | watch -e -t -n .5 'set -f; \ 10 | emanesh node-1 get table nems mac UnicastPacketAcceptTable0; \ 11 | emanesh node-2 get table nems mac UnicastPacketAcceptTable0 \ 12 | UnicastPacketDropTable0 NeighborStatusTable; \ 13 | if (grep -q STOP persist/2/var/log/mgen.out); then \ 14 | echo; \ 15 | echo "The demonstration is complete."; \ 16 | echo "Please look away, there is nothing more to see."; \ 17 | echo "Press any key to continue"; \ 18 | echo; \ 19 | exit 1;\ 20 | elif (tac persist/1/var/log/mgen.out | grep -q -l flow\>6); then \ 21 | echo "== Stage 6 of 6 in progress"; \ 22 | echo " NEM 1 sends 81.92Kbps to NEM 2" ;\ 23 | echo " NEM 4 sends 1.23Mbps to NEM 3";\ 24 | elif (tac persist/1/var/log/mgen.out | grep -q -l flow\>5); then \ 25 | echo "== Stage 5 of 6 in progress"; \ 26 | echo " NEM 1 sends 10.24Kbps to NEM 2";\ 27 | echo " NEM 4 sends 1.23Mbps to NEM 3";\ 28 | elif (tac persist/1/var/log/mgen.out | grep -q -l flow\>4); then \ 29 | echo "== Stage 4 of 6 in progress"; \ 30 | echo " NEM 1 sends 81.92Kbps to NEM 2";\ 31 | echo " NEM 3 sends 1.23Mbps to NEM 4";\ 32 | elif (tac persist/1/var/log/mgen.out | grep -q -l flow\>3); then \ 33 | echo "== Stage 3 of 6 in progress"; \ 34 | echo " NEM 1 sends 10.24Kbps to NEM 2" ;\ 35 | echo " NEM 3 sends 1.23Mbps to NEM 4";\ 36 | elif (tac persist/1/var/log/mgen.out | grep -q -l flow\>2); then \ 37 | echo "== Stage 2 of 6 in progress"; \ 38 | echo " NEM 1 sends 81.92Kbps to NEM 2";\ 39 | elif (tac persist/1/var/log/mgen.out | grep -q -l flow\>1); then \ 40 | echo "== Stage 1 of 6 in progress"; \ 41 | echo " NEM 1 sends 10.24Kbps to NEM 2";\ 42 | else \ 43 | echo "Waiting for Stage 1 of 6 to start"; \ 44 | fi' 45 | 46 | 47 | echo -n "Waiting for demonstration completion.." 48 | 49 | while (! grep -q STOP persist/2/var/log/mgen.out) 50 | do 51 | echo -n "." 52 | sleep 1; 53 | done 54 | 55 | echo "done." 56 | 57 | node1_flow1_sent=$(grep 'SEND proto>UDP flow>1' persist/1/var/log/mgen.out | wc -l) 58 | 59 | node1_flow2_sent=$(grep 'SEND proto>UDP flow>2' persist/1/var/log/mgen.out | wc -l) 60 | 61 | node1_flow3_sent=$(grep 'SEND proto>UDP flow>3' persist/1/var/log/mgen.out | wc -l) 62 | 63 | node1_flow4_sent=$(grep 'SEND proto>UDP flow>4' persist/1/var/log/mgen.out | wc -l) 64 | 65 | node1_flow5_sent=$(grep 'SEND proto>UDP flow>5' persist/1/var/log/mgen.out | wc -l) 66 | 67 | node1_flow6_sent=$(grep 'SEND proto>UDP flow>6' persist/1/var/log/mgen.out | wc -l) 68 | 69 | 70 | node2_flow1_recv=$(grep 'RECV proto>UDP flow>1' persist/2/var/log/mgen.out | wc -l) 71 | 72 | node2_flow2_recv=$(grep 'RECV proto>UDP flow>2' persist/2/var/log/mgen.out | wc -l) 73 | 74 | node2_flow3_recv=$(grep 'RECV proto>UDP flow>3' persist/2/var/log/mgen.out | wc -l) 75 | 76 | node2_flow4_recv=$(grep 'RECV proto>UDP flow>4' persist/2/var/log/mgen.out | wc -l) 77 | 78 | node2_flow5_recv=$(grep 'RECV proto>UDP flow>5' persist/2/var/log/mgen.out | wc -l) 79 | 80 | node2_flow6_recv=$(grep 'RECV proto>UDP flow>6' persist/2/var/log/mgen.out | wc -l) 81 | 82 | echo 83 | 84 | printf "Stage %-6s %-6s %-6s %-6s %-6s %-6s\n" 1 2 3 4 5 6 85 | 86 | printf -- "----- %-6s %-6s %-6s %-6s %-6s %-6s\n" \ 87 | "------" "------" "------" "------" "------" "------" 88 | 89 | printf "Tx 1 %-6s %-6s %-6s %-6s %-6s %-6s\n" \ 90 | $node1_flow1_sent $node1_flow2_sent $node1_flow3_sent \ 91 | $node1_flow4_sent $node1_flow5_sent $node1_flow6_sent 92 | 93 | printf "Rx 2 %-6s %-6s %-6s %-6s %-6s %-6s\n" \ 94 | $node2_flow1_recv $node2_flow2_recv $node2_flow3_recv \ 95 | $node2_flow4_recv $node2_flow5_recv $node2_flow6_recv 96 | 97 | printf -- "----- %-6s %-6s %-6s %-6s %-6s %-6s\n" \ 98 | "------" "------" "------" "------" "------" "------" 99 | 100 | printf "Comp%% %-6.2f %-6.2f %-6.2f %-6.2f %-6.2f %-6.2f\n" \ 101 | $(echo "scale=9; $node2_flow1_recv/$node1_flow1_sent * 100.0;" | bc 2> /dev/null) \ 102 | $(echo "scale=9; $node2_flow2_recv/$node1_flow2_sent * 100.0;" | bc 2> /dev/null) \ 103 | $(echo "scale=9; $node2_flow3_recv/$node1_flow3_sent * 100.0;" | bc 2> /dev/null) \ 104 | $(echo "scale=9; $node2_flow4_recv/$node1_flow4_sent * 100.0;" | bc 2> /dev/null) \ 105 | $(echo "scale=9; $node2_flow5_recv/$node1_flow5_sent * 100.0;" | bc 2> /dev/null) \ 106 | $(echo "scale=9; $node2_flow6_recv/$node1_flow6_sent * 100.0;" | bc 2> /dev/null) 107 | 108 | echo 109 | -------------------------------------------------------------------------------- /5/ieee80211abgmac.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /5/ieee80211abgnem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /5/mgen1: -------------------------------------------------------------------------------- 1 | 1.0 ON 1 UDP SRC 5001 DST 10.100.0.2/5001 PERIODIC [10 64] 2 | 3 | 20.0 OFF 1 4 | 5 | 30.0 ON 2 UDP SRC 5001 DST 10.100.0.2/5001 PERIODIC [10 1024] 6 | 7 | 50.0 OFF 2 8 | 9 | 60.0 ON 3 UDP SRC 5001 DST 10.100.0.2/5001 PERIODIC [10 64] 10 | 11 | 80.0 OFF 3 12 | 13 | 90.0 ON 4 UDP SRC 5001 DST 10.100.0.2/5001 PERIODIC [10 1024] 14 | 15 | 110.0 OFF 4 16 | 17 | 120.0 ON 5 UDP SRC 5001 DST 10.100.0.2/5001 PERIODIC [10 64] 18 | 19 | 140.0 OFF 5 20 | 21 | 150.0 ON 6 UDP SRC 5001 DST 10.100.0.2/5001 PERIODIC [10 1024] 22 | 23 | 170.0 OFF 6 24 | -------------------------------------------------------------------------------- /5/mgen2: -------------------------------------------------------------------------------- 1 | 0.0 LISTEN UDP 5001 2 | 3 | 175.0 IGNORE UDP 5001 4 | -------------------------------------------------------------------------------- /5/mgen3: -------------------------------------------------------------------------------- 1 | 60.0 ON 1 UDP SRC 5001 DST 10.100.0.4/5001 PERIODIC [150 1024] 2 | 3 | 110.0 OFF 1 4 | -------------------------------------------------------------------------------- /5/mgen4: -------------------------------------------------------------------------------- 1 | 120.0 ON 1 UDP SRC 5001 DST 10.100.0.3/5001 PERIODIC [150 1024] 2 | 3 | 170.0 OFF 1 4 | -------------------------------------------------------------------------------- /5/otestpoint-broker.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /5/otestpointd1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /5/otestpointd2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /5/otestpointd3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /5/otestpointd4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /5/platform1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /5/platform2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /5/platform3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /5/platform4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /5/probe-emane-ieee80211abg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /5/probe-emane-physicallayer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /5/probe-emane-rfpipe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /5/probe-emane-virtualtransport.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /5/rfpipemac.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | -------------------------------------------------------------------------------- /5/rfpipenem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /5/scenario.eel: -------------------------------------------------------------------------------- 1 | 0.0 nem:1 pathloss nem:2,50 nem:3,44 nem:4,45 2 | 0.0 nem:2 pathloss nem:1,50 nem:3,44 nem:4,45 3 | 0.0 nem:3 pathloss nem:1,44 nem:2,44 nem:4,50 4 | 0.0 nem:4 pathloss nem:1,45 nem:2,45 nem:3,50 5 | -------------------------------------------------------------------------------- /5/transvirtual.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /6/Makefile: -------------------------------------------------------------------------------- 1 | TOP_DIR=.. 2 | 3 | DEMO_ID=6 4 | 5 | NEM_XML= 6 | 7 | TEMPLATE_OTESTPOINTD=otestpointd.xml.template 8 | 9 | PLATFORMS= \ 10 | platform1.xml \ 11 | platform2.xml \ 12 | platform3.xml \ 13 | platform4.xml 14 | 15 | GENERATED_EVENTDAEMONS= \ 16 | eventdaemon1.xml \ 17 | eventdaemon2.xml \ 18 | eventdaemon3.xml \ 19 | eventdaemon4.xml 20 | 21 | GENERATED_GPSDLOCATIONAGENTS= \ 22 | gpsdlocationagent1.xml \ 23 | gpsdlocationagent2.xml \ 24 | gpsdlocationagent3.xml \ 25 | gpsdlocationagent4.xml 26 | 27 | GENERATED_MGENINPUTS= 28 | 29 | GENERATED_ROUTINGCONFS= \ 30 | routing1.conf \ 31 | routing2.conf \ 32 | routing3.conf \ 33 | routing4.conf 34 | 35 | GENERATED_OTESTPOINTDS= \ 36 | otestpointd1.xml \ 37 | otestpointd2.xml \ 38 | otestpointd3.xml \ 39 | otestpointd4.xml 40 | 41 | GENERATED_OTESTPOINTRECORDERS= \ 42 | otestpoint-recorder1.xml \ 43 | otestpoint-recorder2.xml \ 44 | otestpoint-recorder3.xml \ 45 | otestpoint-recorder4.xml 46 | 47 | GENERATED_EXTRA= \ 48 | antennaprofilemanifest.xml 49 | 50 | include ../rules.mk 51 | -------------------------------------------------------------------------------- /6/antenna30dsector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /6/antennaprofilemanifest.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /6/blockageaft.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /6/eelgenerator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /6/eventservice.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /6/host-poststart: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | if [ $# -ne 2 ] 4 | then 5 | "host-poststart: invalid number of arguments" >&2 6 | exit 1 7 | fi 8 | 9 | demo=$1 10 | count=$2 11 | 12 | echo -n "Waiting for 5 second delay.." 13 | 14 | sleep 5 15 | 16 | echo "Running host-poststart demo $demo node count $2" 17 | 18 | emaneevent-dump -i emanenode0 19 | -------------------------------------------------------------------------------- /6/host-prestop: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | if [ $# -ne 2 ] 4 | then 5 | "host-prestop: invalid number of arguments" >&2 6 | exit 1 7 | fi 8 | 9 | demo=$1 10 | count=$2 11 | 12 | echo "Running host-prestop demo $demo node count $2" 13 | 14 | for nodeid in $(seq 1 $count) 15 | do 16 | name=node-$nodeid 17 | echo "Collecting statistics and configuration from $name" 18 | emanesh $name show > persist/$nodeid/var/log/emane.show 19 | emanesh $name get stat '*' all > persist/$nodeid/var/log/emane.stats 20 | emanesh $name get table '*' all > persist/$nodeid/var/log/emane.tables 21 | emanesh $name get config '*' all > persist/$nodeid/var/log/emane.config 22 | done 23 | -------------------------------------------------------------------------------- /6/otestpoint-broker.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /6/otestpointd.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /6/platform1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /6/platform2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /6/platform3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /6/platform4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /6/probe-emane-physicallayer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /6/probe-emane-rfpipe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /6/probe-emane-virtualtransport.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /6/rfpipemac.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | -------------------------------------------------------------------------------- /6/rfpipenem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /6/scenario.eel: -------------------------------------------------------------------------------- 1 | 0.0 nem:1 antennaprofile 1,0.0,0.0 2 | 0.0 nem:4 antennaprofile 2,0.0,0.0 3 | 4 | 0.0 nem:1 pathloss nem:2,60 nem:3,60 nem:4,60 5 | 0.0 nem:2 pathloss nem:3,60 nem:4,60 6 | 0.0 nem:3 pathloss nem:4,60 7 | 8 | 0.0 nem:1 location gps 40.025495,-74.315441,3.0 9 | 0.0 nem:2 location gps 40.025495,-74.312501,3.0 10 | 0.0 nem:3 location gps 40.023235,-74.315441,3.0 11 | 0.0 nem:4 location gps 40.023235,-74.312501,3.0 12 | 0.0 nem:4 velocity 180.0,0.0,10.0 13 | 14 | 15 | 30.0 nem:1 velocity 20.0,0.0,10.0 16 | 30.0 nem:1 orientation 0.0,0.0,10.0 17 | 30.0 nem:1 antennaprofile 1,60.0,0.0 18 | 30.0 nem:4 velocity 270.0,0.0,10.0 19 | 20 | 60.0 nem:1 antennaprofile 1,105.0,0.0 21 | 60.0 nem:4 antennaprofile 2,45.0,0.0 22 | 23 | 90.0 nem:1 velocity 90.0,0.0,10.0 24 | 90.0 nem:1 orientation 0.0,0.0,0.0 25 | 90.0 nem:1 antennaprofile 1,45.0,0.0 26 | -------------------------------------------------------------------------------- /6/transvirtual.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /7/Makefile: -------------------------------------------------------------------------------- 1 | TOP_DIR=.. 2 | 3 | TEMPLATE_ROUTING=routing.conf.template 4 | 5 | NODE_COUNT=10 6 | 7 | DEMO_ID=7 8 | 9 | NEM_XML= 10 | 11 | PLATFORMS= \ 12 | platform.xml 13 | 14 | GENERATED_EVENTDAEMONS= 15 | 16 | GENERATED_GPSDLOCATIONAGENTS= 17 | 18 | GENERATED_MGENINPUTS= 19 | 20 | GENERATED_ROUTINGCONFS= \ 21 | routing1.conf \ 22 | routing2.conf \ 23 | routing3.conf \ 24 | routing4.conf \ 25 | routing5.conf \ 26 | routing6.conf \ 27 | routing7.conf \ 28 | routing8.conf \ 29 | routing9.conf \ 30 | routing10.conf 31 | 32 | GENERATED_EXTRA= \ 33 | host-otestpointd1.xml \ 34 | host-otestpointd2.xml \ 35 | host-otestpointd3.xml \ 36 | host-otestpointd4.xml \ 37 | host-otestpointd5.xml \ 38 | host-otestpointd6.xml \ 39 | host-otestpointd7.xml \ 40 | host-otestpointd8.xml \ 41 | host-otestpointd9.xml \ 42 | host-otestpointd10.xml \ 43 | host-otestpoint-recorder1.xml \ 44 | host-otestpoint-recorder2.xml \ 45 | host-otestpoint-recorder3.xml \ 46 | host-otestpoint-recorder4.xml \ 47 | host-otestpoint-recorder5.xml \ 48 | host-otestpoint-recorder6.xml \ 49 | host-otestpoint-recorder7.xml \ 50 | host-otestpoint-recorder8.xml \ 51 | host-otestpoint-recorder9.xml \ 52 | host-otestpoint-recorder10.xml \ 53 | probe-emane-commeffect1.xml \ 54 | probe-emane-commeffect2.xml \ 55 | probe-emane-commeffect3.xml \ 56 | probe-emane-commeffect4.xml \ 57 | probe-emane-commeffect5.xml \ 58 | probe-emane-commeffect6.xml \ 59 | probe-emane-commeffect7.xml \ 60 | probe-emane-commeffect8.xml \ 61 | probe-emane-commeffect9.xml \ 62 | probe-emane-commeffect10.xml \ 63 | probe-emane-rawtransport1.xml \ 64 | probe-emane-rawtransport2.xml \ 65 | probe-emane-rawtransport3.xml \ 66 | probe-emane-rawtransport4.xml \ 67 | probe-emane-rawtransport5.xml \ 68 | probe-emane-rawtransport6.xml \ 69 | probe-emane-rawtransport7.xml \ 70 | probe-emane-rawtransport8.xml \ 71 | probe-emane-rawtransport9.xml \ 72 | probe-emane-rawtransport10.xml 73 | 74 | include ../rules.mk 75 | 76 | #all-local: 77 | # @if test -f transportdaemon1.xml; then mv -f transportdaemon1.xml transportdaemon.xml; fi 78 | 79 | #clean-local: 80 | # rm -f transportdaemon.xml 81 | 82 | host-otestpointd%.xml: otestpointd.xml.template 83 | sed -e 's|@NEMID[@]|$*|g' \ 84 | -e 's|@DISCOVERYPORT[@]|$(shell expr $(*) + 8880)|g' \ 85 | -e 's|@PUBLISHPORT[@]|$(shell expr $(*) + 8890)|g' $< > $@ 86 | 87 | host-otestpoint-recorder%.xml: otestpoint-recorder.xml.template 88 | sed -e 's|@NEMID[@]|$*|g' \ 89 | -e 's|@PUBLISHPORT[@]|$(shell expr $(*) + 8890)|g' $< > $@ 90 | 91 | probe-emane-commeffect%.xml: probe-emane-commeffect.xml.template 92 | sed -e 's|@NEMID[@]|$*|g' $< > $@ 93 | 94 | probe-emane-rawtransport%.xml: probe-emane-rawtransport.xml.template 95 | sed -e 's|@NEMID[@]|$*|g' $< > $@ 96 | -------------------------------------------------------------------------------- /7/commeffectnem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /7/commeffectshim.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /7/host-poststart: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | start_otestpointd() 4 | { 5 | local xml=$1 6 | local logfile=$2 7 | local pidfile=$3 8 | local uuidfile=$4 9 | 10 | if [ -f $xml ]; then 11 | 12 | echo "Starting otestpointd: $xml" 13 | 14 | otestpointd "$xml" -d -l 3 -f "$logfile" \ 15 | --pidfile "$pidfile" --uuidfile "$uuidfile" 16 | 17 | retval=$? 18 | else 19 | echo "Missing otestpointd XML: $xml" 20 | retval=1 21 | fi 22 | 23 | return $retval 24 | } 25 | 26 | start_otestpoint_recorder() 27 | { 28 | local xml=$1 29 | local logfile=$2 30 | local pidfile=$3 31 | local uuidfile=$4 32 | 33 | if [ -f $xml ]; then 34 | 35 | echo "Starting otestpoint-recorder: $xml" 36 | 37 | otestpoint-recorder "$xml" -d -l 3 -f "$logfile" \ 38 | --pidfile "$pidfile" --uuidfile "$uuidfile" 39 | 40 | retval=$? 41 | else 42 | echo "Missing otestpoint-recorder XML: $xml" 43 | retval=1 44 | fi 45 | 46 | return $retval 47 | } 48 | 49 | 50 | for node in `seq 1 10` 51 | do 52 | start_otestpoint_recorder \ 53 | host-otestpoint-recorder$node.xml \ 54 | $PWD/persist/host/var/log/otestpoint-recorder$node.log \ 55 | $PWD/persist/host/var/run/otestpoint-recorder$node.pid \ 56 | $PWD/persist/host/var/run/otestpoint-recorder$node.uuid 57 | 58 | start_otestpointd \ 59 | host-otestpointd$node.xml \ 60 | $PWD/persist/host/var/log/otestpointd$node.log \ 61 | $PWD/persist/host/var/run/otestpointd$node.pid \ 62 | $PWD/persist/host/var/run/otestpointd$node.uuid 63 | done 64 | 65 | -------------------------------------------------------------------------------- /7/host-prestop: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | echo "Collecting statistics and configuration from host" 4 | emanesh localhost show > persist/host/var/log/emane.show 5 | emanesh localhost get stat '*' all > persist/host/var/log/emane.stats 6 | emanesh localhost get table '*' all > persist/host/var/log/emane.tables 7 | emanesh localhost get config '*' all > persist/host/var/log/emane.config 8 | 9 | 10 | echo "Stopping all otestpointd instances" 11 | kill -QUIT $(find persist -name otestpointd*.pid -exec cat {} \;) 12 | 13 | echo "Stopping all otestpoint-recorder instances" 14 | kill -QUIT $(find persist -name otestpoint-recorder*.pid -exec cat {} \;) 15 | -------------------------------------------------------------------------------- /7/node-prestart: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | ip addr add 10.100.0.$1/24 broadcast 10.100.0.255 dev eth2 4 | 5 | ip link set eth2 up 6 | 7 | ethtool --offload eth2 rx off tx off 8 | -------------------------------------------------------------------------------- /7/otestpoint-broker.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /7/otestpoint-recorder.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /7/otestpointd.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /7/platform.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /7/probe-emane-commeffect.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /7/probe-emane-rawtransport.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /7/routing.conf.template: -------------------------------------------------------------------------------- 1 | # 2 | # olsr.org OLSR daemon config file 3 | # 4 | # Lines starting with a # are discarded 5 | # 6 | # This file was shipped with olsrd 0.X.X 7 | # 8 | # This file is an example of a typical 9 | # configuration using the LQ extention 10 | 11 | # Debug level(0-9) 12 | # If set to 0 the daemon runs in the background 13 | 14 | DebugLevel 0 15 | 16 | # IP version to use (4 or 6) 17 | 18 | IpVersion 4 19 | 20 | LockFile "@TOPDIR@/@DEMOID@/persist/@NODEID@/var/run/olsrd.lock" 21 | 22 | # Clear the screen each time the internal state changes 23 | 24 | ClearScreen yes 25 | 26 | LinkQualityAging 0.2 27 | 28 | Interface "eth2" 29 | { 30 | HelloInterval 1.0 31 | HelloValidityTime 5.0 32 | } 33 | 34 | LoadPlugin "@OLSRTXTINFO@" 35 | { 36 | PlParam "accept" "0.0.0.0" 37 | } 38 | 39 | LoadPlugin "olsrd_bmf.so.1.7.0" 40 | { 41 | PlParam "DoLocalBroadcast" "no" 42 | 43 | PlParam "CapturePacketsOnOlsrInterfaces" "no" 44 | 45 | PlParam "BmfMechanism" "Broadcast" 46 | 47 | PlParam "NonOlsrIf" "eth3" 48 | 49 | PlParam "FanOutLimit" "0" 50 | 51 | PlParam "BroadcastRetransmitCount" "1" 52 | } 53 | -------------------------------------------------------------------------------- /7/transraw.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /8/Makefile: -------------------------------------------------------------------------------- 1 | TOP_DIR=.. 2 | 3 | DEMO_ID=8 4 | 5 | NEM_XML=tdmanem.xml 6 | 7 | TEMPLATE_OTESTPOINTD=otestpointd.xml.template 8 | 9 | GENERATED_PLATFORMS= \ 10 | platform1.xml \ 11 | platform2.xml \ 12 | platform3.xml \ 13 | platform4.xml \ 14 | platform5.xml \ 15 | platform6.xml \ 16 | platform7.xml \ 17 | platform8.xml \ 18 | platform9.xml \ 19 | platform10.xml 20 | 21 | GENERATED_EVENTDAEMONS= \ 22 | eventdaemon1.xml \ 23 | eventdaemon2.xml \ 24 | eventdaemon3.xml \ 25 | eventdaemon4.xml \ 26 | eventdaemon5.xml \ 27 | eventdaemon6.xml \ 28 | eventdaemon7.xml \ 29 | eventdaemon8.xml \ 30 | eventdaemon9.xml \ 31 | eventdaemon10.xml 32 | 33 | GENERATED_GPSDLOCATIONAGENTS= \ 34 | gpsdlocationagent1.xml \ 35 | gpsdlocationagent2.xml \ 36 | gpsdlocationagent3.xml \ 37 | gpsdlocationagent4.xml \ 38 | gpsdlocationagent5.xml \ 39 | gpsdlocationagent6.xml \ 40 | gpsdlocationagent7.xml \ 41 | gpsdlocationagent8.xml \ 42 | gpsdlocationagent9.xml \ 43 | gpsdlocationagent10.xml 44 | 45 | GENERATED_MGENINPUTS= 46 | 47 | GENERATED_ROUTINGCONFS= \ 48 | routing1.conf \ 49 | routing2.conf \ 50 | routing3.conf \ 51 | routing4.conf \ 52 | routing5.conf \ 53 | routing6.conf \ 54 | routing7.conf \ 55 | routing8.conf \ 56 | routing9.conf \ 57 | routing10.conf 58 | 59 | GENERATED_OTESTPOINTDS= \ 60 | otestpointd1.xml \ 61 | otestpointd2.xml \ 62 | otestpointd3.xml \ 63 | otestpointd4.xml \ 64 | otestpointd5.xml \ 65 | otestpointd6.xml \ 66 | otestpointd7.xml \ 67 | otestpointd8.xml \ 68 | otestpointd9.xml \ 69 | otestpointd10.xml 70 | 71 | GENERATED_OTESTPOINTRECORDERS= \ 72 | otestpoint-recorder1.xml \ 73 | otestpoint-recorder2.xml \ 74 | otestpoint-recorder3.xml \ 75 | otestpoint-recorder4.xml \ 76 | otestpoint-recorder5.xml \ 77 | otestpoint-recorder6.xml \ 78 | otestpoint-recorder7.xml \ 79 | otestpoint-recorder8.xml \ 80 | otestpoint-recorder9.xml \ 81 | otestpoint-recorder10.xml 82 | 83 | include ../rules.mk 84 | 85 | -------------------------------------------------------------------------------- /8/eelgenerator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /8/eventservice.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /8/host-prestop: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | if [ $# -ne 2 ] 4 | then 5 | "host-prestop: invalid number of arguments" >&2 6 | exit 1 7 | fi 8 | 9 | demo=$1 10 | count=$2 11 | 12 | echo "Running host-prestop demo $demo node count $2" 13 | 14 | for nodeid in $(seq 1 $count) 15 | do 16 | name=node-$nodeid 17 | echo "Collecting statistics and configuration from $name" 18 | emanesh $name show > persist/$nodeid/var/log/emane.show 19 | emanesh $name get stat '*' all > persist/$nodeid/var/log/emane.stats 20 | emanesh $name get table '*' all > persist/$nodeid/var/log/emane.tables 21 | emanesh $name get config '*' all > persist/$nodeid/var/log/emane.config 22 | done 23 | -------------------------------------------------------------------------------- /8/mgen: -------------------------------------------------------------------------------- 1 | TTL 64 2 | 3 | 0.0 LISTEN UDP 5001 4 | 5 | 0.0 JOIN 225.1.20.1 INTERFACE bmf0 6 | 7 | 1.0 ON 1 UDP SRC 5001 DST 225.1.20.1/5001 PERIODIC [1 512] INTERFACE bmf0 8 | -------------------------------------------------------------------------------- /8/otestpoint-broker.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /8/otestpointd.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /8/probe-emane-physicallayer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /8/probe-emane-tdmaeventschedulerradiomodel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /8/probe-emane-virtualtransport.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /8/scenario.eel: -------------------------------------------------------------------------------- 1 | 0.0 nem:1 pathloss nem:2,90 nem:3,90 2 | 0.0 nem:2 pathloss nem:1,90 nem:3,90 3 | 0.0 nem:3 pathloss nem:1,90 nem:2,90 4 | 0.0 nem:4 pathloss nem:5,90 nem:6,90 5 | 0.0 nem:5 pathloss nem:4,90 nem:6,90 6 | 0.0 nem:6 pathloss nem:4,90 nem:5,90 7 | 0.0 nem:7 pathloss nem:8,90 nem:9,90 8 | 0.0 nem:8 pathloss nem:7,90 9 | 0.0 nem:9 pathloss nem:7,90 10 | -------------------------------------------------------------------------------- /8/schedule-tx_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /8/schedule-tx_3_with_rx.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /8/schedule.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /8/tdmanem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /8/tdmaradiomodel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | -------------------------------------------------------------------------------- /8/transvirtual.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2016 - Adjacent Link LLC, Bridgewater, New Jersey 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Adjacent Link LLC nor the names of its 15 | contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 24 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 28 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | POSSIBILITY OF SUCH DAMAGE. 30 | 31 | === 32 | === 33 | 34 | scripts/olsrlinkview.py: 35 | 36 | Copyright (c) 2014 - Adjacent Link LLC, Bridgewater, New Jersey 37 | Copyright (c) 2012 - DRS CenGen, LLC, Columbia, Maryland 38 | All rights reserved. 39 | 40 | Redistribution and use in source and binary forms, with or without 41 | modification, are permitted provided that the following conditions 42 | are met: 43 | 44 | * Redistributions of source code must retain the above copyright 45 | notice, this list of conditions and the following disclaimer. 46 | * Redistributions in binary form must reproduce the above copyright 47 | notice, this list of conditions and the following disclaimer in 48 | the documentation and/or other materials provided with the 49 | distribution. 50 | * Neither the name of DRS CenGen, LLC nor the names of its 51 | contributors may be used to endorse or promote products derived 52 | from this software without specific prior written permission. 53 | 54 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 55 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 56 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 57 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 58 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 59 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 60 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 61 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 62 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 63 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 64 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 65 | POSSIBILITY OF SUCH DAMAGE. 66 | -------------------------------------------------------------------------------- /Copyright: -------------------------------------------------------------------------------- 1 | COPYING -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | DEMOS=\ 2 | 0 \ 3 | 1 \ 4 | 2 \ 5 | 3 \ 6 | 5 \ 7 | 6 \ 8 | 7 \ 9 | 8 10 | 11 | all: 12 | @for demo in $(DEMOS); do \ 13 | $(MAKE) -C $$demo; \ 14 | done 15 | 16 | clean: 17 | @for demo in $(DEMOS); do \ 18 | $(MAKE) -C $$demo clean; \ 19 | done 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | emane-tutorial 2 | == 3 | 4 | This project is deprecated in favor of [The EMANE Guide](https://emane.io). 5 | 6 | 7 | The emane-tutorial is a guided walk through deploying a series of emulation 8 | configurations and scenarios using the 9 | [EMANE](https://github.com/adjacentlink/emane) emulator. Each demonstration in 10 | this tutorial is designed to highlight specific capabilities of the emulator. 11 | The tutorial provides a simple test flow using LXC Containers to create a set 12 | of test nodes that run emulator instances along with other applications and 13 | services typically used in the MANET world. 14 | 15 | 16 | This project contains the configuration and scripts necessary to run the 17 | tutorial. 18 | 19 | 20 | The full tutorial can be found here: 21 | 22 | https://github.com/adjacentlink/emane-tutorial/wiki 23 | -------------------------------------------------------------------------------- /rules.mk: -------------------------------------------------------------------------------- 1 | # verify TOP_DIR is defined 2 | ifeq ($(origin TOP_DIR), undefined) 3 | $(error TOP_DIR must be defined) 4 | endif 5 | 6 | # Template for emane application XML files 7 | TEMPLATE_PLATFORM ?= $(TOP_DIR)/templates/platform.xml.template 8 | 9 | # Template for emaneeventd application XML files 10 | TEMPLATE_EVENTDAEMON ?= $(TOP_DIR)/templates/eventdaemon.xml.template 11 | 12 | # Template for gpsdlocationagent XML 13 | TEMPLATE_GPSDLOCATIONAGENT ?= $(TOP_DIR)/templates/gpsdlocationagent.xml.template 14 | 15 | # Template for mgen input files 16 | TEMPLATE_MGEN ?= $(TOP_DIR)/templates/mgen.template 17 | 18 | # Template for routing input conf files 19 | TEMPLATE_ROUTING ?= $(TOP_DIR)/templates/routing.conf.template 20 | 21 | # Template for starting demo on remote nodes 22 | TEMPLATE_DEMOSTART ?= $(TOP_DIR)/templates/demo-start.template 23 | 24 | # Template for stopping demo on remote nodes 25 | TEMPLATE_DEMOSTOP ?= $(TOP_DIR)/templates/demo-stop.template 26 | 27 | PLATFORMDEPS=$(GENERATED_PLATFORMS:%=.%-dep) $(PLATFORMS:%=.%-dep) 28 | 29 | # Template for srw radio XML files 30 | TEMPLATE_OTESTPOINTD ?= $(TOP_DIR)/templates/otestpointd.xml.template 31 | 32 | # Template for srw radio XML files 33 | TEMPLATE_OTESTPOINTRECORDER ?= $(TOP_DIR)/templates/otestpoint-recorder.xml.template 34 | 35 | .PHONY: all clean verify 36 | 37 | all: $(GENERATED_EXTRA) $(PLATFORMDEPS) $(GENERATED_EVENTDAEMONS) \ 38 | $(GENERATED_GPSDLOCATIONAGENTS) $(GENERATED_MGENINPUTS) \ 39 | $(GENERATED_ROUTINGCONFS) $(GENERATED_OTESTPOINTDS) \ 40 | $(GENERATED_OTESTPOINTRECORDERS) demo-start demo-stop 41 | $(MAKE) all-local 42 | 43 | all-local: 44 | 45 | verify: 46 | xmllint --noout --valid *.xml 47 | 48 | edit= sed -e 's|@NEMID[@]|$*|g' \ 49 | -e 's|@NODEID[@]|$*|g' \ 50 | -e 's|@NODEIDHEX[@]|$(shell printf "%02x" $*)|g' \ 51 | -e 's|@DEMOID[@]|$(DEMO_ID)|g' \ 52 | -e 's|@NEMXML[@]|$(NEM_XML)|g ' \ 53 | -e 's|@TOPDIR[@]|$(shell dirname $$(pwd))|g' \ 54 | -e 's|@OLSRTXTINFO[@]|$(shell basename \ 55 | $$(find /usr/lib* -name "olsrd_txtinfo.so*" -print 2> /dev/null))|g' \ 56 | -e 's|@NODECOUNT[@]|$(shell if [ -n "$(NODE_COUNT)" ]; \ 57 | then \ 58 | echo $(NODE_COUNT); \ 59 | else \ 60 | echo $(PLATFORMDEPS)| wc -w; \ 61 | fi)|g' 62 | 63 | ifdef GENERATED_PLATFORMS 64 | 65 | platform%.xml: $(TEMPLATE_PLATFORM) 66 | if test -f $@; then chmod u+w $@; fi 67 | $(edit) $< > $@ 68 | chmod g-w,u-w $@ 69 | 70 | endif 71 | 72 | $(PLATFORMDEPS): .%-dep:% 73 | mkdir .emanegentransportxml && \ 74 | cd .emanegentransportxml && \ 75 | emanegentransportxml ../$< && \ 76 | for i in $$(ls *.xml); do chmod g-w,u-w $$i; cp -f $$i ..; done && \ 77 | cd .. && \ 78 | rm -rf .emanegentransportxml 79 | @touch $@ 80 | 81 | eventdaemon%.xml: $(TEMPLATE_EVENTDAEMON) 82 | if test -f $@; then chmod u+w $@; fi 83 | $(edit) $< > $@ 84 | chmod g-w,u-w $@ 85 | 86 | gpsdlocationagent%.xml: $(TEMPLATE_GPSDLOCATIONAGENT) 87 | if test -f $@; then chmod u+w $@; fi 88 | $(edit) $< > $@ 89 | chmod g-w,u-w $@ 90 | 91 | mgen%: $(TEMPLATE_MGEN) 92 | if test -f $@; then chmod u+w $@; fi 93 | $(edit) $< > $@ 94 | chmod g-w,u-w $@ 95 | 96 | routing%.conf: $(TEMPLATE_ROUTING) 97 | if test -f $@; then chmod u+w $@; fi 98 | $(edit) $< > $@ 99 | chmod g-w,u-w $@ 100 | 101 | otestpointd%.xml: $(TEMPLATE_OTESTPOINTD) 102 | if test -f $@; then chmod u+w $@; fi 103 | $(edit) $< > $@ 104 | chmod g-w,u-w $@ 105 | 106 | otestpoint-recorder%.xml: $(TEMPLATE_OTESTPOINTRECORDER) 107 | if test -f $@; then chmod u+w $@; fi 108 | $(edit) $< > $@ 109 | chmod g-w,u-w $@ 110 | 111 | demo-start: $(TEMPLATE_DEMOSTART) 112 | if test -f $@; then chmod u+w $@; fi 113 | $(edit) $< > $@ 114 | chmod g-w,u-w,a+x $@ 115 | 116 | demo-stop: $(TEMPLATE_DEMOSTOP) 117 | if test -f $@; then chmod u+w $@; fi 118 | $(edit) $< > $@ 119 | chmod g-w,u-w,a+x $@ 120 | 121 | %: %.in 122 | if test -f $@; then chmod u+w $@; fi 123 | $(edit) $< > $@ 124 | chmod g-w,u-w $@ 125 | 126 | clean: 127 | if test -n "$(GENERATED_PLATFORMS)"; then rm -f $(GENERATED_PLATFORMS); fi 128 | if test -n "$(GENERATED_EVENTDAEMONS)"; then rm -f $(GENERATED_EVENTDAEMONS); fi 129 | if test -n "$(GENERATED_GPSDLOCATIONAGENTS)"; then rm -f $(GENERATED_GPSDLOCATIONAGENTS); fi 130 | if test -n "$(GENERATED_MGENINPUTS)"; then rm -f $(GENERATED_MGENINPUTS); fi 131 | if test -n "$(GENERATED_ROUTINGCONFS)"; then rm -f $(GENERATED_ROUTINGCONFS); fi 132 | if test -n "$(GENERATED_EXTRA)"; then rm -f $(GENERATED_EXTRA); fi 133 | if test -n "$(GENERATED_OTESTPOINTDS)"; then rm -f $(GENERATED_OTESTPOINTDS); fi 134 | if test -n "$(GENERATED_OTESTPOINTRECORDERS)"; then rm -f $(GENERATED_OTESTPOINTRECORDERS); fi 135 | rm -f transportdaemon[0-9]*.xml 136 | rm -f .*-dep* 137 | rm -rf .emanegentransportxml 138 | rm -rf persist 139 | rm -f demo-start 140 | rm -f demo-stop 141 | $(MAKE) clean-local 142 | 143 | clean-local: 144 | -------------------------------------------------------------------------------- /scripts/demo-init: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | # 3 | # Copyright (c) 2014-2016 - Adjacent Link LLC, Bridgewater, New Jersey 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in 14 | # the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Adjacent Link LLC nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | # POSSIBILITY OF SUCH DAMAGE. 32 | 33 | start_sshd() 34 | { 35 | local pidfile=$1 36 | 37 | /usr/sbin/sshd -o "PidFile=$pidfile" 38 | } 39 | 40 | start_emanetransportd() 41 | { 42 | local xml=$1 43 | local logfile=$2 44 | local pidfile=$3 45 | local uuidfile=$4 46 | 47 | if [ -f $xml ]; then 48 | 49 | echo "Starting emanetransport: $xml" 50 | 51 | emanetransportd -r -d "$xml" -l 3 -f "$logfile" \ 52 | --pidfile "$pidfile" --uuidfile "$uuidfile" 53 | 54 | retval=$? 55 | else 56 | 57 | echo "Missing emaneeventd XML: $xml" 58 | 59 | retval=1 60 | fi 61 | 62 | return $retval 63 | } 64 | 65 | start_emaneeventd_and_wait_for_gpspty() 66 | { 67 | local xml=$1 68 | local logfile=$2 69 | local pidfile=$3 70 | local uuidfile=$4 71 | local pty=$5 72 | 73 | if [ -f $xml ]; then 74 | 75 | echo "Starting emaneeventd: $xml" 76 | 77 | rm -f "$pty" 78 | 79 | emaneeventd -r -d "$xml" -l 3 -f "$logfile" \ 80 | --pidfile "$pidfile" --uuidfile "$uuidfile" 81 | 82 | retval=$? 83 | 84 | if [[ $retval == 0 ]]; then 85 | 86 | echo "Waiting for GPS Locatopn PTY: $pty" 87 | 88 | while (! test -f "$pty") 89 | do 90 | sleep 1 91 | done 92 | fi 93 | 94 | else 95 | echo "Missing emaneeventd XML: $xml" 96 | retval=1 97 | fi 98 | 99 | return $retval 100 | } 101 | 102 | start_emane() 103 | { 104 | local xml=$1 105 | local logfile=$2 106 | local pidfile=$3 107 | local uuidfile=$4 108 | 109 | if [ -f $xml ]; then 110 | 111 | echo "Starting emane: $xml" 112 | 113 | emane "$xml" -r -d -l 3 -f "$logfile" \ 114 | --pidfile "$pidfile" --uuidfile "$uuidfile" 115 | 116 | retval=$? 117 | else 118 | echo "Missing emane XML: $xml" 119 | retval=1 120 | fi 121 | 122 | return $retval 123 | } 124 | 125 | start_routing() 126 | { 127 | local routingconf=$1 128 | olsrd -f "$routingconf" 129 | } 130 | 131 | start_mgen() 132 | { 133 | local mgeninput=$1 134 | local mgenoutput=$2 135 | local pidfile=$3 136 | local logfile=$4 137 | local starttime="$5" 138 | 139 | local startoption="" 140 | 141 | if [ -n "$starttime" ]; then 142 | startoption="start $(date --date "$starttime" "+%H:%M:%S" --utc)GMT" 143 | echo "Starting mgen: input $mgeninput output $mgenoutput $startoption" 144 | else 145 | echo "Starting mgen: input $mgeninput output $mgenoutput now" 146 | fi 147 | 148 | nohup mgen \ 149 | input $mgeninput \ 150 | output $mgenoutput \ 151 | $startoption \ 152 | txlog &> $logfile & 153 | 154 | echo $! > $pidfile 155 | } 156 | 157 | start_otestpointd() 158 | { 159 | local xml=$1 160 | local logfile=$2 161 | local pidfile=$3 162 | local uuidfile=$4 163 | 164 | if [ -f $xml ]; then 165 | 166 | echo "Starting otestpointd: $xml" 167 | 168 | otestpointd "$xml" -d -l 3 -f "$logfile" \ 169 | --pidfile "$pidfile" --uuidfile "$uuidfile" 170 | 171 | retval=$? 172 | else 173 | echo "Missing otestpointd XML: $xml" 174 | retval=1 175 | fi 176 | 177 | return $retval 178 | } 179 | 180 | start_otestpoint_recorder() 181 | { 182 | local xml=$1 183 | local logfile=$2 184 | local pidfile=$3 185 | local uuidfile=$4 186 | 187 | if [ -f $xml ]; then 188 | 189 | echo "Starting otestpoint-recorder: $xml" 190 | 191 | otestpoint-recorder "$xml" -d -l 3 -f "$logfile" \ 192 | --pidfile "$pidfile" --uuidfile "$uuidfile" 193 | 194 | retval=$? 195 | else 196 | echo "Missing otestpoint-recorder XML: $xml" 197 | retval=1 198 | fi 199 | 200 | return $retval 201 | } 202 | 203 | start_otestpoint_broker() 204 | { 205 | local xml=$1 206 | local logfile=$2 207 | local pidfile=$3 208 | local uuidfile=$4 209 | 210 | if [ -f $xml ]; then 211 | 212 | echo "Starting otestpoint-broker: $xml" 213 | 214 | otestpoint-broker "$xml" -d -l 3 -f "$logfile" \ 215 | --pidfile "$pidfile" --uuidfile "$uuidfile" 216 | 217 | retval=$? 218 | else 219 | echo "Missing otestpoint-broker XML: $xml" 220 | retval=1 221 | fi 222 | 223 | return $retval 224 | } 225 | 226 | start_iperf() 227 | { 228 | local inputfile=$1 229 | local logfile=$2 230 | local pidfile=$3 231 | local starttime="$4" 232 | 233 | # iperf servers do not wait for start time 234 | if (! grep -q '\-s ' $inputfile) 235 | then 236 | start=$(date --date "$starttime" "+%s") 237 | 238 | while [[ $(date "+%s") -lt $start ]] 239 | do 240 | sleep 1 241 | done 242 | fi 243 | 244 | echo "Starting iperf: $inputfile at $starttime" 245 | 246 | nohup iperf $(head -n 1 $inputfile) &> $logfile & 247 | 248 | echo $! > $pidfile 249 | } 250 | 251 | start_gpsd() 252 | { 253 | local pty=$1 254 | local pidfile=$2 255 | 256 | echo "Starting gpsd: $pty" 257 | gpsd -P $pidfile -G -n -b `cat $pty` 258 | } 259 | 260 | wait_for_device() 261 | { 262 | local device=$1 263 | local timeout=$2 264 | local waited=0 265 | 266 | echo -n "waiting for $device..." 267 | 268 | while(! route -n | grep -q $device); do 269 | 270 | if [ $waited -lt $timeout ]; then 271 | sleep 1 272 | waited=$(($waited + 1)) 273 | else 274 | echo "not found" 275 | return 1 276 | fi 277 | done 278 | 279 | echo "found" 280 | return 0 281 | } 282 | 283 | wait_for_gpspty() 284 | { 285 | local pty=$1 286 | 287 | echo "Waiting for GPS Locatopn PTY: $pty" 288 | 289 | while (! test -f "$pty") 290 | do 291 | sleep 1 292 | done 293 | echo "found" 294 | return $0 295 | } 296 | 297 | usage() 298 | { 299 | echo 300 | echo " usage: emanedemo-init [OPTIONS]... DEMODIR NODEID" 301 | echo 302 | echo " options:" 303 | echo " -h Print this usage and exit" 304 | echo " -e ENVFILE Environment file to source" 305 | echo " -s STARTTIME Demo scenario start time HH:MM:SS UTC" 306 | echo 307 | } 308 | 309 | 310 | export PATH=$PATH:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin 311 | 312 | starttime= 313 | 314 | # process options 315 | while getopts ":s:e:h" opt; do 316 | case $opt in 317 | s) 318 | starttime="$OPTARG" 319 | ;; 320 | e) 321 | . "$OPTARG" 322 | ;; 323 | h) 324 | usage 325 | exit 0 326 | ;; 327 | \?) 328 | echo "Invalid option: -$OPTARG" >&2 329 | exit 1 330 | ;; 331 | esac 332 | done 333 | 334 | shift $((OPTIND-1)) 335 | 336 | if [ $# -ne 2 ] 337 | then 338 | echo "Invalid number of arguments" >&2 339 | exit 1 340 | fi 341 | 342 | if [ -d "$1" ] 343 | then 344 | cd "$1" 345 | else 346 | echo "Invalid demo directory: $1" >&2 347 | exit 1 348 | fi 349 | 350 | 351 | nodeId=$2 352 | 353 | # fix devpts 354 | mount /dev/pts -o remount,rw,mode=620,ptmxmode=666,gid=5 355 | 356 | if [ -x ./node-prestart ] 357 | then 358 | ./node-prestart $nodeId 359 | elif [ -x node-prestart$nodeId ] 360 | then 361 | ./node-prestart$nodeId $nodeId 362 | fi 363 | 364 | start_sshd $PWD/persist/$nodeId/var/run/ssh.pid 365 | 366 | if [ -f transportdaemon$nodeId.xml ] && 367 | [ ! -f NO-node-emanetransportd$nodeId ] && 368 | [ ! -f NO-node-emanetransportd ] 369 | then 370 | 371 | start_emanetransportd \ 372 | transportdaemon$nodeId.xml \ 373 | $PWD/persist/$nodeId/var/log/transportdaemon.log \ 374 | $PWD/persist/$nodeId/var/run/transportdaemon.pid \ 375 | $PWD/persist/$nodeId/var/run/transportdaemon.uuid 376 | 377 | wait_for_device emane0 10 378 | fi 379 | 380 | if [ -f platform$nodeId.xml ] && 381 | [ ! -f NO-node-emane$nodeId ] && 382 | [ ! -f NO-node-emane ] 383 | then 384 | 385 | start_emane \ 386 | platform$nodeId.xml \ 387 | $PWD/persist/$nodeId/var/log/emane.log \ 388 | $PWD/persist/$nodeId/var/run/emane.pid \ 389 | $PWD/persist/$nodeId/var/run/emane.uuid 390 | 391 | fi 392 | 393 | if [ -f eventdaemon$nodeId.xml ] && 394 | [ ! -f NO-node-emaneeventd$nodeId ] && 395 | [ ! -f NO-node-emaneeventd ] 396 | then 397 | start_emaneeventd_and_wait_for_gpspty \ 398 | eventdaemon$nodeId.xml \ 399 | $PWD/persist/$nodeId/var/log/emaneeventd.log \ 400 | $PWD/persist/$nodeId/var/run/emaneeventd.pid \ 401 | $PWD/persist/$nodeId/var/run/emaneeventd.uuid \ 402 | $PWD/persist/$nodeId/var/run/gps.pty 403 | 404 | start_gpsd \ 405 | $PWD/persist/$nodeId/var/run/gps.pty \ 406 | $PWD/persist/$nodeId/var/run/gpsd.pid 407 | fi 408 | 409 | if [ -f otestpoint-recorder$nodeId.xml ] && 410 | [ ! -f NO-node-otestpoint-recorder$nodeId ] && 411 | [ ! -f NO-node-otestpoint-recorder ] 412 | then 413 | start_otestpoint_recorder \ 414 | otestpoint-recorder$nodeId.xml \ 415 | $PWD/persist/$nodeId/var/log/otestpoint-recorder.log \ 416 | $PWD/persist/$nodeId/var/run/otestpoint-recorder.pid \ 417 | $PWD/persist/$nodeId/var/run/otestpoint-recorder.uuid 418 | fi 419 | 420 | if [ -f otestpoint-broker$nodeId.xml ] && 421 | [ ! -f NO-node-otestpoint-broker$nodeId ] && 422 | [ ! -f NO-node-otestpoint-broker ] 423 | then 424 | start_otestpoint_broker \ 425 | otestpoint-broker$nodeId.xml \ 426 | $PWD/persist/$nodeId/var/log/otestpoint-broker.log \ 427 | $PWD/persist/$nodeId/var/run/otestpoint-broker.pid \ 428 | $PWD/persist/$nodeId/var/run/otestpoint-broker.uuid 429 | fi 430 | 431 | if [ -f otestpointd$nodeId.xml ] && 432 | [ ! -f NO-node-otestpointd$nodeId ] && 433 | [ ! -f NO-node-otestpointd ] 434 | then 435 | start_otestpointd \ 436 | otestpointd$nodeId.xml \ 437 | $PWD/persist/$nodeId/var/log/otestpointd.log \ 438 | $PWD/persist/$nodeId/var/run/otestpointd.pid \ 439 | $PWD/persist/$nodeId/var/run/otestpointd.uuid 440 | fi 441 | 442 | if [ -x ./node-preapplication ] 443 | then 444 | 445 | if [ -f $PWD/persist/$nodeId/var/run/transportdaemon.pid ] 446 | then 447 | wait_for_device emane0 10 448 | fi 449 | 450 | ./node-preapplication $nodeId 451 | elif [ -x node-preapplication$nodeId ] 452 | then 453 | 454 | if [ -f $PWD/persist/$nodeId/var/run/transportdaemon.pid ] 455 | then 456 | wait_for_device emane0 10 457 | fi 458 | 459 | ./node-preapplication$nodeId $nodeId 460 | fi 461 | 462 | if [ -f routing$nodeId.conf ] && 463 | [ ! -f NO-node-routing$nodeId ] && 464 | [ ! -f NO-node-routing ] 465 | then 466 | 467 | if [ -f $PWD/persist/$nodeId/var/run/transportdaemon.pid ] 468 | then 469 | wait_for_device emane0 10 470 | fi 471 | 472 | start_routing routing$nodeId.conf 473 | 474 | elif [ -f routing.conf ] && 475 | [ ! -f NO-node-routing$nodeId ] && 476 | [ ! -f NO-node-routing ] 477 | then 478 | 479 | if [ -f $PWD/persist/$nodeId/var/run/transportdaemon.pid ] 480 | then 481 | wait_for_device emane0 10 482 | fi 483 | 484 | start_routing routing.conf 485 | 486 | fi 487 | 488 | if [ -f mgen$nodeId ] && 489 | [ ! -f NO-node-mgen$nodeId ] && 490 | [ ! -f NO-node-mgen ] 491 | then 492 | 493 | if [ -f $PWD/persist/$nodeId/var/run/transportdaemon.pid ] 494 | then 495 | wait_for_device emane0 10 496 | fi 497 | 498 | start_mgen \ 499 | mgen$nodeId \ 500 | $PWD/persist/$nodeId/var/log/mgen.out \ 501 | $PWD/persist/$nodeId/var/run/mgen.pid \ 502 | $PWD/persist/$nodeId/var/log/mgen.log \ 503 | "$starttime" 504 | 505 | elif [ -f mgen ] && 506 | [ ! -f NO-node-mgen$nodeId ] && 507 | [ ! -f NO-node-mgen ] 508 | then 509 | 510 | if [ -f $PWD/persist/$nodeId/var/run/transportdaemon.pid ] 511 | then 512 | wait_for_device emane0 10 513 | fi 514 | 515 | start_mgen \ 516 | mgen \ 517 | $PWD/persist/$nodeId/var/log/mgen.out \ 518 | $PWD/persist/$nodeId/var/run/mgen.pid \ 519 | $PWD/persist/$nodeId/var/log/mgen.log \ 520 | "$starttime" 521 | fi 522 | 523 | if [ -f iperf$nodeId ] && 524 | [ ! -f NO-node-iperf$nodeId ] && 525 | [ ! -f NO-node-iperf ] 526 | then 527 | 528 | if [ -f $PWD/persist/$nodeId/var/run/transportdaemon.pid ] 529 | then 530 | wait_for_device emane0 10 531 | fi 532 | 533 | start_iperf \ 534 | iperf$nodeId \ 535 | $PWD/persist/$nodeId/var/log/iperf.log \ 536 | $PWD/persist/$nodeId/var/run/iperf.pid \ 537 | "$starttime" 538 | 539 | elif [ -f iperf ] && 540 | [ ! -f NO-node-iperf$nodeId ] && 541 | [ ! -f NO-node-iperf ] 542 | then 543 | 544 | if [ -f $PWD/persist/$nodeId/var/run/transportdaemon.pid ] 545 | then 546 | wait_for_device emane0 10 547 | fi 548 | 549 | start_iperf \ 550 | iperf \ 551 | $PWD/persist/$nodeId/var/log/iperf.log \ 552 | $PWD/persist/$nodeId/var/run/iperf.pid \ 553 | "$starttime" 554 | fi 555 | 556 | if [ -x ./node-poststart ] 557 | then 558 | ./node-poststart $nodeId 559 | elif [ -x node-poststart$nodeId ] 560 | then 561 | ./node-poststart$nodeId $nodeId 562 | fi 563 | -------------------------------------------------------------------------------- /scripts/democtl-host: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | # 3 | # Copyright (c) 2014-2016,2018 - Adjacent Link LLC, Bridgewater, 4 | # New Jersey 5 | # All rights reserved. 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions 9 | # are met: 10 | # 11 | # * Redistributions of source code must retain the above copyright 12 | # notice, this list of conditions and the following disclaimer. 13 | # * Redistributions in binary form must reproduce the above copyright 14 | # notice, this list of conditions and the following disclaimer in 15 | # the documentation and/or other materials provided with the 16 | # distribution. 17 | # * Neither the name of Adjacent Link LLC nor the names of its 18 | # contributors may be used to endorse or promote products derived 19 | # from this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | 34 | prefix=node- 35 | bridge=emanenode0 36 | bridgecontrol=1 37 | lxcmajorversion= 38 | 39 | lxcmajorversion=$(lxc-stop --version | awk -F. '{print $1}') 40 | 41 | check_bridge() 42 | { 43 | return $(brctl show | awk "/^$1[\t\s]+/{exit 1}") 44 | } 45 | 46 | check_euid() 47 | { 48 | if [ $EUID -ne 0 ] 49 | then 50 | echo "You need to be root to perform this command." 51 | exit 1 52 | fi 53 | } 54 | 55 | start_emaneeventservice() 56 | { 57 | local xml=$1 58 | local logfile=$2 59 | local pidfile=$3 60 | local uuidfile=$4 61 | local starttime="$5" 62 | 63 | local startoption="" 64 | 65 | if [ -n "$starttime" ]; then 66 | startoption="--starttime $(date --date "$starttime" "+%H:%M:%S")" 67 | fi 68 | 69 | if [ -f $xml ]; then 70 | 71 | echo "Starting emaneeventservice: $xml at $starttime" 72 | 73 | emaneeventservice -d "$xml" -l 3 -f "$logfile" \ 74 | --pidfile "$pidfile" --uuidfile "$uuidfile" \ 75 | $startoption 76 | 77 | retval=$? 78 | else 79 | 80 | echo "Missing emaneeventservice XML: $xml" 81 | 82 | retval=1 83 | fi 84 | 85 | return $retval 86 | } 87 | 88 | start_emane() 89 | { 90 | local xml=$1 91 | local logfile=$2 92 | local pidfile=$3 93 | local uuidfile=$4 94 | 95 | if [ -f $xml ]; then 96 | 97 | echo "Starting emane: $xml" 98 | 99 | emane "$xml" -r -d -l 3 -f "$logfile" \ 100 | --pidfile "$pidfile" --uuidfile "$uuidfile" 101 | 102 | retval=$? 103 | else 104 | echo "Missing emane XML: $xml" 105 | retval=1 106 | fi 107 | 108 | return $retval 109 | } 110 | 111 | start_emanetransportd() 112 | { 113 | local xml=$1 114 | local logfile=$2 115 | local pidfile=$3 116 | local uuidfile=$4 117 | 118 | if [ -f $xml ]; then 119 | 120 | echo "Starting emanetransport: $xml" 121 | 122 | emanetransportd -r -d "$xml" -l 3 -f "$logfile" \ 123 | --pidfile "$pidfile" --uuidfile "$uuidfile" 124 | 125 | retval=$? 126 | else 127 | 128 | echo "Missing emaneeventd XML: $xml" 129 | 130 | retval=1 131 | fi 132 | 133 | return $retval 134 | } 135 | 136 | start_otestpoint_broker() 137 | { 138 | local xml=$1 139 | local logfile=$2 140 | local pidfile=$3 141 | local uuidfile=$4 142 | 143 | if [ -f $xml ]; then 144 | 145 | echo "Starting otestpoint-broker: $xml" 146 | 147 | otestpoint-broker "$xml" -d -l 3 -f "$logfile" \ 148 | --pidfile "$pidfile" --uuidfile "$uuidfile" 149 | 150 | retval=$? 151 | else 152 | echo "Missing otestpoint-broker XML: $xml" 153 | retval=1 154 | fi 155 | 156 | return $retval 157 | } 158 | 159 | wait_for_device() 160 | { 161 | local device=$1 162 | local timeout=$2 163 | local waited=0 164 | 165 | echo -n "waiting for $device..." 166 | 167 | while(! ip link show | grep -q $device); do 168 | 169 | if [ $waited -lt $timeout ]; then 170 | sleep 1 171 | waited=$(($waited + 1)) 172 | else 173 | echo "not found" 174 | return 1 175 | fi 176 | done 177 | 178 | echo "found" 179 | return 0 180 | } 181 | 182 | usage() 183 | { 184 | echo 185 | echo " usage: democtl-host start [START OPTIONS]... TOPDIR DEMOID NUMBER_NODES" 186 | echo " democtl-host stop [STOP OPTIONS]... TOPDIR DEMOID NUMBER_NODES" 187 | echo " democtl-host help" 188 | echo 189 | echo " start options:" 190 | echo " -s STARTTIME Demo scenario start time HH:MM:SS or any 'date' command" 191 | echo " syntax (i.e. 'now + 30 sec')" 192 | echo " -e ENVFILE Environment file to source" 193 | echo " -n Do not control the bridge" 194 | echo 195 | echo " stop options:" 196 | echo " -e ENVFILE Environment file to source" 197 | echo " -n Do not control the bridge" 198 | echo 199 | } 200 | 201 | if [ $EUID -ne 0 ] 202 | then 203 | echo "You need to be root to perform this command." 204 | exit 1 205 | fi 206 | 207 | case "$1" in 208 | start) 209 | starttime= 210 | envcommand= 211 | 212 | OPTIND=2 213 | 214 | # process options 215 | while getopts ":s:e:n" opt; do 216 | case $opt in 217 | n) 218 | bridgecontrol=0 219 | ;; 220 | s) 221 | echo "starttime=$OPTARG" 222 | starttime="$OPTARG" 223 | ;; 224 | e) 225 | envcommand="-e $OPTARG" 226 | . "$OPTARG" 227 | ;; 228 | \?) 229 | echo "Invalid option: -$OPTARG" >&2 230 | exit 1 231 | ;; 232 | esac 233 | done 234 | 235 | shift $((OPTIND - 1)) 236 | 237 | if [ $# -ne 3 ] 238 | then 239 | echo "Invalid number of parameters $@" >&2 240 | exit 1 241 | fi 242 | 243 | shopt -s extglob 244 | topdir=$1 245 | demoid=$2 246 | nodecount=$3 247 | 248 | if [[ $demoid != +([0-9]) ]] 249 | then 250 | echo "Invalid demo id: $demoid" >&2 251 | exit 1 252 | fi 253 | 254 | if [[ $nodecount != +([0-9]) ]] 255 | then 256 | echo "Invalid node count: nodecount" >&2 257 | exit 1 258 | fi 259 | 260 | if [ -z "$starttime" ] 261 | then 262 | starttime=$(date -R --date "now + 40 sec") 263 | else 264 | starttime=$(date --date "$starttime" "+%H:%M:%S") 265 | fi 266 | 267 | utctime=$(date -R --date="$starttime" --utc) 268 | 269 | if [ ! -d $nodevolume ] 270 | then 271 | echo "Node volume does not exist: $nodevolume" >&2 272 | exit 1 273 | fi 274 | 275 | 276 | mkdir -p persist/host/var/log 277 | mkdir -p persist/host/var/run 278 | 279 | if [ -n "$SUDO_USER" ] 280 | then 281 | chown -R $SUDO_USER:`id -gn $SUDO_USER` persist 282 | fi 283 | 284 | if [ -f /var/run/demo.lock ] 285 | then 286 | echo "Demo example $(cat /var/run/demo.lock) already running" >&2 287 | echo "Run './demo-stop' first" >&2 288 | exit 1 289 | else 290 | echo $demoid > /var/run/demo.lock 291 | fi 292 | 293 | if [[ $bridgecontrol -ne 0 ]] 294 | then 295 | if (check_bridge $bridge) 296 | then 297 | echo "Creating bridge: $bridge" 298 | 299 | brctl addbr $bridge 300 | 301 | wait_for_device $bridge 10 302 | 303 | ip link set $bridge up 304 | 305 | sleep 1 306 | 307 | ip addr add 10.99.0.100/24 dev $bridge 308 | 309 | iptables -I INPUT -i $bridge -j ACCEPT 310 | 311 | iptables -I FORWARD -i $bridge -j ACCEPT 312 | else 313 | echo "Found bridge: $bridge" 314 | fi 315 | fi 316 | 317 | # disable realtime scheduling contraints 318 | sysctl kernel.sched_rt_runtime_us=-1 319 | 320 | for nodeid in $(seq 1 $nodecount) 321 | do 322 | mkdir -p persist/$nodeid/var/log 323 | mkdir -p persist/$nodeid/var/run 324 | rm -f persist/$nodeid/var/log/* 325 | rm -f persist/$nodeid/var/run/* 326 | 327 | if [ -n "$SUDO_USER" ] 328 | then 329 | chown -R $SUDO_USER:`id -gn $SUDO_USER` persist/$nodeid 330 | fi 331 | 332 | name=$prefix$nodeid 333 | hex=$(printf "%02x" $nodeid) 334 | 335 | if [[ $lxcmajorversion -ge 3 ]] 336 | then 337 | cat < persist/$nodeid/var/run/lxc.conf.$nodeid 338 | lxc.uts.name=$name 339 | lxc.net.0.type=veth 340 | lxc.net.0.name=eth1 341 | lxc.net.0.flags=up 342 | lxc.net.0.link=$bridge 343 | lxc.net.0.hwaddr=02:00:$hex:01:00:01 344 | lxc.net.0.ipv4.address=10.99.0.$nodeid/24 345 | lxc.net.0.veth.pair=veth$nodeid.1 346 | 347 | lxc.net.1.type=veth 348 | lxc.net.1.name=eth2 349 | lxc.net.1.hwaddr=02:00:$hex:02:00:01 350 | lxc.net.1.veth.pair=veth$nodeid.2 351 | 352 | lxc.net.2.type = empty 353 | 354 | lxc.console.path = none 355 | lxc.tty.max = 1 356 | lxc.pty.max = 128 357 | lxc.mount.auto = proc sys cgroup 358 | 359 | lxc.autodev = 1 360 | lxc.hook.autodev = $topdir/$demoid/persist/$nodeid/var/run/lxc.hook.autodev.sh 361 | lxc.apparmor.profile = unconfined 362 | 363 | EOF 364 | elif [[ $lxcmajorversion -eq 2 ]] || [[ $lxcmajorversion -eq 1 ]] 365 | then 366 | cat < persist/$nodeid/var/run/lxc.conf.$nodeid 367 | lxc.utsname=$name 368 | lxc.network.type=veth 369 | lxc.network.name=eth1 370 | lxc.network.flags=up 371 | lxc.network.link=$bridge 372 | lxc.network.hwaddr=02:00:$hex:01:00:01 373 | lxc.network.ipv4=10.99.0.$nodeid/24 374 | lxc.network.veth.pair=veth$nodeid.1 375 | 376 | lxc.network.type=veth 377 | lxc.network.name=eth2 378 | lxc.network.hwaddr=02:00:$hex:02:00:01 379 | lxc.network.veth.pair=veth$nodeid.2 380 | 381 | lxc.network.type = empty 382 | lxc.network.flags=up 383 | 384 | lxc.console = none 385 | lxc.tty = 1 386 | lxc.pts = 128 387 | lxc.cgroup.devices.allow = a 388 | 389 | lxc.autodev = 1 390 | lxc.hook.autodev = $topdir/$demoid/persist/$nodeid/var/run/lxc.hook.autodev.sh 391 | lxc.aa_profile = unconfined 392 | EOF 393 | 394 | else 395 | echo "Unsupported LXC version" >&2 396 | exit 1 397 | fi 398 | 399 | cat < persist/$nodeid/var/run/lxc.hook.autodev.sh 400 | #!/bin/bash - 401 | if ! [ -c /dev/net/tun ]; then 402 | mkdir -p /dev/net 403 | mknod -m 666 /dev/net/tun c 10 200 404 | fi 405 | 406 | EOF 407 | chmod a+x persist/$nodeid/var/run/lxc.hook.autodev.sh 408 | 409 | echo "Starting lxc instance: $name" 410 | 411 | lxc-execute -f persist/$nodeid/var/run/lxc.conf.$nodeid \ 412 | -n $name \ 413 | -o persist/$nodeid/var/log/lxc-execute.log.$nodeid \ 414 | -- \ 415 | ../scripts/demo-init \ 416 | -s "$utctime" \ 417 | $envcommand \ 418 | "$topdir/$demoid" \ 419 | $nodeid 2> /dev/null & 420 | 421 | while (! test -f persist/$nodeid/var/log/lxc-execute.log.$nodeid) 422 | do 423 | sleep 1 424 | done 425 | 426 | done 427 | 428 | if [ -f transportdaemon.xml ] && 429 | [ ! -f NO-host-emanetransportd ] 430 | then 431 | 432 | start_emanetransportd \ 433 | transportdaemon.xml \ 434 | persist/host/var/log/transportdaemon.log \ 435 | persist/host/var/run/transportdaemon.pid \ 436 | persist/host/var/run/transportdaemon.uuid 437 | fi 438 | 439 | if [ -f platform.xml ] && 440 | [ ! -f NO-host-emane ] 441 | then 442 | 443 | start_emane \ 444 | platform.xml \ 445 | persist/host/var/log/emane.log \ 446 | persist/host/var/run/emane.pid \ 447 | persist/host/var/run/emane.uuid 448 | fi 449 | 450 | if [ ! -f persist/host/var/run/emaneeventservice.pid ] 451 | then 452 | if [ -f eventservice.xml ] && 453 | [ ! -f NO-host-emaneeventservice ] 454 | then 455 | start_emaneeventservice eventservice.xml \ 456 | persist/host/var/log/emaneeventservice.log \ 457 | persist/host/var/run/emaneeventservice.pid \ 458 | persist/host/var/run/emaneeventservice.uuid \ 459 | "$starttime" 460 | fi 461 | else 462 | echo "Found an emaneeventservice pid file: unable to start" >&2 463 | fi 464 | 465 | if [ -f otestpoint-broker.xml ] && 466 | [ ! -f NO-host-otestpoint-broker ] 467 | then 468 | start_otestpoint_broker \ 469 | otestpoint-broker.xml \ 470 | persist/host/var/log/otestpoint-broker.log \ 471 | persist/host/var/run/otestpoint-broker.pid \ 472 | persist/host/var/run/otestpoint-broker.uuid 473 | fi 474 | 475 | if [ -x host-poststart ] 476 | then 477 | ./host-poststart $demoid $nodecount 478 | fi 479 | ;; 480 | 481 | stop) 482 | OPTIND=2 483 | 484 | # process options 485 | while getopts ":ne:" opt; do 486 | case $opt in 487 | n) 488 | bridgecontrol=0 489 | ;; 490 | e) 491 | envcommand="-e $OPTARG" 492 | . "$OPTARG" 493 | ;; 494 | \?) 495 | echo "Invalid option: -$OPTARG" >&2 496 | exit 1 497 | ;; 498 | esac 499 | done 500 | 501 | shift $((OPTIND - 1)) 502 | 503 | if [ $# -ne 3 ] 504 | then 505 | echo "Invalid number of parameters" >&2 506 | exit 1 507 | fi 508 | 509 | shopt -s extglob 510 | topdir=$1 511 | demoid=$2 512 | nodecount=$3 513 | 514 | if [[ $demoid != +([0-9]) ]] 515 | then 516 | echo "Invalid demo id: $demoid" >&2 517 | exit 1 518 | fi 519 | 520 | if [[ $nodecount != +([0-9]) ]] 521 | then 522 | echo "Invalid node count: nodecount" >&2 523 | exit 1 524 | fi 525 | 526 | if [ ! -f /var/run/demo.lock ] 527 | then 528 | echo "There does not appear to be a running demo. No /var/run/demo.lock present." >&2 529 | exit 1 530 | fi 531 | 532 | 533 | if [ -x ./host-prestop ] 534 | then 535 | ./host-prestop $demoid $nodecount 536 | fi 537 | 538 | for nodeid in $(seq 1 $nodecount) 539 | do 540 | echo "Stopping lxc instance: $prefix$nodeid" 541 | lxc-stop -n $prefix$nodeid -k 542 | done 543 | 544 | if [ -f persist/host/var/run/otestpoint-broker.pid ] 545 | then 546 | kill -QUIT $(cat persist/host/var/run/otestpoint-broker.pid) 547 | rm -f persist/host/var/run/otestpoint-broker.pid 548 | fi 549 | 550 | if [ -f persist/host/var/run/emaneeventservice.pid ] 551 | then 552 | kill -QUIT $(cat persist/host/var/run/emaneeventservice.pid) 553 | rm -f persist/host/var/run/emaneeventservice.pid 554 | fi 555 | 556 | if [ -f persist/host/var/run/emane.pid ] 557 | then 558 | kill -QUIT $(cat persist/host/var/run/emane.pid) 559 | rm -f persist/host/var/run/emane.pid 560 | fi 561 | 562 | if [ -f persist/host/var/run/transportdaemon.pid ] 563 | then 564 | kill -QUIT $(cat persist/host/var/run/transportdaemon.pid) 565 | rm -f persist/host/var/run/transportdaemon.pid 566 | fi 567 | 568 | if [[ $bridgecontrol -ne 0 ]] 569 | then 570 | if (! check_bridge $bridge) 571 | then 572 | echo "Removing bridge: $bridge" 573 | 574 | ip link set $bridge down 575 | 576 | brctl delbr $bridge 577 | 578 | iptables -D INPUT -i $bridge -j ACCEPT 579 | 580 | iptables -D FORWARD -i $bridge -j ACCEPT 581 | fi 582 | fi 583 | 584 | sleep 2 585 | 586 | for vif in $(ip link show | awk -F : '/veth[0-9]+\.[0-9]/{gsub(/@if[0-9]+/,"",$2); print $2;}') 587 | do 588 | echo "Performing extra cleanup of vif $vif" 589 | ip link del dev $vif 2>&1 > /dev/null 590 | done 591 | 592 | # paranoia - make sure everything is down 593 | for i in $(ps ax | awk '/emaneeventservic[e] /{print $1}') 594 | do 595 | echo "Performing extra cleanup of emaneeventservice [$i]" 596 | kill -9 $i; 597 | done 598 | 599 | for i in $(ps ax | awk '/emanetransport[d] /{print $1}') 600 | do 601 | echo "Performing extra cleanup of emanetransportd [$i]" 602 | kill -9 $i; 603 | done 604 | 605 | for i in $(ps ax | awk '/eman[e] /{print $1}') 606 | do 607 | echo "Performing extra cleanup of emane [$i]" 608 | kill -9 $i; 609 | done 610 | 611 | if [ -x ./host-poststop ] 612 | then 613 | ./host-poststop $demoid $nodecount 614 | fi 615 | 616 | rm -f /var/run/demo.lock 617 | ;; 618 | 619 | help) 620 | usage 621 | exit 0 622 | ;; 623 | *) 624 | usage 625 | exit 1 626 | ;; 627 | esac 628 | -------------------------------------------------------------------------------- /scripts/olsrlinkview.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright (c) 2014 - Adjacent Link LLC, Bridgewater, New Jersey 4 | # Copyright (c) 2012 - DRS CenGen, LLC, Columbia, Maryland 5 | # All rights reserved. 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions 9 | # are met: 10 | # 11 | # * Redistributions of source code must retain the above copyright 12 | # notice, this list of conditions and the following disclaimer. 13 | # * Redistributions in binary form must reproduce the above copyright 14 | # notice, this list of conditions and the following disclaimer in 15 | # the documentation and/or other materials provided with the 16 | # distribution. 17 | # * Neither the name of DRS CenGen, LLC nor the names of its 18 | # contributors may be used to endorse or promote products derived 19 | # from this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | from __future__ import absolute_import, division, print_function 35 | import pycurl 36 | import re 37 | import sys 38 | import threading 39 | import os 40 | import time 41 | import telnetlib 42 | import json 43 | from lxml import etree 44 | from optparse import OptionParser 45 | from pynodestatviz import NodeStatViz 46 | 47 | 48 | usage = "%prog [OPTION]... " 49 | 50 | optionParser = OptionParser(usage=usage) 51 | 52 | optionParser.add_option("", 53 | "--location", 54 | action="store", 55 | type="string", 56 | dest="locations", 57 | metavar="FILE", 58 | default=os.path.join(os.environ['HOME'],'.pynodestatviz-locations.xml'), 59 | help="File containing initial node screen locations [default: %default]") 60 | 61 | (options, args) = optionParser.parse_args() 62 | 63 | if len(args) != 0 : 64 | print("invalid number of arguments", file=sys.stderr) 65 | exit(1) 66 | 67 | class Stoppable(): 68 | def __init__(self): 69 | self._running = True 70 | self._runningLock = threading.Lock() 71 | 72 | def stop(self): 73 | self._runningLock.acquire() 74 | self._running = False 75 | self._runningLock.release() 76 | 77 | def _checkRunning(self): 78 | self._runningLock.acquire() 79 | running = self._running 80 | self._runningLock.release() 81 | return running 82 | 83 | class NodeTextInfoThread(threading.Thread,Stoppable): 84 | def __init__(self,nodeId,links,lock): 85 | threading.Thread.__init__(self) 86 | Stoppable.__init__(self) 87 | self._nodeId = nodeId 88 | self._links = links 89 | self._lock = lock 90 | 91 | def _processInfo(self,buf): 92 | self._lock.acquire() 93 | 94 | if self._nodeId not in self._links: 95 | self._links[self._nodeId] = {'addr' : None} 96 | 97 | self._links[self._nodeId]['links'] = {} 98 | self._links[self._nodeId]['valid'] = True 99 | self._links[self._nodeId]['aka'] = [] 100 | 101 | for line in buf.decode('ascii').split("\n"): 102 | m = re.match(r"^(\d+.\d+\.\d+\.\d+)\s+(\d+.\d+\.\d+\.\d+)\s+"\ 103 | "(\d+\.\d+)\s+(\d+\.\d+)\s+"\ 104 | "(\d+\.\d+)\s+(\d+\.\d+)",line) 105 | 106 | if m: 107 | if m.group(1) not in self._links: 108 | self._links[self._nodeId]['addr'] = m.group(1) 109 | 110 | self._links[self._nodeId]['links'][m.group(2)] = \ 111 | { 112 | 'hyst' : float(m.group(3)), 113 | 'lq' : float(m.group(4)), 114 | 'nlq' : float(m.group(5)), 115 | 'cost' : float(m.group(6)), 116 | } 117 | 118 | 119 | self._links[self._nodeId]['addr'] = m.group(1) 120 | 121 | if m.group(1) not in self._links[self._nodeId]['aka']: 122 | self._links[self._nodeId]['aka'].append(m.group(1)) 123 | 124 | self._lock.release() 125 | 126 | 127 | def run(self): 128 | while self._checkRunning(): 129 | c = pycurl.Curl() 130 | c.setopt(pycurl.CONNECTTIMEOUT, 1) 131 | c.setopt(pycurl.TIMEOUT, 1) 132 | c.setopt(pycurl.NOSIGNAL, 1) 133 | c.setopt(pycurl.URL, "http://node-%d:2006/lin" %(self._nodeId)) 134 | c.setopt(pycurl.WRITEFUNCTION, self._processInfo) 135 | 136 | try: 137 | c.perform() 138 | 139 | time.sleep(2) 140 | except pycurl.error as error: 141 | # txtinfo was resetting conneciton 142 | if error.args[0] == 56: 143 | time.sleep(2) 144 | else: 145 | self._lock.acquire() 146 | 147 | if self._nodeId not in self._links: 148 | self._links[self._nodeId] = {'addr': None} 149 | 150 | self._links[self._nodeId]['links'] = {} 151 | self._links[self._nodeId]['valid'] = False 152 | 153 | self._lock.release() 154 | 155 | time.sleep(1) 156 | 157 | 158 | class NodeGPSDThread(threading.Thread,Stoppable): 159 | def __init__(self,nodeId,locations,lock): 160 | threading.Thread.__init__(self) 161 | Stoppable.__init__(self) 162 | self._nodeId = nodeId 163 | self._locations = locations 164 | self._lock = lock 165 | 166 | def run(self): 167 | while self._checkRunning(): 168 | try: 169 | session = telnetlib.Telnet("node-%d"%self._nodeId,2947,5) 170 | 171 | session.write("?WATCH={\"enable\":true,\"json\":true}\n".encode('ascii')) 172 | 173 | while self._checkRunning(): 174 | (_,_,line) = session.expect([b".+\n"],timeout=2) 175 | 176 | # fix a json message bug in some versions of gpsd 177 | line = line.replace(b'"parity":"}',b'"parity":""}') 178 | 179 | data = json.loads(line.rstrip()) 180 | 181 | if 'lat' in data: 182 | self._lock.acquire() 183 | 184 | if self._nodeId not in self._locations: 185 | self._locations[self._nodeId] = None 186 | 187 | self._locations[self._nodeId] = (data['lat'],data['lon'],data['alt']) 188 | 189 | self._lock.release() 190 | except: 191 | self._locations[self._nodeId] = None 192 | time.sleep(1) 193 | 194 | 195 | class DisplayUpdate(threading.Thread,Stoppable): 196 | def __init__(self,app,links,linksLock,locations,locationsLock): 197 | threading.Thread.__init__(self) 198 | Stoppable.__init__(self) 199 | self._app = app 200 | self._links = links 201 | self._linksLock = linksLock 202 | self._locations = locations 203 | self._locationsLock = locationsLock 204 | 205 | def run(self): 206 | knownNodes = {} 207 | 208 | while self._checkRunning(): 209 | rootElement = etree.Element("nodestatviz") 210 | titleElement = etree.SubElement(rootElement, 211 | "title", 212 | text="OLSR Link Viewer with GPS Info") 213 | 214 | 215 | nodesElement = etree.SubElement(rootElement, "nodes") 216 | nodeInfo = {} 217 | foundNodes = [] 218 | addressMap = {} 219 | 220 | self._linksLock.acquire() 221 | 222 | for node in sorted(self._links.keys()): 223 | foundNodes.append(node) 224 | 225 | if self._links[node]['addr']: 226 | name = str(self._links[node]['addr']) 227 | else: 228 | name = str(node) 229 | 230 | if self._links[node]['valid']: 231 | color = 'green' 232 | else: 233 | color = 'red' 234 | 235 | etree.SubElement(nodesElement, "node", name=name, color=color) 236 | 237 | nodeInfo[node] = {'valid' : self._links[node]['valid'], 238 | 'links' : 0} 239 | 240 | if self._links[node]['addr']: 241 | addressMap[self._links[node]['addr']] = node 242 | 243 | for addr in self._links[node]['aka']: 244 | addressMap[addr] = node 245 | 246 | edgesElement = etree.SubElement(rootElement, "edges") 247 | 248 | for node in sorted(self._links.keys()): 249 | for neighbor in sorted(self._links[node]['links'].keys()): 250 | if neighbor in addressMap and self._links[node]['addr'] in addressMap: 251 | lq = self._links[node]['links'][neighbor]['lq'] 252 | 253 | if lq >= .75: 254 | color = 'black' 255 | elif lq >= .5: 256 | color = 'blue' 257 | elif lq >=.25: 258 | color = 'yellow' 259 | else: 260 | color = 'red' 261 | 262 | if self._links[node]['addr'] in self._links[addressMap[neighbor]]['links']: 263 | lq = self._links[addressMap[neighbor]]['links'][self._links[node]['addr']]['lq'] 264 | 265 | if lq >= .75: 266 | color2 = 'black' 267 | elif lq >= .5: 268 | color2 = 'blue' 269 | elif lq >=.25: 270 | color2 = 'yellow' 271 | else: 272 | color2 = 'red' 273 | else: 274 | color2 = color 275 | 276 | etree.SubElement(edgesElement, 277 | "edge", 278 | src=self._links[node]['addr'], 279 | dst=self._links[addressMap[neighbor]]['addr'], 280 | style="solid_to_dash", 281 | color=color, 282 | color2=color2) 283 | 284 | nodeInfo[node]['links'] += 1 285 | 286 | self._linksLock.release() 287 | 288 | tableElement = etree.SubElement(rootElement, "table") 289 | 290 | headerElement = etree.SubElement(tableElement, "header") 291 | 292 | etree.SubElement(headerElement, "column", text="Node", width="15", background="dark gray",) 293 | 294 | etree.SubElement(headerElement, "column", text="Links", width="5",background="dark gray") 295 | 296 | etree.SubElement(headerElement, "column", text="Latitude", background="dark gray") 297 | 298 | etree.SubElement(headerElement, "column", text="Longitude",background="dark gray") 299 | 300 | etree.SubElement(headerElement, "column", text="Altitude", background="dark gray") 301 | 302 | rowsElement = etree.SubElement(tableElement, "rows") 303 | 304 | for node in nodeInfo: 305 | if self._links[node]['addr']: 306 | name = str(self._links[node]['addr']) 307 | else: 308 | name = str(node) 309 | 310 | rowElement = etree.SubElement(rowsElement, "row") 311 | if nodeInfo[node]['valid']: 312 | background = 'white' 313 | else: 314 | background = 'red' 315 | 316 | etree.SubElement(rowElement, "column", text=name,background=background) 317 | etree.SubElement(rowElement, "column", text=str(nodeInfo[node]['links']),background=background) 318 | 319 | self._locationsLock.acquire() 320 | lat = "" 321 | lon = "" 322 | alt = "" 323 | 324 | if node in self._locations: 325 | 326 | pos = self._locations[node] 327 | 328 | if pos: 329 | if pos[0]: 330 | lat = pos[0] 331 | 332 | if pos[1]: 333 | lon = pos[1] 334 | 335 | if pos[2]: 336 | alt = pos[2] 337 | 338 | self._locationsLock.release() 339 | 340 | etree.SubElement(rowElement, "column", text=str(lat),background=background) 341 | 342 | etree.SubElement(rowElement, "column", text=str(lon),background=background) 343 | 344 | etree.SubElement(rowElement, "column", text=str(alt),background=background) 345 | 346 | update=etree.tostring(rootElement,pretty_print=True) 347 | 348 | self._app.update(update) 349 | 350 | time.sleep(2) 351 | 352 | links = {} 353 | 354 | app = NodeStatViz(options.locations) 355 | 356 | linksLock = threading.Lock() 357 | threads = [] 358 | 359 | for i in range(1,11): 360 | t = NodeTextInfoThread(i,links,linksLock) 361 | t.start() 362 | threads.append(t) 363 | 364 | locations = {} 365 | 366 | locationsLock = threading.Lock() 367 | 368 | for i in range(1,11): 369 | t = NodeGPSDThread(i,locations,locationsLock) 370 | t.start() 371 | threads.append(t) 372 | 373 | displayThread = DisplayUpdate(app,links,linksLock,locations,locationsLock) 374 | 375 | displayThread.start() 376 | threads.append(displayThread) 377 | 378 | app.mainloop() 379 | 380 | for t in threads: 381 | t.stop() 382 | 383 | for t in threads: 384 | t.join() 385 | 386 | exit(0) 387 | 388 | 389 | 390 | -------------------------------------------------------------------------------- /templates/demo-start.template: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | ../scripts/democtl-host start "$@" "@TOPDIR@" @DEMOID@ @NODECOUNT@ 4 | -------------------------------------------------------------------------------- /templates/demo-stop.template: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | ../scripts/democtl-host stop "$@" "@TOPDIR@" @DEMOID@ @NODECOUNT@ 4 | -------------------------------------------------------------------------------- /templates/eventdaemon.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /templates/gpsdlocationagent.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /templates/otestpoint-recorder.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /templates/platform.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /templates/routing.conf.template: -------------------------------------------------------------------------------- 1 | # 2 | # olsr.org OLSR daemon config file 3 | # 4 | # Lines starting with a # are discarded 5 | # 6 | # This file was shipped with olsrd 0.X.X 7 | # 8 | # This file is an example of a typical 9 | # configuration using the LQ extention 10 | 11 | # Debug level(0-9) 12 | # If set to 0 the daemon runs in the background 13 | 14 | DebugLevel 0 15 | 16 | # IP version to use (4 or 6) 17 | 18 | IpVersion 4 19 | 20 | LockFile "@TOPDIR@/@DEMOID@/persist/@NODEID@/var/run/olsrd.lock" 21 | 22 | # Clear the screen each time the internal state changes 23 | 24 | ClearScreen yes 25 | 26 | LinkQualityAging 0.2 27 | 28 | Interface "emane0" "emane1" 29 | { 30 | HelloInterval 1.0 31 | HelloValidityTime 5.0 32 | } 33 | 34 | LoadPlugin "@OLSRTXTINFO@" 35 | { 36 | PlParam "accept" "0.0.0.0" 37 | } 38 | 39 | LoadPlugin "olsrd_bmf.so.1.7.0" 40 | { 41 | PlParam "DoLocalBroadcast" "no" 42 | 43 | PlParam "CapturePacketsOnOlsrInterfaces" "no" 44 | 45 | PlParam "BmfMechanism" "Broadcast" 46 | 47 | PlParam "NonOlsrIf" "eth2" 48 | 49 | PlParam "FanOutLimit" "0" 50 | 51 | PlParam "BroadcastRetransmitCount" "1" 52 | } 53 | --------------------------------------------------------------------------------