.. | .. |
---|
8 | 8 | echo "Usage: $0 [-vx] -i ethX" |
---|
9 | 9 | echo " -i : (\$DEV) output interface/device (required)" |
---|
10 | 10 | echo " -s : (\$PKT_SIZE) packet size" |
---|
11 | | - echo " -d : (\$DEST_IP) destination IP" |
---|
| 11 | + echo " -d : (\$DEST_IP) destination IP. CIDR (e.g. 198.18.0.0/15) is also allowed" |
---|
12 | 12 | echo " -m : (\$DST_MAC) destination MAC-addr" |
---|
| 13 | + echo " -p : (\$DST_PORT) destination PORT range (e.g. 433-444) is also allowed" |
---|
13 | 14 | echo " -t : (\$THREADS) threads to start" |
---|
14 | 15 | echo " -f : (\$F_THREAD) index of first thread (zero indexed CPU number)" |
---|
15 | 16 | echo " -c : (\$SKB_CLONE) SKB clones send before alloc new SKB" |
---|
.. | .. |
---|
23 | 24 | |
---|
24 | 25 | ## --- Parse command line arguments / parameters --- |
---|
25 | 26 | ## echo "Commandline options:" |
---|
26 | | -while getopts "s:i:d:m:f:t:c:n:b:vxh6" option; do |
---|
| 27 | +while getopts "s:i:d:m:p:f:t:c:n:b:vxh6" option; do |
---|
27 | 28 | case $option in |
---|
28 | 29 | i) # interface |
---|
29 | 30 | export DEV=$OPTARG |
---|
.. | .. |
---|
41 | 42 | export DST_MAC=$OPTARG |
---|
42 | 43 | info "Destination MAC set to: DST_MAC=$DST_MAC" |
---|
43 | 44 | ;; |
---|
| 45 | + p) # PORT |
---|
| 46 | + export DST_PORT=$OPTARG |
---|
| 47 | + info "Destination PORT set to: DST_PORT=$DST_PORT" |
---|
| 48 | + ;; |
---|
44 | 49 | f) |
---|
45 | 50 | export F_THREAD=$OPTARG |
---|
46 | 51 | info "Index of first thread (zero indexed CPU number): $F_THREAD" |
---|