The O? Traffic Generator and Recever
====================================

Compiling
---------

From the top directory:

  $ ./autogen.sh         # Only needed from a Git clone
  $ ./configure && make
  $ make install         # Install to /usr/local/bin if no --prefix is passed to configure


Running
-------

To display help:

  $ ./otr2-oml2 --help
  Apr 17 15:32:37 INFO    OTG2 Traffic Sink 2.10.0
  INFO    OML Client V2.10.0 [Protocol V4] Copyright 2007-2013, NICTA
  Usage: lt-otr2-oml2 [OPTION...]
    -h, --help[=[component]]     Show help
        --usage                  Display brief use message
    -p, --protocol=udp           Protocol to use to send packet
    -g, --sink=udp|null          What to do with received packets
    -d, --debug-level=INT        Debug level - error:-2 .. debug:1-3
    -l, --logfile=STRING         File to log to
    -v, --version                Print version information and exit
        --flow:id=INT            GUID of flow (default: random)
  $ ./otg2-oml2  --help
  Apr 17 15:34:43 INFO    OTG2 Traffic Generator 2.10.0
  INFO    OML Client V2.10.0 [Protocol V4] Copyright 2007-2013, NICTA
  Usage: lt-otg2-oml2 [OPTION...]
    -h, --help[=[component]]     Show help
        --usage                  Display brief use message
    -p, --protocol=udp|null      Protocol to use to send packet
    -g, --generator=cbr|expo     Generator producing packets
    -d, --debug-level=INT        Debug level - error:-2 .. debug:1-3
    -l, --logfile=STRING         File to log to
    -v, --version                Print version information and exit
        --flow:id=INT            GUID of flow (default: random)

To send UDP packets, use 'otg2' (setting the debug level to 3 and disable OML reporting)

  $ ./otg2-oml2 -d 3 --udp:dst_host localhost --oml-noop
  Apr 17 15:35:35 INFO    OTG2 Traffic Generator 2.10.0
  INFO    OML Client V2.10.0 [Protocol V4] Copyright 2007-2013, NICTA
  DEBUG   Registering MPs
  DEBUG   Sender/Source created
  DEBUG   Parsing phase 2 finished
  DEBUG   Binding port to '(null):0'
  DEBUG   Stream configured
  DEBUG   Absolute time: 0
  DEBUG   Sending UDP packet of size '512' to 'localhost:3000'
  DEBUG   Absolute time: 0
  DEBUG   Sending UDP packet of size '512' to 'localhost:3000'
  DEBUG   Absolute time: 0
  DEBUG   Sending UDP packet of size '512' to 'localhost:3000'
  DEBUG   Absolute time: 0
  DEBUG   Sending UDP packet of size '512' to 'localhost:3000'
  DEBUG   Absolute time: 0
  DEBUG   Sending UDP packet of size '512' to 'localhost:3000'

To receive this flow, start 'otr2'

  $ ./otr2-oml2 -d 3 --udp:local_port 3000 --oml-noop
  Apr 17 15:35:21 INFO    OTG2 Traffic Sink 2.10.0
  DEBUG   Sender/Source created
  DEBUG   Parsing phase 2 finished
  DEBUG   Binding port to 'localhost:3000'
  DEBUG   Stream configured
  DEBUG   Receiving UDP packet of size '512' from '127.0.0.1:53522'
  DEBUG   Absolute time: 0
  DEBUG   Consuming  packet of size '512'
  DEBUG   Receiving UDP packet of size '512' from '127.0.0.1:53522'
  DEBUG   Absolute time: 0
  DEBUG   Consuming  packet of size '512'
  DEBUG   Receiving UDP packet of size '512' from '127.0.0.1:53522'
  DEBUG   Absolute time: 0
  DEBUG   Consuming  packet of size '512'
  DEBUG   Receiving UDP packet of size '512' from '127.0.0.1:53522'
  DEBUG   Absolute time: 0
  DEBUG   Consuming  packet of size '512'
  DEBUG   Receiving UDP packet of size '512' from '127.0.0.1:53522'
  DEBUG   Absolute time: 0
  DEBUG   Consuming  packet of size '512'





