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 --- src/conntrack/getter.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/conntrack/getter.c') diff --git a/src/conntrack/getter.c b/src/conntrack/getter.c index 8a093c6..0b56468 100644 --- a/src/conntrack/getter.c +++ b/src/conntrack/getter.c @@ -322,6 +322,16 @@ static const void *get_attr_secctx(const struct nf_conntrack *ct) return ct->secctx; } +static const void *get_attr_timestamp_start(const struct nf_conntrack *ct) +{ + return &ct->timestamp.start; +} + +static const void *get_attr_timestamp_stop(const struct nf_conntrack *ct) +{ + return &ct->timestamp.stop; +} + const get_attr get_attr_array[ATTR_MAX] = { [ATTR_ORIG_IPV4_SRC] = get_attr_orig_ipv4_src, [ATTR_ORIG_IPV4_DST] = get_attr_orig_ipv4_dst, @@ -386,4 +396,6 @@ const get_attr get_attr_array[ATTR_MAX] = { [ATTR_TCP_WSCALE_REPL] = get_attr_tcp_wscale_repl, [ATTR_ZONE] = get_attr_zone, [ATTR_SECCTX] = get_attr_secctx, + [ATTR_TIMESTAMP_START] = get_attr_timestamp_start, + [ATTR_TIMESTAMP_STOP] = get_attr_timestamp_stop, }; -- cgit v1.2.3