Lines Matching refs:link
34 struct rtnl_link *link; in rtnl_link_bond_alloc() local
37 if (!(link = rtnl_link_alloc())) in rtnl_link_bond_alloc()
40 if ((err = rtnl_link_set_type(link, "bond")) < 0) { in rtnl_link_bond_alloc()
41 rtnl_link_put(link); in rtnl_link_bond_alloc()
45 return link; in rtnl_link_bond_alloc()
75 struct rtnl_link *link; in rtnl_link_bond_add() local
78 if (!(link = rtnl_link_bond_alloc())) in rtnl_link_bond_add()
85 rtnl_link_set_name(link, name); in rtnl_link_bond_add()
87 err = rtnl_link_add(sock, link, NLM_F_CREATE); in rtnl_link_bond_add()
89 rtnl_link_put(link); in rtnl_link_bond_add()
110 struct rtnl_link *link; in rtnl_link_bond_enslave_ifindex() local
113 if (!(link = rtnl_link_bond_alloc())) in rtnl_link_bond_enslave_ifindex()
116 rtnl_link_set_ifindex(link, slave); in rtnl_link_bond_enslave_ifindex()
117 rtnl_link_set_master(link, master); in rtnl_link_bond_enslave_ifindex()
119 if ((err = rtnl_link_change(sock, link, link, 0)) < 0) in rtnl_link_bond_enslave_ifindex()
122 rtnl_link_put(link); in rtnl_link_bond_enslave_ifindex()
131 if ((err = rtnl_link_get_kernel(sock, slave, NULL, &link)) < 0) in rtnl_link_bond_enslave_ifindex()
134 if (rtnl_link_get_master(link) != master) in rtnl_link_bond_enslave_ifindex()
138 rtnl_link_put(link); in rtnl_link_bond_enslave_ifindex()