[netfilter-cvslog] r3462 - in trunk/nfsim: core/ipv4 tools
rusty at netfilter.org
rusty at netfilter.org
Mon Dec 20 03:49:10 CET 2004
Author: rusty at netfilter.org
Date: 2004-12-20 03:49:09 +0100 (Mon, 20 Dec 2004)
New Revision: 3462
Modified:
trunk/nfsim/core/ipv4/ipv4.c
trunk/nfsim/core/ipv4/ipv4.h
trunk/nfsim/tools/gen_ip.c
Log:
Nicolas Bouliane: I'm trying to write the .sim of the tos's match, hence I took the initiative to add the TOS support to nfsim. :-)
Modified: trunk/nfsim/core/ipv4/ipv4.c
===================================================================
--- trunk/nfsim/core/ipv4/ipv4.c 2004-12-20 02:38:49 UTC (rev 3461)
+++ trunk/nfsim/core/ipv4/ipv4.c 2004-12-20 02:49:09 UTC (rev 3462)
@@ -717,6 +717,8 @@
ptr += sprintf(ptr, "CE ");
if (dump_flags & __NFSIM_DUMP_TTL)
ptr += sprintf(ptr, "TTL=%i ", iph->ttl);
+ if (dump_flags & __NFSIM_DUMP_TOS)
+ ptr += sprintf(ptr, "TOS=%i ", iph->tos);
ptr += sprintf(ptr, "%u.%u.%u.%u %u.%u.%u.%u ",
NIPQUAD(iph->saddr),
Modified: trunk/nfsim/core/ipv4/ipv4.h
===================================================================
--- trunk/nfsim/core/ipv4/ipv4.h 2004-12-20 02:38:49 UTC (rev 3461)
+++ trunk/nfsim/core/ipv4/ipv4.h 2004-12-20 02:49:09 UTC (rev 3462)
@@ -635,5 +635,6 @@
#define __NFSIM_DUMP_TTL 0x01
#define __NFSIM_DUMP_DATA 0x02
+#define __NFSIM_DUMP_TOS 0x04
#endif /* __HAVE_IPV4_H */
Modified: trunk/nfsim/tools/gen_ip.c
===================================================================
--- trunk/nfsim/tools/gen_ip.c 2004-12-20 02:38:49 UTC (rev 3461)
+++ trunk/nfsim/tools/gen_ip.c 2004-12-20 02:49:09 UTC (rev 3462)
@@ -723,6 +723,7 @@
argv[1]+4);
return false;
}
+ *dump_flags |= __NFSIM_DUMP_TOS;
argc--;
argv++;
}
More information about the netfilter-cvslog
mailing list