libnl 3.7.0

Virtual Routing and Forwarding link module. More...

Macros

#define VRF_TABLE_ID_MAX   RT_TABLE_MAX
 

VRF Object

struct rtnl_linkrtnl_link_vrf_alloc (void)
 Allocate link object of type VRF. More...
 
int rtnl_link_is_vrf (struct rtnl_link *link)
 Check if link is a VRF link. More...
 
int rtnl_link_vrf_get_tableid (struct rtnl_link *link, uint32_t *id)
 Get VRF table id. More...
 
int rtnl_link_vrf_set_tableid (struct rtnl_link *link, uint32_t id)
 Set VRF table id. More...
 

Detailed Description

Virtual Routing and Forwarding link module.

Link Type Name: "vrf"

VRF Documentation (Netlink Routing Development Guide)

Macro Definition Documentation

◆ VRF_TABLE_ID_MAX

#define VRF_TABLE_ID_MAX   RT_TABLE_MAX

Definition at line 32 of file vrf.c.

Function Documentation

◆ rtnl_link_vrf_alloc()

struct rtnl_link * rtnl_link_vrf_alloc ( void  )

Allocate link object of type VRF.

Returns
Allocated link object or NULL.

Definition at line 175 of file vrf.c.

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

+ Here is the call graph for this function:

◆ rtnl_link_is_vrf()

int rtnl_link_is_vrf ( struct rtnl_link link)

Check if link is a VRF link.

Parameters
linkLink object
Returns
True if link is a VRF link, otherwise false is returned.

Definition at line 196 of file vrf.c.

◆ rtnl_link_vrf_get_tableid()

int rtnl_link_vrf_get_tableid ( struct rtnl_link link,
uint32_t *  id 
)

Get VRF table id.

Parameters
linkLink object
idPointer to store table identifier
Returns
0 on success or a negative error code

Definition at line 208 of file vrf.c.

◆ rtnl_link_vrf_set_tableid()

int rtnl_link_vrf_set_tableid ( struct rtnl_link link,
uint32_t  id 
)

Set VRF table id.

Parameters
linkLink object
idTable identifier associated with VRF link
Returns
0 on success or a negative error code

Definition at line 231 of file vrf.c.