From e0146fa254496dc12187053cd0cd6e5d20eb6a43 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 8 Jul 2017 05:07:23 +0530 Subject: 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 Signed-off-by: Pablo Neira Ayuso --- include/mnl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/mnl.h') 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); -- cgit v1.2.3