• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * netlink/route/link/vxlan.h		VXLAN interface
3  *
4  *	This library is free software; you can redistribute it and/or
5  *	modify it under the terms of the GNU Lesser General Public
6  *	License as published by the Free Software Foundation version 2.1
7  *	of the License.
8  *
9  * Copyright (c) 2013 Yasunobu Chiba <yasu@dsl.gr.jp>
10  */
11 
12 #ifndef NETLINK_LINK_VXLAN_H_
13 #define NETLINK_LINK_VXLAN_H_
14 
15 #include <netlink/netlink.h>
16 #include <netlink/route/link.h>
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #define VXLAN_ID_MAX 16777215
23 
24 extern struct rtnl_link *rtnl_link_vxlan_alloc(void);
25 
26 extern int		rtnl_link_is_vxlan(struct rtnl_link *);
27 
28 extern int		rtnl_link_vxlan_set_id(struct rtnl_link *, uint32_t);
29 extern int		rtnl_link_vxlan_get_id(struct rtnl_link *, uint32_t *);
30 
31 extern int	rtnl_link_vxlan_set_group(struct rtnl_link *, struct nl_addr *);
32 extern int	rtnl_link_vxlan_get_group(struct rtnl_link *, struct nl_addr **);
33 
34 extern int		rtnl_link_vxlan_set_link(struct rtnl_link *, uint32_t);
35 extern int		rtnl_link_vxlan_get_link(struct rtnl_link *, uint32_t *);
36 
37 extern int	rtnl_link_vxlan_set_local(struct rtnl_link *, struct nl_addr *);
38 extern int	rtnl_link_vxlan_get_local(struct rtnl_link *, struct nl_addr **);
39 
40 extern int	rtnl_link_vxlan_set_ttl(struct rtnl_link *, uint8_t);
41 extern int	rtnl_link_vxlan_get_ttl(struct rtnl_link *);
42 
43 extern int	rtnl_link_vxlan_set_tos(struct rtnl_link *, uint8_t);
44 extern int	rtnl_link_vxlan_get_tos(struct rtnl_link *);
45 
46 extern int	rtnl_link_vxlan_set_learning(struct rtnl_link *, uint8_t);
47 extern int	rtnl_link_vxlan_get_learning(struct rtnl_link *);
48 extern int	rtnl_link_vxlan_enable_learning(struct rtnl_link *);
49 extern int	rtnl_link_vxlan_disable_learning(struct rtnl_link *);
50 
51 extern int	rtnl_link_vxlan_set_ageing(struct rtnl_link *, uint32_t);
52 extern int	rtnl_link_vxlan_get_ageing(struct rtnl_link *, uint32_t *);
53 
54 extern int	rtnl_link_vxlan_set_limit(struct rtnl_link *, uint32_t);
55 extern int	rtnl_link_vxlan_get_limit(struct rtnl_link *, uint32_t *);
56 
57 extern int	rtnl_link_vxlan_set_port_range(struct rtnl_link *,
58 										   struct ifla_vxlan_port_range *);
59 extern int	rtnl_link_vxlan_get_port_range(struct rtnl_link *,
60 										   struct ifla_vxlan_port_range *);
61 
62 extern int	rtnl_link_vxlan_set_proxy(struct rtnl_link *, uint8_t);
63 extern int	rtnl_link_vxlan_get_proxy(struct rtnl_link *);
64 extern int	rtnl_link_vxlan_enable_proxy(struct rtnl_link *);
65 extern int	rtnl_link_vxlan_disable_proxy(struct rtnl_link *);
66 
67 extern int	rtnl_link_vxlan_set_rsc(struct rtnl_link *, uint8_t);
68 extern int	rtnl_link_vxlan_get_rsc(struct rtnl_link *);
69 extern int	rtnl_link_vxlan_enable_rsc(struct rtnl_link *);
70 extern int	rtnl_link_vxlan_disable_rsc(struct rtnl_link *);
71 
72 extern int	rtnl_link_vxlan_set_l2miss(struct rtnl_link *, uint8_t);
73 extern int	rtnl_link_vxlan_get_l2miss(struct rtnl_link *);
74 extern int	rtnl_link_vxlan_enable_l2miss(struct rtnl_link *);
75 extern int	rtnl_link_vxlan_disable_l2miss(struct rtnl_link *);
76 
77 extern int	rtnl_link_vxlan_set_l3miss(struct rtnl_link *, uint8_t);
78 extern int	rtnl_link_vxlan_get_l3miss(struct rtnl_link *);
79 extern int	rtnl_link_vxlan_enable_l3miss(struct rtnl_link *);
80 extern int	rtnl_link_vxlan_disable_l3miss(struct rtnl_link *);
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif
87