| result=`cat $PGDEV | fgrep "Result: OK:"` |
| if [ "$result" = "" ]; then |
| cat $PGDEV | fgrep Result: |
| # Config Start Here ----------------------------------------------------------- |
| # One CPU means one thread. One CPU example. We add eth1, eth2 respectivly. |
| PGDEV=/proc/net/pktgen/kpktgend_0 |
| echo "Removing all devices" |
| # delay 0 means maximum speed. |
| CLONE_SKB="clone_skb 1000000" |
| PGDEV=/proc/net/pktgen/eth1 |
| echo "Configuring $PGDEV" |
| pgset "dst_mac 00:04:23:08:91:dc" |
| PGDEV=/proc/net/pktgen/eth2 |
| echo "Configuring $PGDEV" |
| pgset "dst_mac 00:04:23:08:91:de" |
| PGDEV=/proc/net/pktgen/pgctrl |
| echo "Running... ctrl^C to stop" |
| cat /proc/net/pktgen/eth1 /proc/net/pktgen/eth2 |