Changes between Initial Version and Version 1 of Documentation/OtherApps/DITG/ITGSender


Ignore:
Timestamp:
09/05/06 21:50:05 (13 years ago)
Author:
Surya Satyavolu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/OtherApps/DITG/ITGSender

    v1 v1  
     1{{{
     2#
     3# Create an application representation from scratch
     4#
     5require 'handler/appDefinition'
     6
     7a = AppDefinition.create('test:app:itgs')
     8a.name = "itgs"
     9a.version(0, 0, 1)
     10a.shortDescription = "D-ITG Sender"
     11a.description = <<TEXT
     12ITGSend is a traffic generator for TCP and UDP traffic. It contains generators
     13producing various forms of packet streams and port for sending
     14these packets via various transports, such as TCP and UDP.
     15TEXT
     16
     17# addProperty(name, description, mnemonic, type, isDynamic = false, constraints = nil)
     18#Flow options
     19a.addProperty('m', 'MSR type: either onewaydelay or RTT', ?m, String, false)
     20a.addProperty('a', 'Destination address', ?a, String, false)
     21a.addProperty('r', 'Remote port', ?r, Integer, false)
     22a.addProperty('T', 'Protocol type TCP/UDP/UDP_Libmac', ?T, Integer, false)
     23a.addProperty('f', 'TTL',?f, Integer, false)
     24a.addProperty('d', 'Gen_Delay',?d, Integer, false)
     25a.addProperty('t', "Duration of traffic generation(millisecs)", ?t, Integer, false)
     26
     27#Interdeparture time options
     28a.addProperty('C', 'Constant interdeparture time b/w packets (pkts_per_s)', ?C, Integer, false)
     29a.addProperty('E', '(Exponential) Average packets per sec', ?E, Integer, false)
     30a.addProperty('O', '(Poisson) Average pkts per sec', ?O, Integer, false)
     31#Note that Pareto, Cauchy, UNiform, Normal and Gamma distributions will be added
     32
     33#Log file options
     34a.addProperty('l', 'Log file', ?l, String, false)
     35
     36#Packet size options
     37a.addProperty('c', 'Constant payload size', ?c, Integer, false)
     38a.addProperty('e', "Average pkt size (exponential)", ?e, Integer, false)
     39a.addProperty('o', "Poisson distributed avg. pkt size", ?o, Integer, false)
     40#Note that Pareto, Cauchy, UNiform, Normal and Gamma distributions will be added
     41
     42# Applications (note that no other interdeparture or packet size can be chosen
     43# if an application is chosen
     44a.addProperty('App', 'VoIP traffic', ?Z, Integer, false)
     45a.addProperty('codec', 'VoIP codec: G.711.1, G.711.2, G.723.1, G.729.2, G.729.3', ?i, String, false)
     46a.addProperty('voip_control', 'protocol_type RTP or CRTP',?h, String, false)
     47
     48a.addProperty('Telnet', 'Telnet traffic', nil, Integer, false)
     49a.addProperty('DNS', 'DNS traffic', nil, Integer, false)
     50
     51
     52a.path = "/usr/bin/ITGSend"
     53
     54if $0 == __FILE__
     55  require 'stringio'
     56  require 'rexml/document'
     57  include REXML
     58   
     59  sio = StringIO.new()
     60  a.to_xml.write(sio, 2)
     61  sio.rewind
     62  puts sio.read
     63 
     64  sio.rewind
     65  doc = Document.new(sio)
     66  t = AppDefinition.from_xml(doc.root)
     67 
     68  puts
     69  puts "-------------------------"
     70  puts
     71  t.to_xml.write($stdout, 2)
     72 
     73end
     74
     75
     76}}}