aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--netlink/librtnl/rtnl.c9
-rw-r--r--router/router/tap_inject_tap.c6
2 files changed, 8 insertions, 7 deletions
diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c
index 04f0440..fa31617 100644
--- a/netlink/librtnl/rtnl.c
+++ b/netlink/librtnl/rtnl.c
@@ -31,6 +31,7 @@
#include <sys/types.h>
#include <sys/wait.h>
+#include <errno.h>
#undef DBL_MAX
#define DBL_MAX 1000000000.0
@@ -102,7 +103,7 @@ rtnl_cancel_timeout(rtnl_ns_t *ns)
ns->timeout = DBL_MAX;
}
-static clib_error_t *rtnl_read_cb(struct unix_file * f)
+static clib_error_t *rtnl_read_cb(struct clib_file * f)
{
rtnl_main_t *rm = &rtnl_main;
vlib_main_t *vm = vlib_get_main();
@@ -138,7 +139,7 @@ int rtnl_dump_request(rtnl_ns_t *ns, int type, void *req, size_t len)
static void rtnl_socket_close(rtnl_ns_t *ns)
{
- unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
+ clib_file_del(&file_main, &file_main.file_pool[ns->unix_index]);
close(ns->rtnl_socket);
}
@@ -259,11 +260,11 @@ static int rtnl_socket_open(rtnl_ns_t *ns)
return -3;
}
- unix_file_t template = {0};
+ clib_file_t template = {0};
template.read_function = rtnl_read_cb;
template.file_descriptor = ns->rtnl_socket;
template.private_data = (uword) (ns - rm->streams);
- ns->unix_index = unix_file_add (&unix_main, &template);
+ ns->unix_index = clib_file_add (&file_main, &template);
return 0;
}
diff --git a/router/router/tap_inject_tap.c b/router/router/tap_inject_tap.c
index 9650323..a3ec9ff 100644
--- a/router/router/tap_inject_tap.c
+++ b/router/router/tap_inject_tap.c
@@ -30,7 +30,7 @@
static clib_error_t *
-tap_inject_tap_read (unix_file_t * f)
+tap_inject_tap_read (clib_file_t * f)
{
vlib_main_t * vm = vlib_get_main ();
tap_inject_main_t * im = tap_inject_get_main ();
@@ -52,7 +52,7 @@ tap_inject_tap_connect (vnet_hw_interface_t * hw)
static const int one = 1;
int fd;
struct ifreq ifr;
- unix_file_t template;
+ clib_file_t template;
u32 tap_fd;
u8 * name;
@@ -120,7 +120,7 @@ tap_inject_tap_connect (vnet_hw_interface_t * hw)
template.read_function = tap_inject_tap_read;
template.file_descriptor = tap_fd;
- unix_file_add (&unix_main, &template);
+ clib_file_add (&file_main, &template);
tap_inject_insert_tap (sw->sw_if_index, tap_fd, ifr.ifr_ifindex);