init
Signed-off-by: Nico Schottelius <nico@manager.schottelius.org>
This commit is contained in:
parent
256dc98754
commit
df2daf524d
641 changed files with 140617 additions and 12 deletions
27
ipg
Normal file
27
ipg
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
#! /bin/sh
|
||||
|
||||
modprobe pktgen
|
||||
|
||||
PGDEV=/proc/net/pktgen/pg0
|
||||
|
||||
function pgset() {
|
||||
local result
|
||||
|
||||
echo $1 > $PGDEV
|
||||
|
||||
result=`cat $PGDEV | fgrep "Result: OK:"`
|
||||
if [ "$result" = "" ]; then
|
||||
cat $PGDEV | fgrep Result:
|
||||
fi
|
||||
}
|
||||
|
||||
function pg() {
|
||||
echo inject > $PGDEV
|
||||
cat $PGDEV
|
||||
}
|
||||
|
||||
pgset "odev eth0"
|
||||
pgset "dst 0.0.0.0"
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue