Lines Matching refs:rth
16 void FAST_FUNC xrtnl_open(struct rtnl_handle *rth/*, unsigned subscriptions*/) in xrtnl_open() argument
18 memset(rth, 0, sizeof(*rth)); in xrtnl_open()
19 rth->fd = xsocket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); in xrtnl_open()
20 rth->local.nl_family = AF_NETLINK; in xrtnl_open()
23 xbind(rth->fd, (struct sockaddr*)&rth->local, sizeof(rth->local)); in xrtnl_open()
24 bb_getsockname(rth->fd, (struct sockaddr*)&rth->local, sizeof(rth->local)); in xrtnl_open()
34 rth->seq = time(NULL); in xrtnl_open()
37 void FAST_FUNC xrtnl_wilddump_request(struct rtnl_handle *rth, int family, int type) in xrtnl_wilddump_request() argument
48 req.nlh.nlmsg_seq = rth->dump = ++rth->seq; in xrtnl_wilddump_request()
51 rtnl_send(rth, (void*)&req, sizeof(req)); in xrtnl_wilddump_request()
57 int FAST_FUNC rtnl_send_check(struct rtnl_handle *rth, const void *buf, int len) in rtnl_send_check() argument
63 status = write(rth->fd, buf, len); in rtnl_send_check()
68 status = recv(rth->fd, resp, sizeof(resp), MSG_DONTWAIT|MSG_PEEK); in rtnl_send_check()
92 int FAST_FUNC rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len) in rtnl_dump_request() argument
117 s.nlh.nlmsg_seq = rth->dump = ++rth->seq; in rtnl_dump_request()
119 return sendmsg(rth->fd, &s.msg, 0); in rtnl_dump_request()
122 static int rtnl_dump_filter(struct rtnl_handle *rth, in rtnl_dump_filter() argument
147 status = recvmsg(rth->fd, &msg, 0); in rtnl_dump_filter()
168 h->nlmsg_pid != rth->local.nl_pid || in rtnl_dump_filter()
169 h->nlmsg_seq != rth->dump in rtnl_dump_filter()
218 int FAST_FUNC xrtnl_dump_filter(struct rtnl_handle *rth, in xrtnl_dump_filter() argument
222 int ret = rtnl_dump_filter(rth, filter, arg1/*, NULL, NULL*/); in xrtnl_dump_filter()