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

Attribute
Description
Type
Default (* must have)

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>.

time

Defines play time**(must have)**.

It has a start tag <time> and an end tag </time>.

filepath

Defines pcap filepath**(either filepath or scandir must have)**.

It has a start tag <filepath> and an end tag </filepath>.

speed

Defines speed, default is full line rate.

It has a start tag <speed> and an end tag </speed>.

msinterval

Defines the play ms interval between each packet.

It has a start tag <msinterval> and an end tag </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

Attribute
Description
Type
Default (* must have)

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

playedFilesHandle

Defines pcap file handle after replay.

It has a start tag <playedFilesHandle> and an end tag </playedFilesHandle>. must be delete or move

playedFilesMoveTo

Defines pcap file move to dir after after replay.

It has a start tag <playedFilesMoveTo> and an end tag </playedFilesMoveTo>.

Example - scandir

Elements in Input - traffic-gen

generate traffic

Example

port

Defines output port**(must have)**.

It has a start tag <port> and an end tag </port>.

protocol

Defines protocol TCP/UDP/ICMP, default UDP

It has a start tag <protocol> and an end tag </protocol>.

packet_size

Defines packet size, default 512

It has a start tag <packet_size> and an end tag </packet_size>.

packet_data

Defines packet data

It has a start tag <packet_data> and an end tag </packet_data>.

speed

Defines speed, default is full line rate.

It has a start tag <speed> and an end tag </speed>.

msinterval

Defines the ms interval between each packet. higher priority than speed.

It has a start tag <msinterval> and an end tag </msinterval>.

payload_text

Defines payload text

It has a start tag <payload_text> and an end tag </payload_text>.

src_mac

Defines source mac address

It has a start tag <src_mac> and an end tag </src_mac>.

dest_mac

Defines destination mac address

It has a start tag <dest_mac> and an end tag </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_min

Defines minimum source ip

It has a start tag <src_ip_min> and an end tag </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_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_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_port

Defines source port, default 5000

It has a start tag <src_port> and an end tag </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_max

Defines maximum source port

It has a start tag <src_port_max> and an end tag </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_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>.

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