From 38d44b9935a3001ce7872bcb22c481dcfe504925 Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org" Date: Thu, 27 Oct 2005 02:08:38 +0000 Subject: o new nfct_handler prototype o NFCT_COUNTERS splitted in NFCT_COUNTERS_[ORIG|RPLY] o all global vars are now static o kill nfct_set_handler, it was too much o fixed very stupid bug in counters printing o fixed conntrack getting: invalid netlink flags NLM_F_[ROOT|MATCH] o nfnl_send returns the proper error to the client, instead of returning -1 o some cleanup's: killed the ret, it was useless o test for the conntrack API completed, still missing the expectation test --- include/libnetfilter_conntrack/libnetfilter_conntrack.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/libnetfilter_conntrack/libnetfilter_conntrack.h b/include/libnetfilter_conntrack/libnetfilter_conntrack.h index 1f09354..f642163 100644 --- a/include/libnetfilter_conntrack/libnetfilter_conntrack.h +++ b/include/libnetfilter_conntrack/libnetfilter_conntrack.h @@ -138,13 +138,16 @@ enum { NFCT_MARK_BIT = 3, NFCT_MARK = (1 << NFCT_MARK_BIT), - NFCT_COUNTERS_BIT = 4, - NFCT_COUNTERS = (1 << NFCT_COUNTERS_BIT), + NFCT_COUNTERS_ORIG_BIT = 4, + NFCT_COUNTERS_ORIG = (1 << NFCT_COUNTERS_ORIG_BIT), - NFCT_USE_BIT = 5, + NFCT_COUNTERS_RPLY_BIT = 5, + NFCT_COUNTERS_RPLY = (1 << NFCT_COUNTERS_RPLY_BIT), + + NFCT_USE_BIT = 6, NFCT_USE = (1 << NFCT_USE_BIT), - NFCT_ID_BIT = 6, + NFCT_ID_BIT = 7, NFCT_ID = (1 << NFCT_ID_BIT) }; @@ -155,8 +158,10 @@ enum { NFCT_MSG_DESTROY }; +struct nfct_handle; typedef int (*nfct_callback)(void *arg, unsigned int flags, int); -typedef int (*nfct_handler)(struct sockaddr_nl *, struct nlmsghdr *, void *arg); +typedef int (*nfct_handler)(struct nfct_handle *cth, struct nlmsghdr *nlh, + void *arg); struct nfct_handle { struct nfnl_handle nfnlh; -- cgit v1.2.3