wiki:Documentation/OtherApps/Iperf/IperfUDPSender

Version 1 (modified by Surya Satyavolu, 18 years ago) ( diff )

#
# Define a prototype
#
require 'handler/prototype'
require 'handler/filter'
require 'handler/appDefinition'

p = Prototype.create("test:proto:iperfudpsender")
p.name = "Iperf UDP Sender"
p.description = "Nodes which send a stream of packets"
p.defProperty('use_udp', 'Protocol to use')
p.defProperty('client', 'Host to send packets to')
p.defProperty('sender_rate', 'Number of bits per second', 100000)
#p.defProperty('port', 'Port to send packets to')
p.defProperty('len', 'Size of packets')
p.defProperty('time', 'Experiment duration (sec)', 10)

iperfs = p.addApplication(:iperfs, "test:app:iperfs")
iperfs.bindProperty('udp','use_udp')
iperfs.bindProperty('client')
iperfs.bindProperty('bandwidth','sender_rate')
iperfs.bindProperty('len')
iperfs.bindProperty('time')
#iperfs.bindProperty('port')


if $0 == __FILE__
  p.to_xml.write($stdout, 2)
  puts
end

Note: See TracWiki for help on using the wiki.