All Classes Namespaces Files Functions Pages
Tutorial: 5. Define a Flow

Previous: Tutorial: 4. Create a Frame

Since we will use the Higher Layer API, we don't need to create all the Flow-related objects. The HL-API will do this for us. We simple need to describe the Flow, providing its characteristics.

In this example we will send 1000 frames with an inter frame gap of 1ms. At the receiving side, we will count the packets that meet our filter.

1 set numberOfFrames 1000
2 set interFrameGap 1000000
3 
4 set srcFlow [ list -tx [ list -port $srcPort \
5  -frame [ list -bytes $srcFrameContent ] \
6  -numberofframes $numberOfFrames \
7  -interframegap $interFrameGap \
8 ] \
9  -rx [ list -port $dstPort \
10  -trigger [ list -type basic -filterFormat bpf -filter "( ip src [ $srcL3 Ip.Get ] ) and ( ip dst [ $dstL3 Ip.Get ] ) and ( udp src port $srcUdpPort ) and ( udp dst port $dstUdpPort )" ] \
11 ] \
12 ]

Further reading: Tutorial: 6. Running the Scenario