]>
git.proxmox.com Git - mirror_frr.git/blob - bgpd/rfapi/vnc_import_bgp.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Copyright 2009-2016, LabN Consulting, L.L.C.
8 #ifndef _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_
9 #define _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_
11 #include "lib/zebra.h"
12 #include "lib/prefix.h"
14 #include "bgpd/bgpd.h"
15 #include "bgpd/bgp_route.h"
17 #define VALID_INTERIOR_TYPE(type) \
18 (((type) == ZEBRA_ROUTE_BGP) || ((type) == ZEBRA_ROUTE_BGP_DIRECT))
20 extern uint32_t calc_local_pref(struct attr
*attr
, struct peer
*peer
);
22 extern int vnc_prefix_cmp(const void *pfx1
, const void *pfx2
);
24 extern void vnc_import_bgp_add_route(struct bgp
*bgp
,
25 const struct prefix
*prefix
,
26 struct bgp_path_info
*info
);
28 extern void vnc_import_bgp_del_route(struct bgp
*bgp
,
29 const struct prefix
*prefix
,
30 struct bgp_path_info
*info
);
32 extern void vnc_import_bgp_redist_enable(struct bgp
*bgp
, afi_t afi
);
34 extern void vnc_import_bgp_redist_disable(struct bgp
*bgp
, afi_t afi
);
36 extern void vnc_import_bgp_exterior_redist_enable(struct bgp
*bgp
, afi_t afi
);
38 extern void vnc_import_bgp_exterior_redist_disable(struct bgp
*bgp
, afi_t afi
);
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 */
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 */
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 */
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 */
62 #endif /* _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_ */