libnl  3.5.0

ipip link module More...

Data Structures

struct  ipip_info
 

Macros

#define IPIP_ATTR_LINK   (1 << 0)
 
#define IPIP_ATTR_LOCAL   (1 << 1)
 
#define IPIP_ATTR_REMOTE   (1 << 2)
 
#define IPIP_ATTR_TTL   (1 << 3)
 
#define IPIP_ATTR_TOS   (1 << 4)
 
#define IPIP_ATTR_PMTUDISC   (1 << 5)
 
#define IS_IPIP_LINK_ASSERT(link)
 

Functions

struct rtnl_linkrtnl_link_ipip_alloc (void)
 
int rtnl_link_is_ipip (struct rtnl_link *link)
 Check if link is a IPIP link. More...
 
int rtnl_link_ipip_add (struct nl_sock *sk, const char *name)
 Create a new ipip tunnel device. More...
 
int rtnl_link_ipip_set_link (struct rtnl_link *link, uint32_t index)
 Set IPIP tunnel interface index. More...
 
uint32_t rtnl_link_ipip_get_link (struct rtnl_link *link)
 Get IPIP tunnel interface index. More...
 
int rtnl_link_ipip_set_local (struct rtnl_link *link, uint32_t addr)
 Set IPIP tunnel local address. More...
 
uint32_t rtnl_link_ipip_get_local (struct rtnl_link *link)
 Get IPIP tunnel local address. More...
 
int rtnl_link_ipip_set_remote (struct rtnl_link *link, uint32_t addr)
 Set IPIP tunnel remote address. More...
 
uint32_t rtnl_link_ipip_get_remote (struct rtnl_link *link)
 Get IPIP tunnel remote address. More...
 
int rtnl_link_ipip_set_ttl (struct rtnl_link *link, uint8_t ttl)
 Set IPIP tunnel ttl. More...
 
uint8_t rtnl_link_ipip_get_ttl (struct rtnl_link *link)
 Get IPIP tunnel ttl. More...
 
int rtnl_link_ipip_set_tos (struct rtnl_link *link, uint8_t tos)
 Set IPIP tunnel tos. More...
 
uint8_t rtnl_link_ipip_get_tos (struct rtnl_link *link)
 Get IPIP tunnel tos. More...
 
int rtnl_link_ipip_set_pmtudisc (struct rtnl_link *link, uint8_t pmtudisc)
 Set IPIP tunnel path MTU discovery. More...
 
uint8_t rtnl_link_ipip_get_pmtudisc (struct rtnl_link *link)
 Get IPIP path MTU discovery. More...
 

Variables

uint8_t ipip_info::ttl
 
uint8_t ipip_info::tos
 
uint8_t ipip_info::pmtudisc
 
uint32_t ipip_info::link
 
uint32_t ipip_info::local
 
uint32_t ipip_info::remote
 
uint32_t ipip_info::ipip_mask
 

Detailed Description

ipip link module

Link Type Name: "ipip"

IPIP Documentation (Netlink Routing Development Guide)

Macro Definition Documentation

◆ IS_IPIP_LINK_ASSERT

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

Definition at line 266 of file ipip.c.

Function Documentation

◆ rtnl_link_is_ipip()

int rtnl_link_is_ipip ( struct rtnl_link link)

Check if link is a IPIP link.

Parameters
linkLink object
Returns
True if link is a IPIP link, otherwise false is returned.

Definition at line 296 of file ipip.c.

◆ rtnl_link_ipip_add()

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

Create a new ipip tunnel device.

Parameters
socknetlink socket
namename of the tunnel deviceL

Creates a new ipip tunnel device in the kernel

Returns
0 on success or a negative error code

Definition at line 309 of file ipip.c.

◆ rtnl_link_ipip_set_link()

int rtnl_link_ipip_set_link ( struct rtnl_link link,
uint32_t  index 
)

Set IPIP tunnel interface index.

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

Definition at line 334 of file ipip.c.

◆ rtnl_link_ipip_get_link()

uint32_t rtnl_link_ipip_get_link ( struct rtnl_link link)

Get IPIP tunnel interface index.

Parameters
linkLink object
Returns
interface index value

Definition at line 352 of file ipip.c.

◆ rtnl_link_ipip_set_local()

int rtnl_link_ipip_set_local ( struct rtnl_link link,
uint32_t  addr 
)

Set IPIP tunnel local address.

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

Definition at line 368 of file ipip.c.

◆ rtnl_link_ipip_get_local()

uint32_t rtnl_link_ipip_get_local ( struct rtnl_link link)

Get IPIP tunnel local address.

Parameters
linkLink object
Returns
local address value

Definition at line 386 of file ipip.c.

◆ rtnl_link_ipip_set_remote()

int rtnl_link_ipip_set_remote ( struct rtnl_link link,
uint32_t  addr 
)

Set IPIP tunnel remote address.

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

Definition at line 402 of file ipip.c.

◆ rtnl_link_ipip_get_remote()

uint32_t rtnl_link_ipip_get_remote ( struct rtnl_link link)

Get IPIP tunnel remote address.

Parameters
linkLink object
Returns
remote address

Definition at line 420 of file ipip.c.

◆ rtnl_link_ipip_set_ttl()

int rtnl_link_ipip_set_ttl ( struct rtnl_link link,
uint8_t  ttl 
)

Set IPIP tunnel ttl.

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

Definition at line 436 of file ipip.c.

◆ rtnl_link_ipip_get_ttl()

uint8_t rtnl_link_ipip_get_ttl ( struct rtnl_link link)

Get IPIP tunnel ttl.

Parameters
linkLink object
Returns
ttl value

Definition at line 454 of file ipip.c.

◆ rtnl_link_ipip_set_tos()

int rtnl_link_ipip_set_tos ( struct rtnl_link link,
uint8_t  tos 
)

Set IPIP tunnel tos.

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

Definition at line 470 of file ipip.c.

◆ rtnl_link_ipip_get_tos()

uint8_t rtnl_link_ipip_get_tos ( struct rtnl_link link)

Get IPIP tunnel tos.

Parameters
linkLink object
Returns
tos value

Definition at line 488 of file ipip.c.

◆ rtnl_link_ipip_set_pmtudisc()

int rtnl_link_ipip_set_pmtudisc ( struct rtnl_link link,
uint8_t  pmtudisc 
)

Set IPIP tunnel path MTU discovery.

Parameters
linkLink object
pmtudiscpath MTU discovery
Returns
0 on success or a negative error code

Definition at line 504 of file ipip.c.

◆ rtnl_link_ipip_get_pmtudisc()

uint8_t rtnl_link_ipip_get_pmtudisc ( struct rtnl_link link)

Get IPIP path MTU discovery.

Parameters
linkLink object
Returns
pmtudisc value

Definition at line 522 of file ipip.c.