libnl 3.7.0

Functions

struct rtnl_linkrtnl_link_team_alloc (void)
 Allocate link object of type team. More...
 
int rtnl_link_team_add (struct nl_sock *sock, const char *name, struct rtnl_link *opts)
 Create a new kernel team device. More...
 

Detailed Description

Link Type Name: "team"

Team Documentation (Netlink Routing Development Guide)

Function Documentation

◆ rtnl_link_team_alloc()

struct rtnl_link * rtnl_link_team_alloc ( void  )

Allocate link object of type team.

Returns
Allocated link object or NULL.

Definition at line 27 of file team.c.

References rtnl_link_alloc(), rtnl_link_put(), and rtnl_link_set_type().

Referenced by rtnl_link_team_add().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtnl_link_team_add()

int rtnl_link_team_add ( struct nl_sock *  sock,
const char *  name,
struct rtnl_link opts 
)

Create a new kernel team device.

Parameters
socknetlink socket
namename of team device or NULL
optsteam options (currently unused)

Creates a new team device in the kernel. If no name is provided, the kernel will automatically pick a name of the form "type%d" (e.g. team0, vlan1, etc.)

The opts argument is currently unused. In the future, it may be used to carry additional team options to be set when creating the team device.

Note
When letting the kernel assign a name, it will become difficult to retrieve the interface afterwards because you have to guess the name the kernel has chosen. It is therefore not recommended to not provide a device name.
See also
rtnl_link_team_enslave()
rtnl_link_team_release()
Returns
0 on success or a negative error code

Definition at line 66 of file team.c.

References rtnl_link_add(), rtnl_link_get_name(), rtnl_link_put(), rtnl_link_set_name(), and rtnl_link_team_alloc().

+ Here is the call graph for this function: