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 --- include/internal/internal.h | 4 ++++ include/internal/object.h | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'include/internal') diff --git a/include/internal/internal.h b/include/internal/internal.h index c335afd..a984e6b 100644 --- a/include/internal/internal.h +++ b/include/internal/internal.h @@ -77,4 +77,8 @@ #define likely(x) __builtin_expect((x),1) #define unlikely(x) __builtin_expect((x),0) +#ifndef NSEC_PER_SEC +#define NSEC_PER_SEC 1000000000L +#endif + #endif diff --git a/include/internal/object.h b/include/internal/object.h index 76a0566..5dce9d0 100644 --- a/include/internal/object.h +++ b/include/internal/object.h @@ -175,7 +175,13 @@ struct nf_conntrack { struct __nfct_nat snat; struct __nfct_nat dnat; -#define __NFCT_BITSET 2 + struct { + u_int64_t start; + u_int64_t stop; + } timestamp; + +/* we've got more than 64 attributes now, we need 96 bits to store them. */ +#define __NFCT_BITSET 3 u_int32_t set[__NFCT_BITSET]; }; -- cgit v1.2.3