libnl 3.5.0

Data Structures | Macros | Functions | Variables
IPVTI
Routing Library (libnl-route) » Links (Interfaces)

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_link * | rtnl_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

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

## Function Documentation

## ◆ rtnl_link_is_ipvti()

int rtnl_link_is_ipvti | ( | struct rtnl_link * | link | ) |

Check if link is a IPVTI link.

Parameters

  link | Link object

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

Definition at line 281 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

  sock | netlink socket
  name | name 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 293 of file ipvti.c.

## ◆ rtnl_link_ipvti_set_link()

int rtnl_link_ipvti_set_link | ( | struct rtnl_link * | link,
|  | uint32_t | index
| ) |  |

Set IPVTI tunnel interface index.

Parameters

  link | Link object
  index | interface index

Returns
  0 on success or a negative error code

Definition at line 317 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

  link | Link object

Returns
  interface index

Definition at line 335 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

  link | Link object
  ikey | gre ikey

Returns
  0 on success or a negative error code

Definition at line 351 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

  link | Link object

Returns
  ikey

Definition at line 369 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

  link | Link object
  okey | gre okey

Returns
  0 on success or a negative error code

Definition at line 385 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

  link | Link object

Returns
  okey value

Definition at line 403 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

  link | Link object
  addr | local address

Returns
  0 on success or a negative error code

Definition at line 419 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

  link | Link object

Returns
  local address

Definition at line 437 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

  link | Link object
  remote | remote address

Returns
  0 on success or a negative error code

Definition at line 453 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

  link | Link object

Returns
  remote address on success or a negative error code

Definition at line 471 of file ipvti.c.