• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
13 extern "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
56