Element <input>
Defines the Input. It has a start tag <input> and an end tag </input>.
Two main funcitons, "replay pcap files" and "traffic generator".
Attribute
id
Specifies a unique id for an element
Interger
type
Specifies a type for an element
String
replayPcap or traffic-gen
Elements in Input - replayPcap
Before using this function, make sure you upload pcap files to the correct path first.
Example
<run>
<input type="replayPcap">
<port>P0</port>
<filepath>H1/in/sample.pcap</filepath>
<time>1</time>
<msinterval>1</msinterval>
</input>
</run>
port
Defines output port**(must have)**.
It has a start tag <port> and an end tag </port>.
<port>P0</port>
time
Defines play time**(must have)**.
It has a start tag <time> and an end tag </time>.
<time>1</time>
filepath
Defines pcap filepath**(either filepath or scandir must have)**.
It has a start tag <filepath> and an end tag </filepath>.
<filepath>H1/in/sample.pcap</filepath>
speed
Defines speed, default is full line rate.
It has a start tag <speed> and an end tag </speed>.
<speed>10000</speed>
msinterval
Defines the play ms interval between each packet.
It has a start tag <msinterval> and an end tag </msinterval>.
<msinterval>1</msinterval>
scandir
Defines pcap scandir**(either filepath or scandir must have)**.
It has a start tag <scandir> and an end tag </scandir>., limit 1024 files
Attribute
interval
Scan interval
Seconds
60
minbytes
will replay if pcap file bigger than minbytes
Interger
0
timeout
force replay if pcap file less than minbytes after timeout
Interger
0
<scandir interval="10" minbytes="1048576" timeout="60">H1/in</scandir>
playedFilesHandle
Defines pcap file handle after replay.
It has a start tag <playedFilesHandle> and an end tag </playedFilesHandle>. must be delete or move
<playedFilesHandle>move</playedFilesHandle>
playedFilesMoveTo
Defines pcap file move to dir after after replay.
It has a start tag <playedFilesMoveTo> and an end tag </playedFilesMoveTo>.
<playedFilesMoveTo>H1/in/played</playedFilesMoveTo>
Example - scandir
<run>
<input type="replayPcap">
<port>P0</port>
<time>1</time>
<scandir interval="10" minbytes="1048576" timeout="60">H1/in</scandir>
<playedFilesHandle>move</playedFilesHandle>
<playedFilesMoveTo>H1/played</playedFilesMoveTo>
</input>
</run>
Elements in Input - traffic-gen
generate traffic
Example
<run>
<input type="traffic-gen">
<port>P0</port>
<protocol>TCP</protocol>
<packet_size>1024</packet_size>
<speed>10000</speed>
<payload_text>abcdefg</payload_text>
<src_mac>00:0d:48:28:28:56</src_mac>
<dest_mac>00:0d:48:28:28:57</dest_mac>
<src_ip>10.1.0.99</src_ip>
<src_ip_min>10.1.0.0</src_ip_min>
<src_ip_max>10.1.0.99</src_ip_max>
<src_ip_inc>5</src_ip_inc>
<src_ip_random>0</src_ip_random>
<dest_ip>11.1.1.99</dest_ip>
<dest_ip_min>11.1.1.0</dest_ip_min>
<dest_ip_max>11.1.2.99</dest_ip_max>
<dest_ip_inc>2</dest_ip_inc>
<dest_ip_random>0</dest_ip_random>
<src_port>1234</src_port>
<src_port_min>2</src_port_min>
<src_port_max>9999</src_port_max>
<src_port_inc>1</src_port_inc>
<src_port_random>0</src_port_random>
<dest_port>2222</dest_port>
<dest_port_min>0</dest_port_min>
<dest_port_max>65535</dest_port_max>
<dest_port_inc>1</dest_port_inc>
<dest_port_random>0</dest_port_random>
</input>
</run>
port
Defines output port**(must have)**.
It has a start tag <port> and an end tag </port>.
<port>P0</port>
protocol
Defines protocol TCP/UDP/ICMP, default UDP
It has a start tag <protocol> and an end tag </protocol>.
<protocol>UDP</protocol>
packet_size
Defines packet size, default 512
It has a start tag <packet_size> and an end tag </packet_size>.
<packet_size>1024</packet_size>
packet_data
Defines packet data
It has a start tag <packet_data> and an end tag </packet_data>.
<packet_data>000cbd0bfd36000cbd0bfd3708004500002e00000000800124090a0001630a0001640800662f0001000168656c6c6f20776f726c6400000000000000</packet_data>
speed
Defines speed, default is full line rate.
It has a start tag <speed> and an end tag </speed>.
<speed>10000</speed>
msinterval
Defines the ms interval between each packet. higher priority than speed.
It has a start tag <msinterval> and an end tag </msinterval>.
<msinterval>1</msinterval>
payload_text
Defines payload text
It has a start tag <payload_text> and an end tag </payload_text>.
<payload_text>abcdefg</payload_text>
src_mac
Defines source mac address
It has a start tag <src_mac> and an end tag </src_mac>.
<src_mac>00:0d:48:28:28:56</src_mac>
dest_mac
Defines destination mac address
It has a start tag <dest_mac> and an end tag </dest_mac>.
<dest_mac>00:0d:48:28:28:57</dest_mac>
src_ip
Defines source ip, default 10.0.1.99
It has a start tag <src_ip> and an end tag </src_ip>.
<src_ip>10.1.0.99</src_ip>
src_ip_min
Defines minimum source ip
It has a start tag <src_ip_min> and an end tag </src_ip_min>.
<src_ip_min>10.1.0.0</src_ip_min>
src_ip_max
Defines maximum source ip
It has a start tag <src_ip_max> and an end tag </src_ip_max>.
<src_ip_max>10.1.0.99</src_ip_max>
src_ip_inc
Defines the number to increase source ip, default 0
It has a start tag <src_ip_inc> and an end tag </src_ip_inc>.
<src_ip_inc>5</src_ip_inc>
src_ip_random
Defines source ip random (0 or 1), default 0
It has a start tag <src_ip_random> and an end tag </src_ip_random>.
<src_ip_random>1</src_ip_random>
src_port
Defines source port, default 5000
It has a start tag <src_port> and an end tag </src_port>.
<src_port>1234</src_port>
src_port_min
Defines minimum source port
It has a start tag <src_port_min> and an end tag </src_port_min>.
<src_port_min>2</src_port_min>
src_port_max
Defines maximum source port
It has a start tag <src_port_max> and an end tag </src_port_max>.
<src_port_max>9999</src_port_max>
src_port_inc
Defines the number to increase source port, default 0
It has a start tag <src_port_inc> and an end tag </src_port_inc>.
<src_port_inc>10</src_port_inc>
src_port_random
Defines random source port (0 or 1), default 0
It has a start tag <src_port_random> and an end tag </src_port_random>.
<src_port_random>1</src_port_random>
dest_ip
Defines destination ip,default 10.0.0.99
dest_ip_min
Defines minimum destination ip
dest_ip_max
Defines maximum destination ip
dest_ip_inc
Defines the number to increase destination ip, default 0
dest_ip_random
Defines destination ip random (0 or 1), default 0
dest_port
Defines destination port, default 5001
dest_port_min
Defines minimum destination port
dest_port_max
Defines maximum destination port
dest_port_inc
Defines the number to increase destination port, default 0
dest_port_random
Defines random destination port (0 or 1), default 0
//destination ip and port, please refer to src_ip and src_port for xml syntax
Last updated