summaryrefslogtreecommitdiffstats
path: root/src/netlink.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-01-17 18:03:52 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2009-01-17 18:03:52 +0100
commit7ae054f8aae252ee9c57e26327675e466fc1d15d (patch)
tree8014a333b430477e336afd4621f49097c8d17435 /src/netlink.c
parentd581381870486687586dea4ebf4b7065ae408cd0 (diff)
src: support for redundant dedicated links
This patch adds support for redundant dedicated links. You can add a pool of dedicated links that can be used if the current active fails. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/netlink.c b/src/netlink.c
index 92fbf00..2266201 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -114,6 +114,22 @@ struct nfct_handle *nl_init_request_handler(void)
return h;
}
+struct nlif_handle *nl_init_interface_handler(void)
+{
+ struct nlif_handle *h;
+ h = nlif_open();
+ if (h == NULL)
+ return NULL;
+
+ if (nlif_query(h) == -1) {
+ free(h);
+ return NULL;
+ }
+ fcntl(nlif_fd(h), F_SETFL, O_NONBLOCK);
+
+ return h;
+}
+
static int warned = 0;
void nl_resize_socket_buffer(struct nfct_handle *h)