libnl 3.5.0

Data Structures | Macros | Functions | Variables
XFRMI
Routing Library (libnl-route) » Links (Interfaces)

xfrmi link module More...

## Data Structures
struct | xfrmi_info

## Macros
#define | XFRMI_ATTR_LINK (1 << 0)
#define | XFRMI_ATTR_IF_ID (1 << 1)
#define | XFRMI_LINK_TYPE_NAME "xfrm"
#define | IS_XFRMI_LINK_ASSERT(link)

## Functions
struct rtnl_link * | rtnl_link_xfrmi_alloc (void)
int | rtnl_link_is_xfrmi (struct rtnl_link *link)
| Check if link is a XFRMI link. More...
int | rtnl_link_xfrmi_set_link (struct rtnl_link *link, uint32_t index)
| Set XFRMI link interface index. More...
int | rtnl_link_xfrmi_get_link (struct rtnl_link *link, uint32_t *out_link)
| Get XFRMI link interface index. More...
int | rtnl_link_xfrmi_set_if_id (struct rtnl_link *link, uint32_t if_id)
| Set XFRMI if_id. More...
int | rtnl_link_xfrmi_get_if_id (struct rtnl_link *link, uint32_t *out_if_id)
| Get XFRMI if_id. More...

## Variables
uint32_t | xfrmi_info::link
uint32_t | xfrmi_info::if_id
uint32_t | xfrmi_info::xfrmi_mask

## Detailed Description

xfrmi link module

Link Type Name: "xfrmi"

XFRMI Documentation (Netlink Routing Development Guide)

## Macro Definition Documentation

## ◆ IS_XFRMI_LINK_ASSERT

#define IS_XFRMI_LINK_ASSERT | ( |  | link | ) |

Value:
do { \
if ((link)->l_info_ops != &xfrmi_info_ops) { \
APPBUG("Link is not a xfrmi link. set type \"xfrmi\" first."); \
return -NLE_OPNOTSUPP; \
} \
} while(0)

Definition at line 196 of file xfrmi.c.

## Function Documentation

## ◆ rtnl_link_is_xfrmi()

int rtnl_link_is_xfrmi | ( | struct rtnl_link * | link | ) |

Check if link is a XFRMI link.

Parameters

  link | Link object

Returns
  True if link is a IXFRMI link, otherwise 0 is returned.

Definition at line 227 of file xfrmi.c.

## ◆ rtnl_link_xfrmi_set_link()

int rtnl_link_xfrmi_set_link | ( | struct rtnl_link * | link,
|  | uint32_t | index
| ) |  |

Set XFRMI link interface index.

Parameters

  link | Link object
  index | interface index

Returns
  0 on success or a negative error code

Definition at line 240 of file xfrmi.c.

## ◆ rtnl_link_xfrmi_get_link()

int rtnl_link_xfrmi_get_link | ( | struct rtnl_link * | link,
|  | uint32_t * | out_link
| ) |  |

Get XFRMI link interface index.

Parameters

  link | Link object
  out_link | The output value on success

Returns
  0 on sucess or a negative error code

Definition at line 259 of file xfrmi.c.

## ◆ rtnl_link_xfrmi_set_if_id()

int rtnl_link_xfrmi_set_if_id | ( | struct rtnl_link * | link,
|  | uint32_t | if_id
| ) |  |

Set XFRMI if_id.

Parameters

  link | Link object
  if_id | xfrm if_id

Returns
  0 on success or a negative error code

Definition at line 279 of file xfrmi.c.

## ◆ rtnl_link_xfrmi_get_if_id()

int rtnl_link_xfrmi_get_if_id | ( | struct rtnl_link * | link,
|  | uint32_t * | out_if_id
| ) |  |

Get XFRMI if_id.

Parameters

  link | Link object
  out_if_id | The output value on success

Returns
  0 on sucess or a negative error code

Definition at line 298 of file xfrmi.c.