]> git.proxmox.com Git - mirror_frr.git/blob - lib/vxlan.h
Merge pull request #12805 from karlquan/kquan_self_orig
[mirror_frr.git] / lib / vxlan.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* VxLAN common header.
3 * Copyright (C) 2016, 2017 Cumulus Networks, Inc.
4 */
5
6 #ifndef __VXLAN_H__
7 #define __VXLAN_H__
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 /* EVPN MH DF election algorithm */
14 #define EVPN_MH_DF_ALG_SERVICE_CARVING 0
15 #define EVPN_MH_DF_ALG_HRW 1
16 #define EVPN_MH_DF_ALG_PREF 2
17
18 /* preference range for DF election */
19 #define EVPN_MH_DF_PREF_MIN 0
20 #define EVPN_MH_DF_PREF_DEFAULT 32767
21 #define EVPN_MH_DF_PREF_MAX 65535
22
23 /* VxLAN Network Identifier - 24-bit (RFC 7348) */
24 typedef uint32_t vni_t;
25 #define VNI_MAX 16777215 /* (2^24 - 1) */
26
27 /* Flooding mechanisms for BUM packets. */
28 /* Currently supported mechanisms are head-end (ingress) replication
29 * (which is the default) and no flooding. Future options could be
30 * using PIM-SM, PIM-Bidir etc.
31 */
32 enum vxlan_flood_control {
33 VXLAN_FLOOD_HEAD_END_REPL = 0,
34 VXLAN_FLOOD_DISABLED,
35 VXLAN_FLOOD_PIM_SM,
36 };
37
38 #ifdef __cplusplus
39 }
40 #endif
41
42 #endif /* __VXLAN_H__ */