libnl 3.5.0

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

ip6tnl link module More...

## Data Structures
struct | ip6_tnl_info

## Macros
#define | IP6_TNL_ATTR_LINK (1 << 0)
#define | IP6_TNL_ATTR_LOCAL (1 << 1)
#define | IP6_TNL_ATTR_REMOTE (1 << 2)
#define | IP6_TNL_ATTR_TTL (1 << 3)
#define | IP6_TNL_ATTR_TOS (1 << 4)
#define | IP6_TNL_ATTR_ENCAPLIMIT (1 << 5)
#define | IP6_TNL_ATTR_FLAGS (1 << 6)
#define | IP6_TNL_ATTR_PROTO (1 << 7)
#define | IP6_TNL_ATTR_FLOWINFO (1 << 8)
#define | IS_IP6_TNL_LINK_ASSERT(link)

## Functions
struct rtnl_link * | rtnl_link_ip6_tnl_alloc (void)
int | rtnl_link_is_ip6_tnl (struct rtnl_link *link)
| Check if link is a IP6_TNL link. More...
int | rtnl_link_ip6_tnl_add (struct nl_sock *sk, const char *name)
| Create a new ip6_tnl tunnel device. More...
int | rtnl_link_ip6_tnl_set_link (struct rtnl_link *link, uint32_t index)
| Set IP6_TNL tunnel interface index. More...
uint32_t | rtnl_link_ip6_tnl_get_link (struct rtnl_link *link)
| Get IP6_TNL tunnel interface index. More...
int | rtnl_link_ip6_tnl_set_local (struct rtnl_link *link, struct in6_addr *addr)
| Set IP6_TNL tunnel local address. More...
int | rtnl_link_ip6_tnl_get_local (struct rtnl_link *link, struct in6_addr *addr)
| Get IP6_TNL tunnel local address. More...
int | rtnl_link_ip6_tnl_set_remote (struct rtnl_link *link, struct in6_addr *addr)
| Set IP6_TNL tunnel remote address. More...
int | rtnl_link_ip6_tnl_get_remote (struct rtnl_link *link, struct in6_addr *addr)
| Get IP6_TNL tunnel remote address. More...
int | rtnl_link_ip6_tnl_set_ttl (struct rtnl_link *link, uint8_t ttl)
| Set IP6_TNL tunnel ttl. More...
uint8_t | rtnl_link_ip6_tnl_get_ttl (struct rtnl_link *link)
| Get IP6_TNL tunnel ttl. More...
int | rtnl_link_ip6_tnl_set_tos (struct rtnl_link *link, uint8_t tos)
| Set IP6_TNL tunnel tos. More...
uint8_t | rtnl_link_ip6_tnl_get_tos (struct rtnl_link *link)
| Get IP6_TNL tunnel tos. More...
int | rtnl_link_ip6_tnl_set_encaplimit (struct rtnl_link *link, uint8_t encap_limit)
| Set IP6_TNL tunnel encap limit. More...
uint8_t | rtnl_link_ip6_tnl_get_encaplimit (struct rtnl_link *link)
| Get IP6_TNL encaplimit. More...
int | rtnl_link_ip6_tnl_set_flowinfo (struct rtnl_link *link, uint32_t flowinfo)
| Set IP6_TNL tunnel flowinfo. More...
uint32_t | rtnl_link_ip6_tnl_get_flowinfo (struct rtnl_link *link)
| Get IP6_TNL flowinfo. More...
int | rtnl_link_ip6_tnl_set_flags (struct rtnl_link *link, uint32_t flags)
| Set IP6_TNL tunnel flags. More...
uint32_t | rtnl_link_ip6_tnl_get_flags (struct rtnl_link *link)
| Get IP6_TNL path flags. More...
int | rtnl_link_ip6_tnl_set_proto (struct rtnl_link *link, uint8_t proto)
| Set IP6_TNL tunnel proto. More...
uint8_t | rtnl_link_ip6_tnl_get_proto (struct rtnl_link *link)
| Get IP6_TNL proto. More...

## Variables
uint8_t | ip6_tnl_info::ttl
uint8_t | ip6_tnl_info::tos
uint8_t | ip6_tnl_info::encap_limit
uint8_t | ip6_tnl_info::proto
uint32_t | ip6_tnl_info::flags
uint32_t | ip6_tnl_info::link
uint32_t | ip6_tnl_info::flowinfo
struct in6_addr | ip6_tnl_info::local
struct in6_addr | ip6_tnl_info::remote
uint32_t | ip6_tnl_info::ip6_tnl_mask

## Detailed Description

ip6tnl link module

Link Type Name: "ip6tnl"

IP6TNL Documentation (Netlink Routing Development Guide)

## Macro Definition Documentation

## ◆ IS_IP6_TNL_LINK_ASSERT

#define IS_IP6_TNL_LINK_ASSERT | ( |  | link | ) |

Value:
if ((link)->l_info_ops != &ip6_tnl_info_ops) {\
APPBUG("Link is not a ip6_tnl link. set type \"ip6tnl\" first.");\
return -NLE_OPNOTSUPP;\
}

Definition at line 320 of file ip6tnl.c.

## Function Documentation

## ◆ rtnl_link_is_ip6_tnl()

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

Check if link is a IP6_TNL link.

Parameters

  link | Link object

Returns
  True if link is a IP6_TNL link, otherwise false is returned.

Definition at line 350 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_add()

int rtnl_link_ip6_tnl_add | ( | struct nl_sock * | sk,
|  | const char * | name
| ) |  |

Create a new ip6_tnl tunnel device.

Parameters

  sock | netlink socket
  name | name of the tunnel device

Creates a new ip6_tnl tunnel device in the kernel

Returns
  0 on success or a negative error code

Definition at line 363 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_set_link()

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

Set IP6_TNL tunnel interface index.

Parameters

  link | Link object
  index | interface index

Returns
  0 on success or a negative error code

Definition at line 388 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_get_link()

uint32_t rtnl_link_ip6_tnl_get_link | ( | struct rtnl_link * | link | ) |

Get IP6_TNL tunnel interface index.

Parameters

  link | Link object

Returns
  interface index value

Definition at line 406 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_set_local()

int rtnl_link_ip6_tnl_set_local | ( | struct rtnl_link * | link,
|  | struct in6_addr * | addr
| ) |  |

Set IP6_TNL tunnel local address.

Parameters

  link | Link object
  addr | local address

Returns
  0 on success or a negative error code

Definition at line 422 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_get_local()

int rtnl_link_ip6_tnl_get_local | ( | struct rtnl_link * | link,
|  | struct in6_addr * | addr
| ) |  |

Get IP6_TNL tunnel local address.

Parameters

  link | Link object

Returns
  0 on success or a negative error code

Definition at line 440 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_set_remote()

int rtnl_link_ip6_tnl_set_remote | ( | struct rtnl_link * | link,
|  | struct in6_addr * | addr
| ) |  |

Set IP6_TNL tunnel remote address.

Parameters

  link | Link object
  remote | remote address

Returns
  0 on success or a negative error code

Definition at line 458 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_get_remote()

int rtnl_link_ip6_tnl_get_remote | ( | struct rtnl_link * | link,
|  | struct in6_addr * | addr
| ) |  |

Get IP6_TNL tunnel remote address.

Parameters

  link | Link object

Returns
  0 on success or a negative error code

Definition at line 476 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_set_ttl()

int rtnl_link_ip6_tnl_set_ttl | ( | struct rtnl_link * | link,
|  | uint8_t | ttl
| ) |  |

Set IP6_TNL tunnel ttl.

Parameters

  link | Link object
  ttl | tunnel ttl

Returns
  0 on success or a negative error code

Definition at line 494 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_get_ttl()

uint8_t rtnl_link_ip6_tnl_get_ttl | ( | struct rtnl_link * | link | ) |

Get IP6_TNL tunnel ttl.

Parameters

  link | Link object

Returns
  ttl value

Definition at line 512 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_set_tos()

int rtnl_link_ip6_tnl_set_tos | ( | struct rtnl_link * | link,
|  | uint8_t | tos
| ) |  |

Set IP6_TNL tunnel tos.

Parameters

  link | Link object
  tos | tunnel tos

Returns
  0 on success or a negative error code

Definition at line 528 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_get_tos()

uint8_t rtnl_link_ip6_tnl_get_tos | ( | struct rtnl_link * | link | ) |

Get IP6_TNL tunnel tos.

Parameters

  link | Link object

Returns
  tos value

Definition at line 546 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_set_encaplimit()

int rtnl_link_ip6_tnl_set_encaplimit | ( | struct rtnl_link * | link,
|  | uint8_t | encap_limit
| ) |  |

Set IP6_TNL tunnel encap limit.

Parameters

  link | Link object
  encap_limit | encaplimit value

Returns
  0 on success or a negative error code

Definition at line 562 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_get_encaplimit()

uint8_t rtnl_link_ip6_tnl_get_encaplimit | ( | struct rtnl_link * | link | ) |

Get IP6_TNL encaplimit.

Parameters

  link | Link object

Returns
  encaplimit value

Definition at line 580 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_set_flowinfo()

int rtnl_link_ip6_tnl_set_flowinfo | ( | struct rtnl_link * | link,
|  | uint32_t | flowinfo
| ) |  |

Set IP6_TNL tunnel flowinfo.

Parameters

  link | Link object
  flowinfo | flowinfo value

Returns
  0 on success or a negative error code

Definition at line 596 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_get_flowinfo()

uint32_t rtnl_link_ip6_tnl_get_flowinfo | ( | struct rtnl_link * | link | ) |

Get IP6_TNL flowinfo.

Parameters

  link | Link object

Returns
  flowinfo value

Definition at line 614 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_set_flags()

int rtnl_link_ip6_tnl_set_flags | ( | struct rtnl_link * | link,
|  | uint32_t | flags
| ) |  |

Set IP6_TNL tunnel flags.

Parameters

  link | Link object
  flags | tunnel flags

Returns
  0 on success or a negative error code

Definition at line 630 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_get_flags()

uint32_t rtnl_link_ip6_tnl_get_flags | ( | struct rtnl_link * | link | ) |

Get IP6_TNL path flags.

Parameters

  link | Link object

Returns
  flags value

Definition at line 648 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_set_proto()

int rtnl_link_ip6_tnl_set_proto | ( | struct rtnl_link * | link,
|  | uint8_t | proto
| ) |  |

Set IP6_TNL tunnel proto.

Parameters

  link | Link object
  proto | tunnel proto

Returns
  0 on success or a negative error code

Definition at line 664 of file ip6tnl.c.

## ◆ rtnl_link_ip6_tnl_get_proto()

uint8_t rtnl_link_ip6_tnl_get_proto | ( | struct rtnl_link * | link | ) |

Get IP6_TNL proto.

Parameters

  link | Link object

Returns
  proto value

Definition at line 682 of file ip6tnl.c.