libnl  3.2.27

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

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::ipvti_mask
 

Detailed Description

ipvti link module

Link Type Name: "ipvti"

IPVTI Documentation (Netlink Routing Development Guide)

Macro Definition Documentation

#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 244 of file ipvti.c.

Function Documentation

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 274 of file ipvti.c.

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 286 of file ipvti.c.

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

+ Here is the call graph for this function:

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 310 of file ipvti.c.

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 328 of file ipvti.c.

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 344 of file ipvti.c.

uint32_t rtnl_link_ipvti_get_ikey ( struct rtnl_link link)

Get IPVTI tunnel ikey.

Parameters
linkLink object
Returns
ikey

Definition at line 362 of file ipvti.c.

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 378 of file ipvti.c.

uint32_t rtnl_link_ipvti_get_okey ( struct rtnl_link link)

Get IPVTI tunnel okey.

Parameters
linkLink object
Returns
okey value

Definition at line 396 of file ipvti.c.

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 412 of file ipvti.c.

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 430 of file ipvti.c.

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 446 of file ipvti.c.

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 464 of file ipvti.c.