]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_attr_evpn.h
Merge pull request #7375 from vishaldhingra/static
[mirror_frr.git] / bgpd / bgp_attr_evpn.h
1 /* E-VPN attribute handling structure file
2 * Copyright (C) 2016 6WIND
3 *
4 * This file is part of FRRouting.
5 *
6 * FRRouting is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2, or (at your option) any
9 * later version.
10 *
11 * FRRouting is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #ifndef _QUAGGA_BGP_ATTR_EVPN_H
22 #define _QUAGGA_BGP_ATTR_EVPN_H
23
24 #define MAX_ET 0xffffffff
25
26 struct attr;
27
28 union gw_addr {
29 struct in_addr ipv4;
30 struct in6_addr ipv6;
31 };
32
33 struct bgp_route_evpn {
34 union gw_addr gw_ip;
35 };
36
37 extern bool str2esi(const char *str, esi_t *id);
38 extern char *ecom_mac2str(char *ecom_mac);
39
40 extern void bgp_add_routermac_ecom(struct attr *attr,
41 struct ethaddr *routermac);
42 extern int bgp_build_evpn_prefix(int type, uint32_t eth_tag,
43 struct prefix *dst);
44 extern bool bgp_attr_rmac(struct attr *attr, struct ethaddr *rmac);
45 extern uint32_t bgp_attr_mac_mobility_seqnum(struct attr *attr,
46 uint8_t *sticky);
47 extern uint8_t bgp_attr_default_gw(struct attr *attr);
48
49 extern void bgp_attr_evpn_na_flag(struct attr *attr, uint8_t *router_flag,
50 bool *proxy);
51 extern uint16_t bgp_attr_df_pref_from_ec(struct attr *attr, uint8_t *alg);
52
53 extern bool is_zero_gw_ip(const union gw_addr *gw_ip, afi_t afi);
54
55 #endif /* _QUAGGA_BGP_ATTR_EVPN_H */