]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/rfapi/vnc_import_bgp.h
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else
[mirror_frr.git] / bgpd / rfapi / vnc_import_bgp.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 *
4 * Copyright 2009-2016, LabN Consulting, L.L.C.
5 *
6 */
7
8 #ifndef _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_
9 #define _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_
10
11 #include "lib/zebra.h"
12 #include "lib/prefix.h"
13
14 #include "bgpd/bgpd.h"
15 #include "bgpd/bgp_route.h"
16
17 #define VALID_INTERIOR_TYPE(type) \
18 (((type) == ZEBRA_ROUTE_BGP) || ((type) == ZEBRA_ROUTE_BGP_DIRECT))
19
20 extern uint32_t calc_local_pref(struct attr *attr, struct peer *peer);
21
22 extern int vnc_prefix_cmp(const void *pfx1, const void *pfx2);
23
24 extern void vnc_import_bgp_add_route(struct bgp *bgp,
25 const struct prefix *prefix,
26 struct bgp_path_info *info);
27
28 extern void vnc_import_bgp_del_route(struct bgp *bgp,
29 const struct prefix *prefix,
30 struct bgp_path_info *info);
31
32 extern void vnc_import_bgp_redist_enable(struct bgp *bgp, afi_t afi);
33
34 extern void vnc_import_bgp_redist_disable(struct bgp *bgp, afi_t afi);
35
36 extern void vnc_import_bgp_exterior_redist_enable(struct bgp *bgp, afi_t afi);
37
38 extern void vnc_import_bgp_exterior_redist_disable(struct bgp *bgp, afi_t afi);
39
40
41 extern void vnc_import_bgp_exterior_add_route(
42 struct bgp *bgp, /* exterior instance, we hope */
43 const struct prefix *prefix, /* unicast prefix */
44 struct bgp_path_info *info); /* unicast info */
45
46 extern void vnc_import_bgp_exterior_del_route(
47 struct bgp *bgp, const struct prefix *prefix, /* unicast prefix */
48 struct bgp_path_info *info); /* unicast info */
49
50 extern void vnc_import_bgp_add_vnc_host_route_mode_resolve_nve(
51 struct bgp *bgp, struct prefix_rd *prd, /* RD */
52 struct bgp_table *table_rd, /* per-rd VPN route table */
53 const struct prefix *prefix, /* VPN prefix */
54 struct bgp_path_info *bpi); /* new VPN host route */
55
56 extern void vnc_import_bgp_del_vnc_host_route_mode_resolve_nve(
57 struct bgp *bgp, struct prefix_rd *prd, /* RD */
58 struct bgp_table *table_rd, /* per-rd VPN route table */
59 const struct prefix *prefix, /* VPN prefix */
60 struct bgp_path_info *bpi); /* old VPN host route */
61
62 #endif /* _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_ */