Lines Matching refs:nl

80     struct mnl_socket *nl;  in if_act_on_link()  local
114 nl = mnl_socket_open(NETLINK_ROUTE); in if_act_on_link()
115 if (nl == NULL) in if_act_on_link()
121 if (mnl_socket_bind(nl, 0, MNL_SOCKET_AUTOPID) < 0) in if_act_on_link()
126 portid = mnl_socket_get_portid(nl); in if_act_on_link()
128 if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) in if_act_on_link()
134 ret = mnl_socket_recvfrom(nl, buf, sizeof(buf)); in if_act_on_link()
148 mnl_socket_close(nl); in if_act_on_link()
167 struct mnl_socket *nl; in if_set_mtu() local
197 nl = mnl_socket_open(NETLINK_ROUTE); in if_set_mtu()
198 if (nl == NULL) in if_set_mtu()
204 if (mnl_socket_bind(nl, 0, MNL_SOCKET_AUTOPID) < 0) in if_set_mtu()
209 portid = mnl_socket_get_portid(nl); in if_set_mtu()
211 if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) in if_set_mtu()
217 ret = mnl_socket_recvfrom(nl, buf, sizeof(buf)); in if_set_mtu()
231 mnl_socket_close(nl); in if_set_mtu()
249 struct mnl_socket *nl; in if_act_on_addr() local
300 nl = mnl_socket_open(NETLINK_ROUTE); in if_act_on_addr()
301 if (nl == NULL) in if_act_on_addr()
307 if (mnl_socket_bind(nl, 0, MNL_SOCKET_AUTOPID) < 0) in if_act_on_addr()
312 portid = mnl_socket_get_portid(nl); in if_act_on_addr()
314 if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) in if_act_on_addr()
320 ret = mnl_socket_recvfrom(nl, buf, sizeof(buf)); in if_act_on_addr()
334 mnl_socket_close(nl); in if_act_on_addr()
442 struct mnl_socket *nl; in if_get_addr() local
464 nl = mnl_socket_open(NETLINK_ROUTE); in if_get_addr()
465 if (nl == NULL) in if_get_addr()
471 if (mnl_socket_bind(nl, 0, MNL_SOCKET_AUTOPID) < 0) in if_get_addr()
476 portid = mnl_socket_get_portid(nl); in if_get_addr()
478 if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) in if_get_addr()
484 ret = mnl_socket_recvfrom(nl, buf, sizeof(buf)); in if_get_addr()
490 ret = mnl_socket_recvfrom(nl, buf, sizeof(buf)); in if_get_addr()
497 mnl_socket_close(nl); in if_get_addr()
549 struct mnl_socket *nl; in if_act_on_route() local
600 nl = mnl_socket_open(NETLINK_ROUTE); in if_act_on_route()
601 if (nl == NULL) in if_act_on_route()
607 if (mnl_socket_bind(nl, 0, MNL_SOCKET_AUTOPID) < 0) in if_act_on_route()
612 portid = mnl_socket_get_portid(nl); in if_act_on_route()
614 if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) in if_act_on_route()
620 ret = mnl_socket_recvfrom(nl, buf, sizeof(buf)); in if_act_on_route()
634 mnl_socket_close(nl); in if_act_on_route()