Lines Matching refs:rlink
28 struct rtnl_link *rlink = NULL; in vlan_add() local
59 err = rtnl_link_get_kernel(handle, 0, if_name, &rlink); in vlan_add()
66 if_idx = rtnl_link_get_ifindex(rlink); in vlan_add()
67 rtnl_link_put(rlink); in vlan_add()
68 rlink = NULL; in vlan_add()
70 err = rtnl_link_get_kernel(handle, 0, vlan_if_name, &rlink); in vlan_add()
73 rtnl_link_put(rlink); in vlan_add()
74 rlink = NULL; in vlan_add()
81 rlink = rtnl_link_alloc(); in vlan_add()
82 if (!rlink) { in vlan_add()
87 err = rtnl_link_set_type(rlink, "vlan"); in vlan_add()
94 rtnl_link_set_link(rlink, if_idx); in vlan_add()
95 rtnl_link_set_name(rlink, vlan_if_name); in vlan_add()
97 err = rtnl_link_vlan_set_id(rlink, vid); in vlan_add()
104 err = rtnl_link_add(handle, rlink, NLM_F_CREATE); in vlan_add()
116 if (rlink) in vlan_add()
117 rtnl_link_put(rlink); in vlan_add()
128 struct rtnl_link *rlink = NULL; in vlan_rem() local
145 err = rtnl_link_get_kernel(handle, 0, if_name, &rlink); in vlan_rem()
153 err = rtnl_link_delete(handle, rlink); in vlan_rem()
163 if (rlink) in vlan_rem()
164 rtnl_link_put(rlink); in vlan_rem()