CLI VERSION - how to use it
CLI VERSION - how to use it
Since of version 1.7 there is also a CLI (command line interface) version of packETH. It doesn’t have many features but helps you to do some automated testing.
INSTALLATION:
1)download and extract the source
2)go into cli subdir
3)type make
4)if all the libraries are available, it will compile
Usage: packETHcli -i <interface> -m <mode> [-d <delay> -n <number of packets> [-s <startsize stopsize stepsize] -p period] -f <file>
-m <1,2,3> - 1: send one packet (builder mode), no further options
- 2: send sequence of one packet (Gen-b mode)
-d <us, 0> - delay between packets in micro seconds
(-1 for maximum speed without counters, 0 for max speed with counters)
-n <number, 0> - number of packets to send or 0 for infinite
-s "<startsize stopsize stepsize>"
-p <period between steps>
- 3: send sequence packets (Gen-s mode) - not yet done...
-f <file name> - file name where packet is stored in pcap format
Examples:
./packETHcli -i lo -m 1 -f packet1.pcap
- send packet1.pcap once on lo
./packETHcli -i eth0 -m 2 -d 1000 -n 300 -f packet2.pcap
- send packet2.pcap 300 times with 1000 us (1ms) between them
./packETHcli -i eth0 -m 2 -d -1 -n 0 -f packet2.pcap
- send packet2.pcap at max speed, infinite times, no counters
./packETHcli -i eth0 -m 2 -d 0 -n 0 -f packet2.pcap
- send packet2.pcap at max speed, infinite times, with counters
./packETHcli -i eth1 -m 2 -d 0 -n 0 -s "1000 1500 100" -p 10 -f packet3.pcap
- send 10 times packet2.pcap at max speed, start with packet length of 1000 bytes
than increase packet length by 100 bytes, send another 10 packets... till 1500 bytes
./packETHcli -i eth0 -m 2 -d 100 -n 0 -s "8500 8500" -f packet2.pcap
- send packet2.pcap infinite times with 300us between them with the size of 8500
bytes (even if packet2 is longer)