• Home
  • Raw
  • Download

Lines Matching refs:rtnl_handle

33 find_handler(struct rtnl_handle *rtnl_handle, u_int16_t type)  in find_handler()  argument
36 for (h = rtnl_handle->handlers; h; h = h->next) { in find_handler()
43 static int call_handler(struct rtnl_handle *rtnl_handle, in call_handler() argument
47 struct rtnl_handler *h = find_handler(rtnl_handle, type); in call_handler()
60 int rtnl_handler_register(struct rtnl_handle *rtnl_handle, in rtnl_handler_register() argument
65 hdlr->next = rtnl_handle->handlers; in rtnl_handler_register()
66 rtnl_handle->handlers = hdlr; in rtnl_handler_register()
73 int rtnl_handler_unregister(struct rtnl_handle *rtnl_handle, in rtnl_handler_unregister() argument
81 for (h = rtnl_handle->handlers; h; h = h->next) { in rtnl_handler_unregister()
86 rtnl_handle->handlers = h->next; in rtnl_handler_unregister()
111 int rtnl_dump_type(struct rtnl_handle *rtnl_handle, unsigned int type) in rtnl_dump_type() argument
127 req.nlh.nlmsg_seq = rtnl_handle->rtnl_dump = ++(rtnl_handle->rtnl_seq); in rtnl_dump_type()
130 return sendto(rtnl_handle->rtnl_fd, &req, sizeof(req), 0, in rtnl_dump_type()
135 int rtnl_receive(struct rtnl_handle *rtnl_handle) in rtnl_receive() argument
150 status = recvmsg(rtnl_handle->rtnl_fd, &msg, 0); in rtnl_receive()
188 if (call_handler(rtnl_handle, h->nlmsg_type, h) == 0) in rtnl_receive()
196 int rtnl_receive_multi(struct rtnl_handle *rtnl_handle) in rtnl_receive_multi() argument
199 if (rtnl_receive(rtnl_handle) <= 0) in rtnl_receive_multi()
206 struct rtnl_handle *rtnl_open(void) in rtnl_open()
209 struct rtnl_handle *h; in rtnl_open()
211 h = calloc(1, sizeof(struct rtnl_handle)); in rtnl_open()
261 void rtnl_close(struct rtnl_handle *rtnl_handle) in rtnl_close() argument
263 close(rtnl_handle->rtnl_fd); in rtnl_close()
264 free(rtnl_handle); in rtnl_close()