From 3c78a4543e12f5e82bdd771971d3534fa452117b Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 1 Oct 2013 13:23:39 +0200 Subject: nfct: src: consolidate netlink socket creation Open the socket from the main function, then pass it as parameter to the corresponding interpreter. Signed-off-by: Pablo Neira Ayuso --- include/nfct.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/nfct.h b/include/nfct.h index 93717c5..682fe3a 100644 --- a/include/nfct.h +++ b/include/nfct.h @@ -28,11 +28,12 @@ void nfct_perror(const char *msg); struct nfct_extension { struct list_head head; int type; - int (*parse_params)(int argc, char *argv[]); + int (*parse_params)(struct mnl_socket *nl, int argc, char *argv[]); }; void nfct_extension_register(struct nfct_extension *ext); +struct mnl_socket *nfct_mnl_open(void); int nfct_mnl_talk(struct mnl_socket *nl, struct nlmsghdr *nlh, uint32_t seq, uint32_t portid, int (*cb)(const struct nlmsghdr *nlh, void *data), -- cgit v1.2.3