]>
git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_attr_evpn.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* E-VPN attribute handling structure file
3 * Copyright (C) 2016 6WIND
6 #ifndef _QUAGGA_BGP_ATTR_EVPN_H
7 #define _QUAGGA_BGP_ATTR_EVPN_H
9 #define MAX_ET 0xffffffff
13 enum overlay_index_type
{
14 OVERLAY_INDEX_TYPE_NONE
,
15 OVERLAY_INDEX_GATEWAY_IP
,
21 * Structure to store ovrelay index for EVPN type-5 route
22 * This structure stores ESI and Gateway IP overlay index.
23 * MAC overlay index is stored in the RMAC attribute.
25 struct bgp_route_evpn
{
26 enum overlay_index_type type
;
31 extern bool str2esi(const char *str
, esi_t
*id
);
32 extern char *ecom_mac2str(char *ecom_mac
);
34 extern void bgp_add_routermac_ecom(struct attr
*attr
,
35 struct ethaddr
*routermac
);
36 extern int bgp_build_evpn_prefix(int type
, uint32_t eth_tag
,
38 extern bool bgp_attr_rmac(struct attr
*attr
, struct ethaddr
*rmac
);
39 extern uint32_t bgp_attr_mac_mobility_seqnum(struct attr
*attr
,
41 extern uint8_t bgp_attr_default_gw(struct attr
*attr
);
43 extern void bgp_attr_evpn_na_flag(struct attr
*attr
, uint8_t *router_flag
,
45 extern uint16_t bgp_attr_df_pref_from_ec(struct attr
*attr
, uint8_t *alg
);
48 extern bool bgp_route_evpn_same(const struct bgp_route_evpn
*e1
,
49 const struct bgp_route_evpn
*e2
);
50 #endif /* _QUAGGA_BGP_ATTR_EVPN_H */