diff options
author | Michael Borokhovich <michaelbor@gmail.com> | 2017-11-07 04:50:23 +0000 |
---|---|---|
committer | Michael Borokhovich <michaelbor@gmail.com> | 2017-11-07 04:51:51 +0000 |
commit | 042a782c530ceb58507d697726e68ad7fe4fe023 (patch) | |
tree | d541804fb6cf956e6dfbcb2a7dca10b46362cdd7 /netlink/librtnl | |
parent | ea3a7716b61e8e742058435e6d4f8c911f20b7d6 (diff) |
Changing unix_file to clib_file in order to work with VPP 1801
Change-Id: Ie27f1884692802ae1b6a48ac25ef5aef25495c0a
Signed-off-by: Michael Borokhovich <michaelbor@gmail.com>
Diffstat (limited to 'netlink/librtnl')
-rw-r--r-- | netlink/librtnl/rtnl.c | 9 |
1 files changed, 5 insertions, 4 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; } |