path: root/include
diff options
authorPablo Neira Ayuso <>2018-10-23 18:24:31 +0200
committerPablo Neira Ayuso <>2018-10-23 18:26:05 +0200
commitf1c2ace2631fa691b81a181bbbf2a3b29b0e69f6 (patch)
tree50c444c0643c68233a6bc3732f44d1b98e7d4cdb /include
parentb83dd8ff56ff9f3170ebec52aeebb7a3a62c9dc7 (diff)
src: move socket open and reopen to mnl.c
These functions are part of the mnl backend, move them there. Remove netlink_close_sock(), use direct call to mnl_socket_close(). Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include')
2 files changed, 2 insertions, 3 deletions
diff --git a/include/mnl.h b/include/mnl.h
index 3ddc82a0..676030e6 100644
--- a/include/mnl.h
+++ b/include/mnl.h
@@ -6,8 +6,8 @@
#include <rule.h>
#include <libmnl/libmnl.h>
-struct mnl_socket *netlink_open_sock(void);
-void netlink_close_sock(struct mnl_socket *nf_sock);
+struct mnl_socket *nft_mnl_socket_open(void);
+struct mnl_socket *nft_mnl_socket_reopen(struct mnl_socket *nf_sock);
uint32_t mnl_seqnum_alloc(uint32_t *seqnum);
uint16_t mnl_genid_get(struct netlink_ctx *ctx);
diff --git a/include/netlink.h b/include/netlink.h
index 66e400d8..af9313d5 100644
--- a/include/netlink.h
+++ b/include/netlink.h
@@ -157,7 +157,6 @@ extern void netlink_dump_obj(struct nftnl_obj *nlo, struct netlink_ctx *ctx);
extern int netlink_batch_send(struct netlink_ctx *ctx, struct list_head *err_list);
-extern struct mnl_socket *netlink_restart(struct mnl_socket *nf_sock);
#define netlink_abi_error() \
__netlink_abi_error(__FILE__, __LINE__, strerror(errno));
extern void __noreturn __netlink_abi_error(const char *file, int line, const char *reason);