libnl 3.7.0
|
Functions | |
struct rtnl_link * | rtnl_link_bond_alloc (void) |
Allocate link object of type bond. More... | |
int | rtnl_link_bond_add (struct nl_sock *sock, const char *name, struct rtnl_link *opts) |
Create a new kernel bonding device. More... | |
int | rtnl_link_bond_enslave_ifindex (struct nl_sock *sock, int master, int slave) |
Add a link to a bond (enslave) More... | |
int | rtnl_link_bond_enslave (struct nl_sock *sock, struct rtnl_link *master, struct rtnl_link *slave) |
Add a link to a bond (enslave) More... | |
int | rtnl_link_bond_release_ifindex (struct nl_sock *sock, int slave) |
Release a link from a bond. More... | |
int | rtnl_link_bond_release (struct nl_sock *sock, struct rtnl_link *slave) |
Release a link from a bond. More... | |
Link Type Name: "bond"
Bonding Documentation (Netlink Routing Development Guide)
struct rtnl_link * rtnl_link_bond_alloc | ( | void | ) |
Allocate link object of type bond.
Definition at line 27 of file bonding.c.
References rtnl_link_alloc(), rtnl_link_put(), and rtnl_link_set_type().
Referenced by rtnl_link_bond_add(), and rtnl_link_bond_enslave_ifindex().
int rtnl_link_bond_add | ( | struct nl_sock * | sock, |
const char * | name, | ||
struct rtnl_link * | opts | ||
) |
Create a new kernel bonding device.
sock | netlink socket |
name | name of bonding device or NULL |
opts | bonding options (currently unused) |
Creates a new bonding device in the kernel. If no name is provided, the kernel will automatically pick a name of the form "type%d" (e.g. bond0, vlan1, etc.)
The opts argument is currently unused. In the future, it may be used to carry additional bonding options to be set when creating the bonding device.
Definition at line 66 of file bonding.c.
References rtnl_link_add(), rtnl_link_bond_alloc(), rtnl_link_get_name(), rtnl_link_put(), and rtnl_link_set_name().
int rtnl_link_bond_enslave_ifindex | ( | struct nl_sock * | sock, |
int | master, | ||
int | slave | ||
) |
Add a link to a bond (enslave)
sock | netlink socket |
master | ifindex of bonding master |
slave | ifindex of slave link to add to bond |
This function is identical to rtnl_link_bond_enslave() except that it takes interface indices instead of rtnl_link objcets.
Definition at line 101 of file bonding.c.
References rtnl_link_bond_alloc(), rtnl_link_change(), rtnl_link_get_kernel(), rtnl_link_get_master(), rtnl_link_put(), rtnl_link_set_ifindex(), and rtnl_link_set_master().
Referenced by rtnl_link_bond_enslave(), and rtnl_link_bond_release_ifindex().
int rtnl_link_bond_enslave | ( | struct nl_sock * | sock, |
struct rtnl_link * | master, | ||
struct rtnl_link * | slave | ||
) |
Add a link to a bond (enslave)
sock | netlink socket |
master | bonding master |
slave | slave link to add to bond |
Constructs a RTM_NEWLINK or RTM_SETLINK message adding the slave to the master and sends the request via the specified netlink socket.
Definition at line 157 of file bonding.c.
References rtnl_link_bond_enslave_ifindex(), and rtnl_link_get_ifindex().
int rtnl_link_bond_release_ifindex | ( | struct nl_sock * | sock, |
int | slave | ||
) |
Release a link from a bond.
sock | netlink socket |
slave | slave link to be released |
This function is identical to rtnl_link_bond_release() except that it takes an interface index instead of a rtnl_link object.
Definition at line 177 of file bonding.c.
References rtnl_link_bond_enslave_ifindex().
Referenced by rtnl_link_bond_release().
int rtnl_link_bond_release | ( | struct nl_sock * | sock, |
struct rtnl_link * | slave | ||
) |
Release a link from a bond.
sock | netlink socket |
slave | slave link to be released |
Constructs a RTM_NEWLINK or RTM_SETLINK message releasing the slave from its master and sends the request via the specified netlink socket.
Definition at line 201 of file bonding.c.
References rtnl_link_bond_release_ifindex(), and rtnl_link_get_ifindex().