From a4f4647b4b7f32f2d1caab98544802c8cdd7b4d6 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 7 Aug 2008 14:52:41 +0200 Subject: netlink: add getter and check existence functions This patch adds nl_get_conntrack and it changes the behaviour of nl_exist_conntrack. Now, nl_get_conntrack requests the kernel for a conntrack and updates the cached entry. On the other hand, nl_exist_conntrack only inquiries for the existence of the entry. Signed-off-by: Pablo Neira Ayuso --- include/conntrackd.h | 1 + include/netlink.h | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'include') diff --git a/include/conntrackd.h b/include/conntrackd.h index 2f0d7e5..60bb2de 100644 --- a/include/conntrackd.h +++ b/include/conntrackd.h @@ -110,6 +110,7 @@ struct ct_general_state { struct nfct_filter *filter; /* event filter */ struct nfct_handle *dump; /* dump handler */ + struct nfct_handle *request; /* request handler */ struct nfct_handle *overrun; /* overrun handler */ struct alarm_block overrun_alarm; diff --git a/include/netlink.h b/include/netlink.h index a46fe11..a7b7dda 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -10,6 +10,8 @@ int nl_init_event_handler(void); int nl_init_dump_handler(void); +int nl_init_request_handler(void); + int nl_init_overrun_handler(void); int nl_overrun_request_resync(void); @@ -20,6 +22,8 @@ int nl_dump_conntrack_table(void); int nl_exist_conntrack(struct nf_conntrack *ct); +int nl_get_conntrack(struct nf_conntrack *ct); + int nl_create_conntrack(struct nf_conntrack *ct); int nl_update_conntrack(struct nf_conntrack *ct); -- cgit v1.2.3