summaryrefslogtreecommitdiffstats
path: root/include/netlink/route/link/ip6tnl.h
blob: 7e0c295859adb1668f7d8c06aed7f5d4eaeb4b0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 * netlink/route/link/ip6tnl.h		IP6TNL interface
 *
 *	This library is free software; you can redistribute it and/or
 *	modify it under the terms of the GNU Lesser General Public
 *	License as published by the Free Software Foundation version 2.1
 *	of the License.
 *
 * Copyright (c) 2014 Susant Sahani <susant@redhat.com>
 */

#ifndef NETLINK_LINK_IP6TNL_H_
#define NETLINK_LINK_IP6TNL_H_

#include <netlink/netlink.h>
#include <netlink/route/link.h>

#ifdef __cplusplus
extern "C" {
#endif

	extern struct rtnl_link *rtnl_link_ip6_tnl_alloc(void);
	extern int rtnl_link_ip6_tnl_add(struct nl_sock *sk, const char *name);

	extern int rtnl_link_ip6_tnl_set_link(struct rtnl_link *link,  uint32_t index);
	extern uint32_t rtnl_link_ip6_tnl_get_link(struct rtnl_link *link);

	extern int rtnl_link_ip6_tnl_set_local(struct rtnl_link *link, struct in6_addr *);
	extern int rtnl_link_ip6_tnl_get_local(struct rtnl_link *link, struct in6_addr *addr);

	extern int rtnl_link_ip6_tnl_set_remote(struct rtnl_link *link, struct in6_addr *);
	extern int rtnl_link_ip6_tnl_get_remote(struct rtnl_link *link, struct in6_addr *);

	extern int rtnl_link_ip6_tnl_set_ttl(struct rtnl_link *link, uint8_t ttl);
	extern uint8_t rtnl_link_ip6_tnl_get_ttl(struct rtnl_link *link);

	extern int rtnl_link_ip6_tnl_set_tos(struct rtnl_link *link, uint8_t tos);
	extern uint8_t rtnl_link_ip6_tnl_get_tos(struct rtnl_link *link);

	extern int rtnl_link_ip6_tnl_set_encaplimit(struct rtnl_link *link, uint8_t encap_limit);
	extern uint8_t rtnl_link_ip6_tnl_get_encaplimit(struct rtnl_link *link);

	extern int rtnl_link_ip6_tnl_set_flags(struct rtnl_link *link, uint32_t flags);
	extern uint32_t rtnl_link_ip6_tnl_get_flags(struct rtnl_link *link);

	extern uint32_t rtnl_link_ip6_tnl_get_flowinfo(struct rtnl_link *link);
	extern int rtnl_link_ip6_tnl_set_flowinfo(struct rtnl_link *link, uint32_t flowinfo);

	extern int rtnl_link_ip6_tnl_set_proto(struct rtnl_link *link, uint8_t proto);
	extern uint8_t rtnl_link_ip6_tnl_get_proto(struct rtnl_link *link);

#ifdef _cplusplus
}
#endif

#endif