
This README outlines creating artificial traces that have
real background traffic and uniform attack traffic. The
trace_generator consists of the following files, and is
checked in under
/home/ant/ANT_SVN/trunk/tools/dag_trace_generator

README.txt                --- this README file
parseDown.sh              --- shell script to create a
                              temporary input file
createAttackStream.sh     --- shell script to create attack stream
createBackStream.sh       --- script to create background

Creating an artificial stream also requires the stream_merger 
application that can be checked out using
svn checkout svn+ssh://nsnam.isi.edu/home/ant/ANT_SVN/trunk/tools/stream_merger


Endace DAG format to ASCII conversion
------------------------

The background traffic stream is any one of the 5-minute 
traces from Bottleneck_traces-20041202 in LANDER. These
traces are saved in DAG format, and for the purposes
of merging must be coverted to ASCII using

dagconvert -i inputfile -o outputfile -T erf:prt

The converted ASCII tcpdump file be formatted as:

ts=0x41aee6b638f1a300 2004-12-02 09:56:06.2224371 UTC
type: ERF Ethernet
dserror=0 rxerror=0 trunc=0 vlen=1 iface=1 rlen=72 lctr=0 wlen=414
offset=41 etype=0x0800
dst=b8:fb:22:6c:aa:b1 src=b8:3b:61:5a:3b:6a

For the purposes of generating the artificial attack stream, 
we only need the timestamp (ts) and the IPv4 packet size (wlen). To this
end, we create an <input file>.


Creating the input file
-----------------------

The input file (to create the required attack and background 
streams) is created using the Matlab script ParseDown.m

Usage:  (in Matlab) ParseDown( inputFile,  outputFile)

The output file has the following format:

1105694675.837983 566
[timeStamp] [IPv4 packetSize]


Create the background and attack streams
----------------------------------------

Usage:   ./createBackStream.sh inputFieldsXX.txt backStreamXX.txt

         ./createAttackStream.sh inputFieldsXX.txt attackStreamBR_XX.txt 
                                 [bitRate(Mbps)] [attackPacketSize(Kbyte)]


Merging the streams
-------------------

Use stream_merger to create the final output stream

merger <Number of input ports> <Buffer size of output port in kBytes>  < Transmission rate of output port in Mb/s>

Buffer size in kBytes... 10,000 (to avoid overflow)
Transmission rate... 1000 Mbps (for 1Gbps link rate)

The stream_merger output file is formatted as:

1105694675.841166973114 0:56 1677277 1942 1677256 80 60
1105694675.841281652451 1:3 1677042 1981 1677256 80 1500
1105694675.841430425644 0:58 1677277 1942 1677256 80 118
1105694675.841459512711 0:60 1677277 1942 1677256 80 80


Program Usage
-------------

The dag_trace_generator scripts were used to create 
UniformAttack_trace-20070815 which is available through LANDER.

