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