libnl  3.4.0
vxlan.h
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 struct ifla_vxlan_port_range;
23 
24 #define VXLAN_ID_MAX 16777215
25 
26 enum {
27  RTNL_LINK_VXLAN_F_GBP = 1 << 0,
28 #define RTNL_LINK_VXLAN_F_GBP RTNL_LINK_VXLAN_F_GBP
29  RTNL_LINK_VXLAN_F_GPE = 1 << 1,
30 #define RTNL_LINK_VXLAN_F_GPE RTNL_LINK_VXLAN_F_GPE
31  RTNL_LINK_VXLAN_F_REMCSUM_NOPARTIAL = 1 << 2,
32 #define RTNL_LINK_VXLAN_F_REMCSUM_NOPARTIAL RTNL_LINK_VXLAN_F_REMCSUM_NOPARTIAL
33 };
34 
35 extern struct rtnl_link *rtnl_link_vxlan_alloc(void);
36 
37 extern int rtnl_link_is_vxlan(struct rtnl_link *);
38 
39 extern int rtnl_link_vxlan_set_id(struct rtnl_link *, uint32_t);
40 extern int rtnl_link_vxlan_get_id(struct rtnl_link *, uint32_t *);
41 
42 extern int rtnl_link_vxlan_set_group(struct rtnl_link *, struct nl_addr *);
43 extern int rtnl_link_vxlan_get_group(struct rtnl_link *, struct nl_addr **);
44 
45 extern int rtnl_link_vxlan_set_link(struct rtnl_link *, uint32_t);
46 extern int rtnl_link_vxlan_get_link(struct rtnl_link *, uint32_t *);
47 
48 extern int rtnl_link_vxlan_set_local(struct rtnl_link *, struct nl_addr *);
49 extern int rtnl_link_vxlan_get_local(struct rtnl_link *, struct nl_addr **);
50 
51 extern int rtnl_link_vxlan_set_ttl(struct rtnl_link *, uint8_t);
52 extern int rtnl_link_vxlan_get_ttl(struct rtnl_link *);
53 
54 extern int rtnl_link_vxlan_set_tos(struct rtnl_link *, uint8_t);
55 extern int rtnl_link_vxlan_get_tos(struct rtnl_link *);
56 
57 extern int rtnl_link_vxlan_set_learning(struct rtnl_link *, uint8_t);
58 extern int rtnl_link_vxlan_get_learning(struct rtnl_link *);
59 extern int rtnl_link_vxlan_enable_learning(struct rtnl_link *);
60 extern int rtnl_link_vxlan_disable_learning(struct rtnl_link *);
61 
62 extern int rtnl_link_vxlan_set_ageing(struct rtnl_link *, uint32_t);
63 extern int rtnl_link_vxlan_get_ageing(struct rtnl_link *, uint32_t *);
64 
65 extern int rtnl_link_vxlan_set_limit(struct rtnl_link *, uint32_t);
66 extern int rtnl_link_vxlan_get_limit(struct rtnl_link *, uint32_t *);
67 
68 extern int rtnl_link_vxlan_set_port_range(struct rtnl_link *,
69  struct ifla_vxlan_port_range *);
70 extern int rtnl_link_vxlan_get_port_range(struct rtnl_link *,
71  struct ifla_vxlan_port_range *);
72 
73 extern int rtnl_link_vxlan_set_proxy(struct rtnl_link *, uint8_t);
74 extern int rtnl_link_vxlan_get_proxy(struct rtnl_link *);
75 extern int rtnl_link_vxlan_enable_proxy(struct rtnl_link *);
76 extern int rtnl_link_vxlan_disable_proxy(struct rtnl_link *);
77 
78 extern int rtnl_link_vxlan_set_rsc(struct rtnl_link *, uint8_t);
79 extern int rtnl_link_vxlan_get_rsc(struct rtnl_link *);
80 extern int rtnl_link_vxlan_enable_rsc(struct rtnl_link *);
81 extern int rtnl_link_vxlan_disable_rsc(struct rtnl_link *);
82 
83 extern int rtnl_link_vxlan_set_l2miss(struct rtnl_link *, uint8_t);
84 extern int rtnl_link_vxlan_get_l2miss(struct rtnl_link *);
85 extern int rtnl_link_vxlan_enable_l2miss(struct rtnl_link *);
86 extern int rtnl_link_vxlan_disable_l2miss(struct rtnl_link *);
87 
88 extern int rtnl_link_vxlan_set_l3miss(struct rtnl_link *, uint8_t);
89 extern int rtnl_link_vxlan_get_l3miss(struct rtnl_link *);
90 extern int rtnl_link_vxlan_enable_l3miss(struct rtnl_link *);
91 extern int rtnl_link_vxlan_disable_l3miss(struct rtnl_link *);
92 
93 extern int rtnl_link_vxlan_set_port(struct rtnl_link *, uint32_t);
94 extern int rtnl_link_vxlan_get_port(struct rtnl_link *, uint32_t *);
95 
96 extern int rtnl_link_vxlan_set_udp_csum(struct rtnl_link *, uint8_t);
97 extern int rtnl_link_vxlan_get_udp_csum(struct rtnl_link *);
98 
99 extern int rtnl_link_vxlan_set_udp_zero_csum6_tx(struct rtnl_link *, uint8_t);
101 
102 extern int rtnl_link_vxlan_set_udp_zero_csum6_rx(struct rtnl_link *, uint8_t);
104 
105 extern int rtnl_link_vxlan_set_remcsum_tx(struct rtnl_link *, uint8_t);
106 extern int rtnl_link_vxlan_get_remcsum_tx(struct rtnl_link *);
107 
108 extern int rtnl_link_vxlan_set_remcsum_rx(struct rtnl_link *, uint8_t);
109 extern int rtnl_link_vxlan_get_remcsum_rx(struct rtnl_link *);
110 
111 extern int rtnl_link_vxlan_set_flags(struct rtnl_link *, uint32_t flags, int enable);
112 extern int rtnl_link_vxlan_get_flags(struct rtnl_link *, uint32_t *out_flags);
113 
114 extern int rtnl_link_vxlan_set_collect_metadata(struct rtnl_link *, uint8_t);
116 
117 extern int rtnl_link_vxlan_set_label(struct rtnl_link *, uint32_t);
118 extern int rtnl_link_vxlan_get_label(struct rtnl_link *, uint32_t *);
119 
120 #ifdef __cplusplus
121 }
122 #endif
123 
124 #endif
int rtnl_link_vxlan_get_remcsum_tx(struct rtnl_link *)
Get remote offload transmit checksum status to use for VXLAN.
Definition: vxlan.c:1613
int rtnl_link_vxlan_disable_rsc(struct rtnl_link *)
Disable Route Short Circuit.
Definition: vxlan.c:1311
int rtnl_link_vxlan_set_proxy(struct rtnl_link *, uint8_t)
Set ARP proxy status to use for VXLAN.
Definition: vxlan.c:1205
int rtnl_link_vxlan_set_udp_zero_csum6_rx(struct rtnl_link *, uint8_t)
Set skip UDP checksum received over IPv6 status to use for VXLAN.
Definition: vxlan.c:1558
int rtnl_link_vxlan_enable_l3miss(struct rtnl_link *)
Enable netlink IP ADDR miss notifications.
Definition: vxlan.c:1418
int rtnl_link_vxlan_get_id(struct rtnl_link *, uint32_t *)
Get VXLAN Network Identifier.
Definition: vxlan.c:757
int rtnl_link_vxlan_get_udp_zero_csum6_tx(struct rtnl_link *)
Get skip UDP checksum transmitted over IPv6 status to use for VXLAN.
Definition: vxlan.c:1539
int rtnl_link_vxlan_get_label(struct rtnl_link *, uint32_t *)
Get flow label to use for VXLAN.
Definition: vxlan.c:1725
int rtnl_link_vxlan_set_tos(struct rtnl_link *, uint8_t)
Set IP ToS value to use for VXLAN.
Definition: vxlan.c:975
int rtnl_link_vxlan_set_remcsum_tx(struct rtnl_link *, uint8_t)
Set remote offload transmit checksum status to use for VXLAN.
Definition: vxlan.c:1595
int rtnl_link_vxlan_disable_l3miss(struct rtnl_link *)
Disable netlink IP ADDR miss notifications.
Definition: vxlan.c:1429
int rtnl_link_vxlan_set_port(struct rtnl_link *, uint32_t)
Set UDP destination port to use for VXLAN.
Definition: vxlan.c:1441
int rtnl_link_vxlan_set_local(struct rtnl_link *, struct nl_addr *)
Set source address to use for VXLAN.
Definition: vxlan.c:881
int rtnl_link_vxlan_get_rsc(struct rtnl_link *)
Get Route Short Circuit status to use for VXLAN.
Definition: vxlan.c:1282
int rtnl_link_vxlan_enable_l2miss(struct rtnl_link *)
Enable netlink LLADDR miss notifications.
Definition: vxlan.c:1359
int rtnl_link_vxlan_set_ttl(struct rtnl_link *, uint8_t)
Set IP TTL value to use for VXLAN.
Definition: vxlan.c:938
int rtnl_link_vxlan_get_remcsum_rx(struct rtnl_link *)
Get remote offload receive checksum status to use for VXLAN.
Definition: vxlan.c:1650
int rtnl_link_vxlan_enable_learning(struct rtnl_link *)
Enable VXLAN address learning.
Definition: vxlan.c:1048
int rtnl_link_vxlan_set_rsc(struct rtnl_link *, uint8_t)
Set Route Short Circuit status to use for VXLAN.
Definition: vxlan.c:1264
int rtnl_link_vxlan_set_l3miss(struct rtnl_link *, uint8_t)
Set netlink IP ADDR miss notification status to use for VXLAN.
Definition: vxlan.c:1382
int rtnl_link_vxlan_set_flags(struct rtnl_link *, uint32_t flags, int enable)
Set VXLAN flags RTNL_LINK_VXLAN_F_*.
Definition: vxlan.c:1750
int rtnl_link_vxlan_get_limit(struct rtnl_link *, uint32_t *)
Get maximum number of forwarding database entries to use for VXLAN.
Definition: vxlan.c:1133
int rtnl_link_vxlan_get_group(struct rtnl_link *, struct nl_addr **)
Get VXLAN multicast IP address.
Definition: vxlan.c:812
int rtnl_link_vxlan_set_learning(struct rtnl_link *, uint8_t)
Set VXLAN learning status.
Definition: vxlan.c:1012
int rtnl_link_vxlan_get_local(struct rtnl_link *, struct nl_addr **)
Get source address to use for VXLAN.
Definition: vxlan.c:912
int rtnl_link_vxlan_get_learning(struct rtnl_link *)
Get VXLAN learning status.
Definition: vxlan.c:1030
int rtnl_link_vxlan_get_l3miss(struct rtnl_link *)
Get netlink IP ADDR miss notification status to use for VXLAN.
Definition: vxlan.c:1400
int rtnl_link_vxlan_set_l2miss(struct rtnl_link *, uint8_t)
Set netlink LLADDR miss notification status to use for VXLAN.
Definition: vxlan.c:1323
int rtnl_link_vxlan_get_link(struct rtnl_link *, uint32_t *)
Get physical device to use for VXLAN.
Definition: vxlan.c:857
int rtnl_link_vxlan_get_tos(struct rtnl_link *)
Get IP ToS value to use for VXLAN.
Definition: vxlan.c:993
int rtnl_link_vxlan_disable_learning(struct rtnl_link *)
Disable VXLAN address learning.
Definition: vxlan.c:1059
int rtnl_link_vxlan_get_collect_metadata(struct rtnl_link *)
Get collect metadata status to use for VXLAN.
Definition: vxlan.c:1687
int rtnl_link_vxlan_get_udp_csum(struct rtnl_link *)
Get UDP checksum status to use for VXLAN.
Definition: vxlan.c:1502
int rtnl_link_vxlan_set_remcsum_rx(struct rtnl_link *, uint8_t)
Set remote offload receive checksum status to use for VXLAN.
Definition: vxlan.c:1632
int rtnl_link_vxlan_disable_l2miss(struct rtnl_link *)
Disable netlink LLADDR miss notifications.
Definition: vxlan.c:1370
int rtnl_link_vxlan_get_l2miss(struct rtnl_link *)
Get netlink LLADDR miss notification status to use for VXLAN.
Definition: vxlan.c:1341
int rtnl_link_vxlan_set_udp_zero_csum6_tx(struct rtnl_link *, uint8_t)
Set skip UDP checksum transmitted over IPv6 status to use for VXLAN.
Definition: vxlan.c:1521
int rtnl_link_vxlan_enable_rsc(struct rtnl_link *)
Enable Route Short Circuit.
Definition: vxlan.c:1300
int rtnl_link_vxlan_get_flags(struct rtnl_link *, uint32_t *out_flags)
Get VXLAN flags RTNL_LINK_VXLAN_F_*.
Definition: vxlan.c:1774
int rtnl_link_is_vxlan(struct rtnl_link *)
Check if link is a VXLAN link.
Definition: vxlan.c:723
int rtnl_link_vxlan_get_ageing(struct rtnl_link *, uint32_t *)
Get expiration timer value to use for VXLAN.
Definition: vxlan.c:1090
int rtnl_link_vxlan_set_id(struct rtnl_link *, uint32_t)
Set VXLAN Network Identifier.
Definition: vxlan.c:735
int rtnl_link_vxlan_set_udp_csum(struct rtnl_link *, uint8_t)
Set UDP checksum status to use for VXLAN.
Definition: vxlan.c:1484
struct rtnl_link * rtnl_link_vxlan_alloc(void)
Allocate link object of type VXLAN.
Definition: vxlan.c:701
int rtnl_link_vxlan_get_udp_zero_csum6_rx(struct rtnl_link *)
Get skip UDP checksum received over IPv6 status to use for VXLAN.
Definition: vxlan.c:1576
int rtnl_link_vxlan_get_proxy(struct rtnl_link *)
Get ARP proxy status to use for VXLAN.
Definition: vxlan.c:1223
int rtnl_link_vxlan_get_port_range(struct rtnl_link *, struct ifla_vxlan_port_range *)
Get range of UDP port numbers to use for VXLAN.
Definition: vxlan.c:1180
int rtnl_link_vxlan_get_port(struct rtnl_link *, uint32_t *)
Get UDP destination port to use for VXLAN.
Definition: vxlan.c:1460
int rtnl_link_vxlan_set_collect_metadata(struct rtnl_link *, uint8_t)
Set collect metadata status to use for VXLAN.
Definition: vxlan.c:1669
int rtnl_link_vxlan_disable_proxy(struct rtnl_link *)
Disable ARP proxy.
Definition: vxlan.c:1252
int rtnl_link_vxlan_set_group(struct rtnl_link *, struct nl_addr *)
Set VXLAN multicast IP address.
Definition: vxlan.c:781
int rtnl_link_vxlan_get_ttl(struct rtnl_link *)
Get IP TTL value to use for VXLAN.
Definition: vxlan.c:956
int rtnl_link_vxlan_set_label(struct rtnl_link *, uint32_t)
Set flow label to use for VXLAN.
Definition: vxlan.c:1706
int rtnl_link_vxlan_set_limit(struct rtnl_link *, uint32_t)
Set maximum number of forwarding database entries to use for VXLAN.
Definition: vxlan.c:1114
int rtnl_link_vxlan_set_ageing(struct rtnl_link *, uint32_t)
Set expiration timer value to use for VXLAN.
Definition: vxlan.c:1071
int rtnl_link_vxlan_enable_proxy(struct rtnl_link *)
Enable ARP proxy.
Definition: vxlan.c:1241
int rtnl_link_vxlan_set_port_range(struct rtnl_link *, struct ifla_vxlan_port_range *)
Set range of UDP port numbers to use for VXLAN.
Definition: vxlan.c:1157
int rtnl_link_vxlan_set_link(struct rtnl_link *, uint32_t)
Set physical device to use for VXLAN.
Definition: vxlan.c:838