4 # Marta Carbone <marta.carbone@iet.unipi.it>
5 # 2009 - Universita` di Pisa
8 # This is a sample hook file in charge to collect
9 # statistical information on netconfig usage. It dumps
10 # on a log file slicename, port and the configuration string
11 # used to configure a dummynet experiment.
13 # Each time a user configure a dummynet port, this file
15 # The following variables will be passed as argument:
17 # ${SLICE} ${PORT} ${CONFIG_STRING}
18 # ${SLICE} The slicename executing the netconfig command
19 # ${PORT} The port to be configured
20 # ${CONFIG_STRING} The configuration string
22 # Note that this script can get additional information
23 # by executing the ipfw command, e.g.
24 # ipfw list # list of installed rules
25 # ipfw show # list of rules and statistical information
26 # ipfw pipe show # list of pipes
28 # a complete list of ipfw commands is available at:
29 # http://www.freebsd.org/cgi/man.cgi?query=ipfw&sektion=8
32 LOG_FILE=/tmp/ipfw_hook.log
34 echo -e `date` >> ${LOG_FILE}
35 echo "$*" >> ${LOG_FILE}