libnl 3.7.0
ip6tnl.h
1/* SPDX-License-Identifier: LGPL-2.1-only */
2/*
3 * Copyright (c) 2014 Susant Sahani <susant@redhat.com>
4 */
5
6#ifndef NETLINK_LINK_IP6TNL_H_
7#define NETLINK_LINK_IP6TNL_H_
8
9#include <netlink/netlink.h>
10#include <netlink/route/link.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16 extern struct rtnl_link *rtnl_link_ip6_tnl_alloc(void);
17 extern int rtnl_link_ip6_tnl_add(struct nl_sock *sk, const char *name);
18
19 extern int rtnl_link_is_ip6_tnl(struct rtnl_link *link);
20
21 extern int rtnl_link_ip6_tnl_set_link(struct rtnl_link *link, uint32_t index);
22 extern uint32_t rtnl_link_ip6_tnl_get_link(struct rtnl_link *link);
23
24 extern int rtnl_link_ip6_tnl_set_local(struct rtnl_link *link, struct in6_addr *);
25 extern int rtnl_link_ip6_tnl_get_local(struct rtnl_link *link, struct in6_addr *addr);
26
27 extern int rtnl_link_ip6_tnl_set_remote(struct rtnl_link *link, struct in6_addr *);
28 extern int rtnl_link_ip6_tnl_get_remote(struct rtnl_link *link, struct in6_addr *);
29
30 extern int rtnl_link_ip6_tnl_set_ttl(struct rtnl_link *link, uint8_t ttl);
31 extern uint8_t rtnl_link_ip6_tnl_get_ttl(struct rtnl_link *link);
32
33 extern int rtnl_link_ip6_tnl_set_tos(struct rtnl_link *link, uint8_t tos);
34 extern uint8_t rtnl_link_ip6_tnl_get_tos(struct rtnl_link *link);
35
36 extern int rtnl_link_ip6_tnl_set_encaplimit(struct rtnl_link *link, uint8_t encap_limit);
37 extern uint8_t rtnl_link_ip6_tnl_get_encaplimit(struct rtnl_link *link);
38
39 extern int rtnl_link_ip6_tnl_set_flags(struct rtnl_link *link, uint32_t flags);
40 extern uint32_t rtnl_link_ip6_tnl_get_flags(struct rtnl_link *link);
41
42 extern uint32_t rtnl_link_ip6_tnl_get_flowinfo(struct rtnl_link *link);
43 extern int rtnl_link_ip6_tnl_set_flowinfo(struct rtnl_link *link, uint32_t flowinfo);
44
45 extern int rtnl_link_ip6_tnl_set_proto(struct rtnl_link *link, uint8_t proto);
46 extern uint8_t rtnl_link_ip6_tnl_get_proto(struct rtnl_link *link);
47
48 extern int rtnl_link_ip6_tnl_set_fwmark(struct rtnl_link *link, uint32_t fwmark);
49 extern int rtnl_link_ip6_tnl_get_fwmark(struct rtnl_link *link, uint32_t *fwmark);
50
51#ifdef __cplusplus
52}
53#endif
54
55#endif
int rtnl_link_ip6_tnl_set_remote(struct rtnl_link *link, struct in6_addr *)
Set IP6_TNL tunnel remote address.
Definition: ip6tnl.c:462
uint8_t rtnl_link_ip6_tnl_get_proto(struct rtnl_link *link)
Get IP6_TNL proto.
Definition: ip6tnl.c:686
uint32_t rtnl_link_ip6_tnl_get_flowinfo(struct rtnl_link *link)
Get IP6_TNL flowinfo.
Definition: ip6tnl.c:618
int rtnl_link_is_ip6_tnl(struct rtnl_link *link)
Check if link is a IP6_TNL link.
Definition: ip6tnl.c:354
int rtnl_link_ip6_tnl_set_link(struct rtnl_link *link, uint32_t index)
Set IP6_TNL tunnel interface index.
Definition: ip6tnl.c:392
int rtnl_link_ip6_tnl_add(struct nl_sock *sk, const char *name)
Create a new ip6_tnl tunnel device.
Definition: ip6tnl.c:367
uint8_t rtnl_link_ip6_tnl_get_ttl(struct rtnl_link *link)
Get IP6_TNL tunnel ttl.
Definition: ip6tnl.c:516
int rtnl_link_ip6_tnl_get_remote(struct rtnl_link *link, struct in6_addr *)
Get IP6_TNL tunnel remote address.
Definition: ip6tnl.c:480
uint32_t rtnl_link_ip6_tnl_get_flags(struct rtnl_link *link)
Get IP6_TNL path flags.
Definition: ip6tnl.c:652
int rtnl_link_ip6_tnl_set_fwmark(struct rtnl_link *link, uint32_t fwmark)
Set IP6_TNL tunnel fwmark.
Definition: ip6tnl.c:702
uint8_t rtnl_link_ip6_tnl_get_encaplimit(struct rtnl_link *link)
Get IP6_TNL encaplimit.
Definition: ip6tnl.c:584
int rtnl_link_ip6_tnl_set_flags(struct rtnl_link *link, uint32_t flags)
Set IP6_TNL tunnel flags.
Definition: ip6tnl.c:634
int rtnl_link_ip6_tnl_set_local(struct rtnl_link *link, struct in6_addr *)
Set IP6_TNL tunnel local address.
Definition: ip6tnl.c:426
int rtnl_link_ip6_tnl_set_ttl(struct rtnl_link *link, uint8_t ttl)
Set IP6_TNL tunnel ttl.
Definition: ip6tnl.c:498
int rtnl_link_ip6_tnl_set_flowinfo(struct rtnl_link *link, uint32_t flowinfo)
Set IP6_TNL tunnel flowinfo.
Definition: ip6tnl.c:600
int rtnl_link_ip6_tnl_get_local(struct rtnl_link *link, struct in6_addr *addr)
Get IP6_TNL tunnel local address.
Definition: ip6tnl.c:444
int rtnl_link_ip6_tnl_set_tos(struct rtnl_link *link, uint8_t tos)
Set IP6_TNL tunnel tos.
Definition: ip6tnl.c:532
int rtnl_link_ip6_tnl_set_proto(struct rtnl_link *link, uint8_t proto)
Set IP6_TNL tunnel proto.
Definition: ip6tnl.c:668
int rtnl_link_ip6_tnl_get_fwmark(struct rtnl_link *link, uint32_t *fwmark)
Get IP6_TNL tunnel fwmark.
Definition: ip6tnl.c:721
int rtnl_link_ip6_tnl_set_encaplimit(struct rtnl_link *link, uint8_t encap_limit)
Set IP6_TNL tunnel encap limit.
Definition: ip6tnl.c:566
uint32_t rtnl_link_ip6_tnl_get_link(struct rtnl_link *link)
Get IP6_TNL tunnel interface index.
Definition: ip6tnl.c:410
uint8_t rtnl_link_ip6_tnl_get_tos(struct rtnl_link *link)
Get IP6_TNL tunnel tos.
Definition: ip6tnl.c:550