libnl  3.2.29-rc1
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 #define VXLAN_ID_MAX 16777215
23 
24 enum {
25  RTNL_LINK_VXLAN_F_GBP = 1 << 0,
26 #define RTNL_LINK_VXLAN_F_GBP RTNL_LINK_VXLAN_F_GBP
27  RTNL_LINK_VXLAN_F_GPE = 1 << 1,
28 #define RTNL_LINK_VXLAN_F_GPE RTNL_LINK_VXLAN_F_GPE
29  RTNL_LINK_VXLAN_F_REMCSUM_NOPARTIAL = 1 << 2,
30 #define RTNL_LINK_VXLAN_F_REMCSUM_NOPARTIAL RTNL_LINK_VXLAN_F_REMCSUM_NOPARTIAL
31 };
32 
33 extern struct rtnl_link *rtnl_link_vxlan_alloc(void);
34 
35 extern int rtnl_link_is_vxlan(struct rtnl_link *);
36 
37 extern int rtnl_link_vxlan_set_id(struct rtnl_link *, uint32_t);
38 extern int rtnl_link_vxlan_get_id(struct rtnl_link *, uint32_t *);
39 
40 extern int rtnl_link_vxlan_set_group(struct rtnl_link *, struct nl_addr *);
41 extern int rtnl_link_vxlan_get_group(struct rtnl_link *, struct nl_addr **);
42 
43 extern int rtnl_link_vxlan_set_link(struct rtnl_link *, uint32_t);
44 extern int rtnl_link_vxlan_get_link(struct rtnl_link *, uint32_t *);
45 
46 extern int rtnl_link_vxlan_set_local(struct rtnl_link *, struct nl_addr *);
47 extern int rtnl_link_vxlan_get_local(struct rtnl_link *, struct nl_addr **);
48 
49 extern int rtnl_link_vxlan_set_ttl(struct rtnl_link *, uint8_t);
50 extern int rtnl_link_vxlan_get_ttl(struct rtnl_link *);
51 
52 extern int rtnl_link_vxlan_set_tos(struct rtnl_link *, uint8_t);
53 extern int rtnl_link_vxlan_get_tos(struct rtnl_link *);
54 
55 extern int rtnl_link_vxlan_set_learning(struct rtnl_link *, uint8_t);
56 extern int rtnl_link_vxlan_get_learning(struct rtnl_link *);
57 extern int rtnl_link_vxlan_enable_learning(struct rtnl_link *);
58 extern int rtnl_link_vxlan_disable_learning(struct rtnl_link *);
59 
60 extern int rtnl_link_vxlan_set_ageing(struct rtnl_link *, uint32_t);
61 extern int rtnl_link_vxlan_get_ageing(struct rtnl_link *, uint32_t *);
62 
63 extern int rtnl_link_vxlan_set_limit(struct rtnl_link *, uint32_t);
64 extern int rtnl_link_vxlan_get_limit(struct rtnl_link *, uint32_t *);
65 
66 extern int rtnl_link_vxlan_set_port_range(struct rtnl_link *,
67  struct ifla_vxlan_port_range *);
68 extern int rtnl_link_vxlan_get_port_range(struct rtnl_link *,
69  struct ifla_vxlan_port_range *);
70 
71 extern int rtnl_link_vxlan_set_proxy(struct rtnl_link *, uint8_t);
72 extern int rtnl_link_vxlan_get_proxy(struct rtnl_link *);
73 extern int rtnl_link_vxlan_enable_proxy(struct rtnl_link *);
74 extern int rtnl_link_vxlan_disable_proxy(struct rtnl_link *);
75 
76 extern int rtnl_link_vxlan_set_rsc(struct rtnl_link *, uint8_t);
77 extern int rtnl_link_vxlan_get_rsc(struct rtnl_link *);
78 extern int rtnl_link_vxlan_enable_rsc(struct rtnl_link *);
79 extern int rtnl_link_vxlan_disable_rsc(struct rtnl_link *);
80 
81 extern int rtnl_link_vxlan_set_l2miss(struct rtnl_link *, uint8_t);
82 extern int rtnl_link_vxlan_get_l2miss(struct rtnl_link *);
83 extern int rtnl_link_vxlan_enable_l2miss(struct rtnl_link *);
84 extern int rtnl_link_vxlan_disable_l2miss(struct rtnl_link *);
85 
86 extern int rtnl_link_vxlan_set_l3miss(struct rtnl_link *, uint8_t);
87 extern int rtnl_link_vxlan_get_l3miss(struct rtnl_link *);
88 extern int rtnl_link_vxlan_enable_l3miss(struct rtnl_link *);
89 extern int rtnl_link_vxlan_disable_l3miss(struct rtnl_link *);
90 
91 extern int rtnl_link_vxlan_set_port(struct rtnl_link *, uint32_t);
92 extern int rtnl_link_vxlan_get_port(struct rtnl_link *, uint32_t *);
93 
94 extern int rtnl_link_vxlan_set_udp_csum(struct rtnl_link *, uint8_t);
95 extern int rtnl_link_vxlan_get_udp_csum(struct rtnl_link *);
96 
97 extern int rtnl_link_vxlan_set_udp_zero_csum6_tx(struct rtnl_link *, uint8_t);
99 
100 extern int rtnl_link_vxlan_set_udp_zero_csum6_rx(struct rtnl_link *, uint8_t);
102 
103 extern int rtnl_link_vxlan_set_remcsum_tx(struct rtnl_link *, uint8_t);
104 extern int rtnl_link_vxlan_get_remcsum_tx(struct rtnl_link *);
105 
106 extern int rtnl_link_vxlan_set_remcsum_rx(struct rtnl_link *, uint8_t);
107 extern int rtnl_link_vxlan_get_remcsum_rx(struct rtnl_link *);
108 
109 extern int rtnl_link_vxlan_set_flags(struct rtnl_link *, uint32_t flags, int enable);
110 extern int rtnl_link_vxlan_get_flags(struct rtnl_link *, uint32_t *out_flags);
111 
112 extern int rtnl_link_vxlan_set_collect_metadata(struct rtnl_link *, uint8_t);
114 
115 extern int rtnl_link_vxlan_set_label(struct rtnl_link *, uint32_t);
116 extern int rtnl_link_vxlan_get_label(struct rtnl_link *, uint32_t *);
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 #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