洪水包发送源程序

发表于:2007-06-09来源:作者:点击数: 标签:
1. how to compile? copy save these files to /sys .net graph # cd /sys/modules/netgraph # mkdir source # cd source vi Makefile, and input the next lines KMOD= ng_source4 SRCS= ng_source4.c KMODDEPS= netgraph ng_ether .include # make;make in

1. how to compile?
copy & save these files to /sys.netgraph
# cd /sys/modules/netgraph
# mkdir source
# cd source
vi Makefile, and input the next lines
KMOD= ng_source4
SRCS= ng_source4.c
KMODDEPS= netgraph ng_ether
.include # make;make install 2. how to use? # kldload ng_source4 # ngctl mkpeer em0: source lower output # ngctl name em0:lower source # ngctl connect em0: source: upper input # ping -c 100 192.168.0.99 # ngctl msg source: "setflood 1" # ngctl msg source: "start 1000" # ngctl msg source: "getstats"
ng_source4.h
ng_source4.c

原文转自:http://www.ltesting.net