diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-02-05 21:28:02 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-02-05 21:28:02 +0100 |
commit | c3ef4d9b32ca653571f0976f73aaa99218a36db0 (patch) | |
tree | 26c70814dd827be0e1f2ecf6bfdfa5aff064908a /src/netlink.c | |
parent | 9a29b01005868fef138651e9bc831e179a767b89 (diff) | |
download | conntrack-tools-c3ef4d9b32ca653571f0976f73aaa99218a36db0.tar.gz conntrack-tools-c3ef4d9b32ca653571f0976f73aaa99218a36db0.zip |
netlink: refactorize several nl_init_*_handler() functions
This patch removes:
* nl_init_dump_handler()
* nl_init_request_handler()
* nl_init_resync_handler()
since they all look very similar.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/netlink.c')
-rw-r--r-- | src/netlink.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/netlink.c b/src/netlink.c index a9e3d2d..78cc466 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -79,42 +79,6 @@ struct nfct_handle *nl_init_event_handler(void) return h; } -struct nfct_handle *nl_init_dump_handler(void) -{ - struct nfct_handle *h; - - /* open dump netlink socket */ - h = nfct_open(CONNTRACK, 0); - if (h == NULL) - return NULL; - - return h; -} - -struct nfct_handle *nl_init_resync_handler(void) -{ - struct nfct_handle *h; - - h = nfct_open(CONNTRACK, 0); - if (h == NULL) - return NULL; - - fcntl(nfct_fd(h), F_SETFL, O_NONBLOCK); - - return h; -} - -struct nfct_handle *nl_init_request_handler(void) -{ - struct nfct_handle *h; - - h = nfct_open(CONNTRACK, 0); - if (h == NULL) - return NULL; - - return h; -} - struct nlif_handle *nl_init_interface_handler(void) { struct nlif_handle *h; |