libnl: XFRMI

libnl 3.10.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.
int | rtnl_link_xfrmi_set_link (struct rtnl_link *link, uint32_t index)
| Set XFRMI link interface index.
int | rtnl_link_xfrmi_get_link (struct rtnl_link *link, uint32_t *out_link)
| Get XFRMI link interface index.
int | rtnl_link_xfrmi_set_if_id (struct rtnl_link *link, uint32_t if_id)
| Set XFRMI if_id.
int | rtnl_link_xfrmi_get_if_id (struct rtnl_link *link, uint32_t *out_if_id)
| Get XFRMI if_id.

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

## ◆ XFRMI_ATTR_LINK

#define XFRMI_ATTR_LINK (1 << 0)

Definition at line 33 of file xfrmi.c.

## ◆ XFRMI_ATTR_IF_ID

#define XFRMI_ATTR_IF_ID (1 << 1)

Definition at line 34 of file xfrmi.c.

## ◆ XFRMI_LINK_TYPE_NAME

#define XFRMI_LINK_TYPE_NAME "xfrm"

Definition at line 36 of file xfrmi.c.

## ◆ 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 193 of file xfrmi.c.

## Function Documentation

## ◆ rtnl_link_xfrmi_alloc()

struct rtnl_link * rtnl_link_xfrmi_alloc | ( | void |  | ) |

Definition at line 200 of file xfrmi.c.

## ◆ 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 224 of file xfrmi.c.

References rtnl_link_info_ops::io_name.

## ◆ 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 237 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 success or a negative error code

Definition at line 256 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 276 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 success or a negative error code

Definition at line 295 of file xfrmi.c.

## Variable Documentation

## ◆ link

uint32_t xfrmi_info::link

Definition at line 39 of file xfrmi.c.

## ◆ if_id

uint32_t xfrmi_info::if_id

Definition at line 40 of file xfrmi.c.

## ◆ xfrmi_mask

uint32_t xfrmi_info::xfrmi_mask

Definition at line 41 of file xfrmi.c.