libnl 3.7.0

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

◆ XFRMI_ATTR_LINK

#define XFRMI_ATTR_LINK   (1 << 0)

Definition at line 30 of file xfrmi.c.

◆ XFRMI_ATTR_IF_ID

#define XFRMI_ATTR_IF_ID   (1 << 1)

Definition at line 31 of file xfrmi.c.

◆ XFRMI_LINK_TYPE_NAME

#define XFRMI_LINK_TYPE_NAME   "xfrm"

Definition at line 33 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 190 of file xfrmi.c.

Function Documentation

◆ rtnl_link_xfrmi_alloc()

struct rtnl_link * rtnl_link_xfrmi_alloc ( void  )

Definition at line 197 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
linkLink object
Returns
True if link is a IXFRMI link, otherwise 0 is returned.

Definition at line 221 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
linkLink object
indexinterface index
Returns
0 on success or a negative error code

Definition at line 234 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
linkLink object
out_linkThe output value on success
Returns
0 on success or a negative error code

Definition at line 253 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
linkLink object
if_idxfrm if_id
Returns
0 on success or a negative error code

Definition at line 273 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
linkLink object
out_if_idThe output value on success
Returns
0 on success or a negative error code

Definition at line 292 of file xfrmi.c.

Variable Documentation

◆ link

uint32_t xfrmi_info::link

Definition at line 36 of file xfrmi.c.

◆ if_id

uint32_t xfrmi_info::if_id

Definition at line 37 of file xfrmi.c.

◆ xfrmi_mask

uint32_t xfrmi_info::xfrmi_mask

Definition at line 38 of file xfrmi.c.