libnl  3.2.27

sit link module More...

Data Structures

struct  sit_info
 

Macros

#define SIT_ATTR_LINK   (1 << 0)
 
#define SIT_ATTR_LOCAL   (1 << 1)
 
#define SIT_ATTR_REMOTE   (1 << 2)
 
#define SIT_ATTR_TTL   (1 << 3)
 
#define SIT_ATTR_TOS   (1 << 4)
 
#define SIT_ATTR_PMTUDISC   (1 << 5)
 
#define SIT_ATTR_FLAGS   (1 << 6)
 
#define SIT_ATTR_PROTO   (1 << 7)
 
#define IS_SIT_LINK_ASSERT(link)
 

Functions

struct rtnl_linkrtnl_link_sit_alloc (void)
 
int rtnl_link_is_sit (struct rtnl_link *link)
 Check if link is a SIT link. More...
 
int rtnl_link_sit_add (struct nl_sock *sk, const char *name)
 Create a new sit tunnel device. More...
 
int rtnl_link_sit_set_link (struct rtnl_link *link, uint32_t index)
 Set SIT tunnel interface index. More...
 
uint32_t rtnl_link_sit_get_link (struct rtnl_link *link)
 Get SIT tunnel interface index. More...
 
int rtnl_link_sit_set_local (struct rtnl_link *link, uint32_t addr)
 Set SIT tunnel local address. More...
 
uint32_t rtnl_link_sit_get_local (struct rtnl_link *link)
 Get SIT tunnel local address. More...
 
int rtnl_link_sit_set_remote (struct rtnl_link *link, uint32_t addr)
 Set SIT tunnel remote address. More...
 
uint32_t rtnl_link_sit_get_remote (struct rtnl_link *link)
 Get SIT tunnel remote address. More...
 
int rtnl_link_sit_set_ttl (struct rtnl_link *link, uint8_t ttl)
 Set SIT tunnel ttl. More...
 
uint8_t rtnl_link_sit_get_ttl (struct rtnl_link *link)
 Get SIT tunnel ttl. More...
 
int rtnl_link_sit_set_tos (struct rtnl_link *link, uint8_t tos)
 Set SIT tunnel tos. More...
 
uint8_t rtnl_link_sit_get_tos (struct rtnl_link *link)
 Get SIT tunnel tos. More...
 
int rtnl_link_sit_set_pmtudisc (struct rtnl_link *link, uint8_t pmtudisc)
 Set SIT tunnel path MTU discovery. More...
 
uint8_t rtnl_link_sit_get_pmtudisc (struct rtnl_link *link)
 Get SIT path MTU discovery. More...
 
int rtnl_link_sit_set_flags (struct rtnl_link *link, uint16_t flags)
 Set SIT tunnel flags. More...
 
uint16_t rtnl_link_sit_get_flags (struct rtnl_link *link)
 Get SIT path flags. More...
 
int rtnl_link_sit_set_proto (struct rtnl_link *link, uint8_t proto)
 Set SIT tunnel proto. More...
 
uint8_t rtnl_link_sit_get_proto (struct rtnl_link *link)
 Get SIT proto. More...
 

Variables

uint8_t sit_info::ttl
 
uint8_t sit_info::tos
 
uint8_t sit_info::pmtudisc
 
uint8_t sit_info::proto
 
uint16_t sit_info::flags
 
uint32_t sit_info::link
 
uint32_t sit_info::local
 
uint32_t sit_info::remote
 
uint32_t sit_info::sit_mask
 

Detailed Description

sit link module

Link Type Name: "sit"

SIT Documentation (Netlink Routing Development Guide)

Macro Definition Documentation

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

Definition at line 288 of file sit.c.

Function Documentation

int rtnl_link_is_sit ( struct rtnl_link link)

Check if link is a SIT link.

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

Definition at line 318 of file sit.c.

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

Create a new sit tunnel device.

Parameters
socknetlink socket
namename of the tunnel device

Creates a new sit tunnel device in the kernel

Returns
0 on success or a negative error code

Definition at line 331 of file sit.c.

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

+ Here is the call graph for this function:

int rtnl_link_sit_set_link ( struct rtnl_link link,
uint32_t  index 
)

Set SIT tunnel interface index.

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

Definition at line 356 of file sit.c.

uint32_t rtnl_link_sit_get_link ( struct rtnl_link link)

Get SIT tunnel interface index.

Parameters
linkLink object
Returns
interface index value

Definition at line 374 of file sit.c.

int rtnl_link_sit_set_local ( struct rtnl_link link,
uint32_t  addr 
)

Set SIT tunnel local address.

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

Definition at line 390 of file sit.c.

uint32_t rtnl_link_sit_get_local ( struct rtnl_link link)

Get SIT tunnel local address.

Parameters
linkLink object
Returns
local address value

Definition at line 408 of file sit.c.

int rtnl_link_sit_set_remote ( struct rtnl_link link,
uint32_t  addr 
)

Set SIT tunnel remote address.

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

Definition at line 424 of file sit.c.

uint32_t rtnl_link_sit_get_remote ( struct rtnl_link link)

Get SIT tunnel remote address.

Parameters
linkLink object
Returns
remote address

Definition at line 442 of file sit.c.

int rtnl_link_sit_set_ttl ( struct rtnl_link link,
uint8_t  ttl 
)

Set SIT tunnel ttl.

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

Definition at line 458 of file sit.c.

uint8_t rtnl_link_sit_get_ttl ( struct rtnl_link link)

Get SIT tunnel ttl.

Parameters
linkLink object
Returns
ttl value

Definition at line 476 of file sit.c.

int rtnl_link_sit_set_tos ( struct rtnl_link link,
uint8_t  tos 
)

Set SIT tunnel tos.

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

Definition at line 492 of file sit.c.

uint8_t rtnl_link_sit_get_tos ( struct rtnl_link link)

Get SIT tunnel tos.

Parameters
linkLink object
Returns
tos value

Definition at line 510 of file sit.c.

int rtnl_link_sit_set_pmtudisc ( struct rtnl_link link,
uint8_t  pmtudisc 
)

Set SIT tunnel path MTU discovery.

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

Definition at line 526 of file sit.c.

uint8_t rtnl_link_sit_get_pmtudisc ( struct rtnl_link link)

Get SIT path MTU discovery.

Parameters
linkLink object
Returns
pmtudisc value

Definition at line 544 of file sit.c.

int rtnl_link_sit_set_flags ( struct rtnl_link link,
uint16_t  flags 
)

Set SIT tunnel flags.

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

Definition at line 560 of file sit.c.

uint16_t rtnl_link_sit_get_flags ( struct rtnl_link link)

Get SIT path flags.

Parameters
linkLink object
Returns
flags value

Definition at line 578 of file sit.c.

int rtnl_link_sit_set_proto ( struct rtnl_link link,
uint8_t  proto 
)

Set SIT tunnel proto.

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

Definition at line 594 of file sit.c.

uint8_t rtnl_link_sit_get_proto ( struct rtnl_link link)

Get SIT proto.

Parameters
linkLink object
Returns
proto value

Definition at line 612 of file sit.c.