libnl 3.7.0

ipvti link module More...

Data Structures

struct  ipvti_info
 

Macros

#define IPVTI_ATTR_LINK   (1 << 0)
 
#define IPVTI_ATTR_IKEY   (1 << 1)
 
#define IPVTI_ATTR_OKEY   (1 << 2)
 
#define IPVTI_ATTR_LOCAL   (1 << 3)
 
#define IPVTI_ATTR_REMOTE   (1 << 4)
 
#define IPVTI_ATTR_FWMARK   (1 << 5)
 
#define IS_IPVTI_LINK_ASSERT(link)
 

Functions

struct rtnl_linkrtnl_link_ipvti_alloc (void)
 
int rtnl_link_is_ipvti (struct rtnl_link *link)
 Check if link is a IPVTI link. More...
 
int rtnl_link_ipvti_add (struct nl_sock *sk, const char *name)
 Create a new ipvti tunnel device. More...
 
int rtnl_link_ipvti_set_link (struct rtnl_link *link, uint32_t index)
 Set IPVTI tunnel interface index. More...
 
uint32_t rtnl_link_ipvti_get_link (struct rtnl_link *link)
 Get IPVTI tunnel interface index. More...
 
int rtnl_link_ipvti_set_ikey (struct rtnl_link *link, uint32_t ikey)
 Set IPVTI tunnel set ikey. More...
 
uint32_t rtnl_link_ipvti_get_ikey (struct rtnl_link *link)
 Get IPVTI tunnel ikey. More...
 
int rtnl_link_ipvti_set_okey (struct rtnl_link *link, uint32_t okey)
 Set IPVTI tunnel set okey. More...
 
uint32_t rtnl_link_ipvti_get_okey (struct rtnl_link *link)
 Get IPVTI tunnel okey. More...
 
int rtnl_link_ipvti_set_local (struct rtnl_link *link, uint32_t addr)
 Set IPVTI tunnel local address. More...
 
uint32_t rtnl_link_ipvti_get_local (struct rtnl_link *link)
 Get IPVTI tunnel local address. More...
 
int rtnl_link_ipvti_set_remote (struct rtnl_link *link, uint32_t remote)
 Set IPVTI tunnel remote address. More...
 
uint32_t rtnl_link_ipvti_get_remote (struct rtnl_link *link)
 Get IPVTI tunnel remote address. More...
 
int rtnl_link_ipvti_set_fwmark (struct rtnl_link *link, uint32_t fwmark)
 Set IPVTI tunnel fwmark. More...
 
int rtnl_link_ipvti_get_fwmark (struct rtnl_link *link, uint32_t *fwmark)
 Get IPVTI tunnel fwmark. More...
 

Variables

uint32_t ipvti_info::link
 
uint32_t ipvti_info::ikey
 
uint32_t ipvti_info::okey
 
uint32_t ipvti_info::local
 
uint32_t ipvti_info::remote
 
uint32_t ipvti_info::fwmark
 
uint32_t ipvti_info::ipvti_mask
 

Detailed Description

ipvti link module

Link Type Name: "ipvti"

IPVTI Documentation (Netlink Routing Development Guide)

Macro Definition Documentation

◆ IPVTI_ATTR_LINK

#define IPVTI_ATTR_LINK   (1 << 0)

Definition at line 29 of file ipvti.c.

◆ IPVTI_ATTR_IKEY

#define IPVTI_ATTR_IKEY   (1 << 1)

Definition at line 30 of file ipvti.c.

◆ IPVTI_ATTR_OKEY

#define IPVTI_ATTR_OKEY   (1 << 2)

Definition at line 31 of file ipvti.c.

◆ IPVTI_ATTR_LOCAL

#define IPVTI_ATTR_LOCAL   (1 << 3)

Definition at line 32 of file ipvti.c.

◆ IPVTI_ATTR_REMOTE

#define IPVTI_ATTR_REMOTE   (1 << 4)

Definition at line 33 of file ipvti.c.

◆ IPVTI_ATTR_FWMARK

#define IPVTI_ATTR_FWMARK   (1 << 5)

Definition at line 34 of file ipvti.c.

◆ IS_IPVTI_LINK_ASSERT

#define IS_IPVTI_LINK_ASSERT (   link)
Value:
if ((link)->l_info_ops != &ipvti_info_ops) { \
APPBUG("Link is not a ipvti link. set type \vti\" first."); \
return -NLE_OPNOTSUPP; \
}

Definition at line 261 of file ipvti.c.

Function Documentation

◆ rtnl_link_ipvti_alloc()

struct rtnl_link * rtnl_link_ipvti_alloc ( void  )

Definition at line 267 of file ipvti.c.

◆ rtnl_link_is_ipvti()

int rtnl_link_is_ipvti ( struct rtnl_link link)

Check if link is a IPVTI link.

Parameters
linkLink object
Returns
True if link is a IPVTI link, otherwise 0 is returned.

Definition at line 291 of file ipvti.c.

◆ rtnl_link_ipvti_add()

int rtnl_link_ipvti_add ( struct nl_sock *  sk,
const char *  name 
)

Create a new ipvti tunnel device.

Parameters
socknetlink socket
namename of the tunnel deviceL

Creates a new ipvti tunnel device in the kernel

Returns
0 on success or a negative error code

Definition at line 303 of file ipvti.c.

References rtnl_link_add(), rtnl_link_put(), and rtnl_link_set_name().

+ Here is the call graph for this function:

◆ rtnl_link_ipvti_set_link()

int rtnl_link_ipvti_set_link ( struct rtnl_link link,
uint32_t  index 
)

Set IPVTI tunnel interface index.

Parameters
linkLink object
indexinterface index
Returns
0 on success or a negative error code

Definition at line 327 of file ipvti.c.

◆ rtnl_link_ipvti_get_link()

uint32_t rtnl_link_ipvti_get_link ( struct rtnl_link link)

Get IPVTI tunnel interface index.

Parameters
linkLink object
Returns
interface index

Definition at line 345 of file ipvti.c.

◆ rtnl_link_ipvti_set_ikey()

int rtnl_link_ipvti_set_ikey ( struct rtnl_link link,
uint32_t  ikey 
)

Set IPVTI tunnel set ikey.

Parameters
linkLink object
ikeygre ikey
Returns
0 on success or a negative error code

Definition at line 361 of file ipvti.c.

◆ rtnl_link_ipvti_get_ikey()

uint32_t rtnl_link_ipvti_get_ikey ( struct rtnl_link link)

Get IPVTI tunnel ikey.

Parameters
linkLink object
Returns
ikey

Definition at line 379 of file ipvti.c.

◆ rtnl_link_ipvti_set_okey()

int rtnl_link_ipvti_set_okey ( struct rtnl_link link,
uint32_t  okey 
)

Set IPVTI tunnel set okey.

Parameters
linkLink object
okeygre okey
Returns
0 on success or a negative error code

Definition at line 395 of file ipvti.c.

◆ rtnl_link_ipvti_get_okey()

uint32_t rtnl_link_ipvti_get_okey ( struct rtnl_link link)

Get IPVTI tunnel okey.

Parameters
linkLink object
Returns
okey value

Definition at line 413 of file ipvti.c.

◆ rtnl_link_ipvti_set_local()

int rtnl_link_ipvti_set_local ( struct rtnl_link link,
uint32_t  addr 
)

Set IPVTI tunnel local address.

Parameters
linkLink object
addrlocal address
Returns
0 on success or a negative error code

Definition at line 429 of file ipvti.c.

◆ rtnl_link_ipvti_get_local()

uint32_t rtnl_link_ipvti_get_local ( struct rtnl_link link)

Get IPVTI tunnel local address.

Parameters
linkLink object
Returns
local address

Definition at line 447 of file ipvti.c.

◆ rtnl_link_ipvti_set_remote()

int rtnl_link_ipvti_set_remote ( struct rtnl_link link,
uint32_t  remote 
)

Set IPVTI tunnel remote address.

Parameters
linkLink object
remoteremote address
Returns
0 on success or a negative error code

Definition at line 463 of file ipvti.c.

◆ rtnl_link_ipvti_get_remote()

uint32_t rtnl_link_ipvti_get_remote ( struct rtnl_link link)

Get IPVTI tunnel remote address.

Parameters
linkLink object
Returns
remote address on success or a negative error code

Definition at line 481 of file ipvti.c.

◆ rtnl_link_ipvti_set_fwmark()

int rtnl_link_ipvti_set_fwmark ( struct rtnl_link link,
uint32_t  fwmark 
)

Set IPVTI tunnel fwmark.

Parameters
linkLink object
fwmarkfwmark
Returns
0 on success or a negative error code

Definition at line 497 of file ipvti.c.

◆ rtnl_link_ipvti_get_fwmark()

int rtnl_link_ipvti_get_fwmark ( struct rtnl_link link,
uint32_t *  fwmark 
)

Get IPVTI tunnel fwmark.

Parameters
linkLink object
fwmarkaddr to fill in with the fwmark
Returns
0 on success or a negative error code

Definition at line 516 of file ipvti.c.

Variable Documentation

◆ link

uint32_t ipvti_info::link

Definition at line 38 of file ipvti.c.

◆ ikey

uint32_t ipvti_info::ikey

Definition at line 39 of file ipvti.c.

◆ okey

uint32_t ipvti_info::okey

Definition at line 40 of file ipvti.c.

◆ local

uint32_t ipvti_info::local

Definition at line 41 of file ipvti.c.

◆ remote

uint32_t ipvti_info::remote

Definition at line 42 of file ipvti.c.

◆ fwmark

uint32_t ipvti_info::fwmark

Definition at line 43 of file ipvti.c.

◆ ipvti_mask

uint32_t ipvti_info::ipvti_mask

Definition at line 44 of file ipvti.c.