Lines Matching refs:handle
35 struct nl_sock *handle = NULL;
55 handle = nl_socket_alloc();
56 if (!handle) {
61 if (nl_connect(handle, NETLINK_ROUTE) < 0) {
66 if (rtnl_link_alloc_cache(handle, AF_UNSPEC, &cache) < 0) {
108 if (rtnl_link_add(handle, rlink, NLM_F_CREATE) < 0) {
122 if (handle)
123 nl_socket_free(handle);
131 struct nl_sock *handle = NULL;
137 handle = nl_socket_alloc();
138 if (!handle) {
143 if (nl_connect(handle, NETLINK_ROUTE) < 0) {
148 if (rtnl_link_alloc_cache(handle, AF_UNSPEC, &cache) < 0) {
161 if (rtnl_link_delete(handle, rlink) < 0) {
174 if (handle)
175 nl_socket_free(handle);