Fix calls.
authormarta <marta@8c455092-636d-4788-adf5-e71def0336e8>
Mon, 2 Nov 2009 15:26:56 +0000 (15:26 +0000)
committermarta <marta@8c455092-636d-4788-adf5-e71def0336e8>
Mon, 2 Nov 2009 15:26:56 +0000 (15:26 +0000)
dummynet/ipfw2_mod.c
sample_hook [new file with mode: 0755]

index 8910cbc..26fb5d9 100644 (file)
@@ -483,7 +483,7 @@ linux_lookup(const int proto, const __be32 saddr, const __be16 sport,
        sk =  (dir) ?
                inet_lookup(_OPT_NET_ARG &tcp_hashinfo,
                        daddr, dport, saddr, sport,     // matches outgoing for server sockets
-                       net_iif(skb)) :
+                       inet_iif(skb)) :
                inet_lookup(_OPT_NET_ARG &tcp_hashinfo,
                        saddr, sport, daddr, dport,     // matches incoming for server sockets
                        skb->dev->ifindex);
diff --git a/sample_hook b/sample_hook
new file mode 100755 (executable)
index 0000000..b47c8de
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+#
+# Marta Carbone <marta.carbone@iet.unipi.it>
+# 2009 - Universita` di Pisa
+#
+# This is a sample hook file in charge to collect
+# statistical information on netconfig usage. It dumps
+# on a log file slicename, port and the configuration string
+# used to configure a dummynet experiment.
+#
+# Each time a user configure a dummynet port, this file
+# will be executed.
+# The following variables will be passed as argument:
+# 
+# ${SLICE} ${PORT} ${CONFIG_STRING} 
+# ${SLICE} The slicename executing the netconfig command
+# ${PORT} The port to be configured
+# ${CONFIG_STRING} The configuration string
+#
+# Note that this script can get additional information
+# by executing the ipfw command, e.g.
+# ipfw list            # list of installed rules
+# ipfw show            # list of rules and statistical information
+# ipfw pipe show       # list of pipes
+#
+# a complete list of ipfw commands is available at:
+# http://www.freebsd.org/cgi/man.cgi?query=ipfw&sektion=8
+
+# logfile
+LOG_FILE=/tmp/ipfw_hook.log
+
+echo -e `date` >> ${LOG_FILE}
+echo "$*" >> ${LOG_FILE}