From 2217eb4c53a54eabbc09e043209181c483e2eace Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 23 Oct 2010 17:35:57 +0200 Subject: conntrack: add timestamp support This patch adds the connection tracking extension that allows conntrack timestamping. This requires a Linux kernel >= 2.6.38. We have now 65 attributes, we need 96 bits to store what attributes are set in the objects. Signed-off-by: Pablo Neira Ayuso --- utils/conntrack_dump.c | 2 +- utils/conntrack_events.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/conntrack_dump.c b/utils/conntrack_dump.c index a36e753..f1d63bb 100644 --- a/utils/conntrack_dump.c +++ b/utils/conntrack_dump.c @@ -11,7 +11,7 @@ static int cb(enum nf_conntrack_msg_type type, { char buf[1024]; - nfct_snprintf(buf, sizeof(buf), ct, NFCT_T_UNKNOWN, NFCT_O_DEFAULT, NFCT_OF_SHOW_LAYER3); + nfct_snprintf(buf, sizeof(buf), ct, NFCT_T_UNKNOWN, NFCT_O_DEFAULT, NFCT_OF_SHOW_LAYER3 | NFCT_OF_TIMESTAMP); printf("%s\n", buf); return NFCT_CB_CONTINUE; diff --git a/utils/conntrack_events.c b/utils/conntrack_events.c index f5e72c7..7675663 100644 --- a/utils/conntrack_events.c +++ b/utils/conntrack_events.c @@ -12,7 +12,7 @@ static int event_cb(enum nf_conntrack_msg_type type, static int n = 0; char buf[1024]; - nfct_snprintf(buf, sizeof(buf), ct, type, NFCT_O_XML, NFCT_OF_TIME); + nfct_snprintf(buf, sizeof(buf), ct, type, NFCT_O_XML, NFCT_OF_TIME | NFCT_OF_TIMESTAMP); printf("%s\n", buf); if (++n == 10) -- cgit v1.2.3