libnl 3.5.0

Macros
VRF
Routing Library (libnl-route) » Links (Interfaces)

Virtual Routing and Forwarding link module. More...

## Macros
#define | VRF_TABLE_ID_MAX RT_TABLE_MAX

## VRF Object
struct rtnl_link * | rtnl_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)

## 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 181 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

  link | Link object

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

Definition at line 203 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

  link | Link object
  id | Pointer to store table identifier

Returns
  0 on success or a negative error code

Definition at line 215 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

  link | Link object
  id | Table identifier associated with VRF link

Returns
  0 on success or a negative error code

Definition at line 238 of file vrf.c.