avoid attempting to run anything at build-time & cleaned up
[ipfw.git] / planetlab / sample_hook
1 #!/bin/sh
2
3 #
4 # Marta Carbone <marta.carbone@iet.unipi.it>
5 # 2009 - Universita` di Pisa
6 # $Id:$
7 #
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.
12 #
13 # Each time a user configure a dummynet port, this file
14 # will be executed.
15 # The following variables will be passed as argument:
16
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
21 #
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
27 #
28 # a complete list of ipfw commands is available at:
29 # http://www.freebsd.org/cgi/man.cgi?query=ipfw&sektion=8
30
31 # logfile
32 LOG_FILE=/tmp/ipfw_hook.log
33
34 echo -e `date` >> ${LOG_FILE}
35 echo "$*" >> ${LOG_FILE}