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 --- include/internal/object.h | 3 +++ include/internal/types.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include/internal') diff --git a/include/internal/object.h b/include/internal/object.h index 55fa4f5..443e800 100644 --- a/include/internal/object.h +++ b/include/internal/object.h @@ -186,6 +186,9 @@ struct nf_conntrack { u_int64_t start; u_int64_t stop; } timestamp; + + void *helper_info; + size_t helper_info_len; }; /* diff --git a/include/internal/types.h b/include/internal/types.h index 3459200..49bac2e 100644 --- a/include/internal/types.h +++ b/include/internal/types.h @@ -7,7 +7,7 @@ /* * conntrack types */ -typedef void (*set_attr)(struct nf_conntrack *ct, const void *value); +typedef void (*set_attr)(struct nf_conntrack *ct, const void *value, size_t len); typedef const void *(*get_attr)(const struct nf_conntrack *ct); typedef void (*copy_attr)(struct nf_conntrack *d, const struct nf_conntrack *o); typedef void (*filter_attr)(struct nfct_filter *filter, const void *value); -- cgit v1.2.3