From 20cd0222c910e96c378e091e64b71d26e48916fe Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 26 Apr 2012 19:37:03 +0200 Subject: conntrack: add nfct_set_attr_l and ATTR_HELPER_INFO This adds the ATTR_HELPER_INFO that can be used to send binary data that will be attached to the conntrack. This is useful for the user-space connection tracking support. This patch also adds a new interface: nfct_set_attr_l(attr, type, value, length); that is used to set the variable length helper information. Signed-off-by: Pablo Neira Ayuso --- src/conntrack/getter.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/conntrack/getter.c') diff --git a/src/conntrack/getter.c b/src/conntrack/getter.c index 5e0a450..e7ab048 100644 --- a/src/conntrack/getter.c +++ b/src/conntrack/getter.c @@ -334,6 +334,11 @@ static const void *get_attr_timestamp_stop(const struct nf_conntrack *ct) return &ct->timestamp.stop; } +static const void *get_attr_helper_info(const struct nf_conntrack *ct) +{ + return ct->helper_info; +} + 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, @@ -400,4 +405,5 @@ const get_attr get_attr_array[ATTR_MAX] = { [ATTR_SECCTX] = get_attr_secctx, [ATTR_TIMESTAMP_START] = get_attr_timestamp_start, [ATTR_TIMESTAMP_STOP] = get_attr_timestamp_stop, + [ATTR_HELPER_INFO] = get_attr_helper_info, }; -- cgit v1.2.3