summaryrefslogtreecommitdiffstats
path: root/include/mnl.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2017-07-08 05:07:23 +0530
committerPablo Neira Ayuso <pablo@netfilter.org>2017-07-17 14:26:30 +0200
commite0146fa254496dc12187053cd0cd6e5d20eb6a43 (patch)
treee41f1d9b9ae20849fe281cf14c97e817c194b68a /include/mnl.h
parentf63405f9203ce7a8464d585ad49ea67fb2c0bb3f (diff)
include: Pass nf_sock where needed as parameter
This socket should not be global, it is also hidden in many layers of code. Expose it as function parameters to decouple the netlink socket handling logic from the command parsing, evaluation and bytecode generation. Joint work with Varsha Rao. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/mnl.h')
-rw-r--r--include/mnl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/mnl.h b/include/mnl.h
index 9d2d9410..9f5b34f6 100644
--- a/include/mnl.h
+++ b/include/mnl.h
@@ -5,6 +5,9 @@
struct mnl_socket;
+struct mnl_socket *netlink_open_sock(void);
+void netlink_close_sock(struct mnl_socket *nf_sock);
+
uint32_t mnl_seqnum_alloc(void);
void mnl_genid_get(struct mnl_socket *nf_sock);