Changes between Initial Version and Version 1 of Old/Documentation/OTG/ScriptsRepository/ExpBcast


Ignore:
Timestamp:
Sep 26, 2005, 6:01:30 PM (19 years ago)
Author:
zhibinwu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Old/Documentation/OTG/ScriptsRepository/ExpBcast

    v1 v1  
     1[wiki:WikiStart Orbit] > [wiki:OTG OTG] > [wiki:OTG/ScriptsRepository Scripts Repository] > UDP brocast Sender with RAW socket receiver
     2
     3{{{
     4xperiment.name = "tutorial-bcast"
     5Experiment.project = "orbit:tutorial"
     6
     7#
     8# Define nodes used in experiment
     9#
     10defNodes('sender', [1,2]) {|node|
     11  node.image = nil  # assume the right image to be on disk
     12
     13  node.prototype("test:proto:sender", {
     14    'destinationHost' => '192.168.255.255',
     15    'packetSize' => 1024,
     16    'rate' => 300,
     17    'protocol' => 'udp' ,
     18    'broadcast' => 'on'
     19  })
     20  node.net.w0.mode = "master"
     21}
     22
     23defNodes('receiver', [1,1]) {|node|
     24  node.image = nil  # assume the right image to be on disk
     25  node.prototype("test:proto:raw_receiver" , {
     26      'dstfilter' => '192.168.255.255',
     27      'rxdev' => 'ath0',
     28      'protocol' => 'raw_libmac'
     29  })
     30  node.net.w0.mode = "managed"
     31}
     32
     33allNodes.net.w0 { |w|
     34  w.type = 'b'
     35  w.essid = "helloworld"
     36  w.ip = "%192.168.%x.%y"
     37}
     38
     39#
     40# Now, start the application
     41#
     42whenAllInstalled() {|node|
     43  wait 30
     44
     45  allNodes.startApplications
     46  wait 40
     47
     48  Experiment.done
     49}
     50
     51}}}
     52