]>
git.proxmox.com Git - mirror_frr.git/blob - bgpd/rfapi/vnc_import_bgp.h
3 * Copyright 2009-2016, LabN Consulting, L.L.C.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 #ifndef _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_
23 #define _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_
25 #include "lib/zebra.h"
26 #include "lib/prefix.h"
28 #include "bgpd/bgpd.h"
29 #include "bgpd/bgp_route.h"
31 #define VALID_INTERIOR_TYPE(type) \
32 (((type) == ZEBRA_ROUTE_BGP) || ((type) == ZEBRA_ROUTE_BGP_DIRECT))
34 extern uint32_t calc_local_pref(struct attr
*attr
, struct peer
*peer
);
36 extern int vnc_prefix_cmp(void *pfx1
, void *pfx2
);
38 extern void vnc_import_bgp_add_route(struct bgp
*bgp
, struct prefix
*prefix
,
39 struct bgp_info
*info
);
41 extern void vnc_import_bgp_del_route(struct bgp
*bgp
, struct prefix
*prefix
,
42 struct bgp_info
*info
);
44 extern void vnc_import_bgp_redist_enable(struct bgp
*bgp
, afi_t afi
);
46 extern void vnc_import_bgp_redist_disable(struct bgp
*bgp
, afi_t afi
);
48 extern void vnc_import_bgp_exterior_redist_enable(struct bgp
*bgp
, afi_t afi
);
50 extern void vnc_import_bgp_exterior_redist_disable(struct bgp
*bgp
, afi_t afi
);
53 extern void vnc_import_bgp_exterior_add_route(
54 struct bgp
*bgp
, /* exterior instance, we hope */
55 struct prefix
*prefix
, /* unicast prefix */
56 struct bgp_info
*info
); /* unicast info */
59 vnc_import_bgp_exterior_del_route(struct bgp
*bgp
,
60 struct prefix
*prefix
, /* unicast prefix */
61 struct bgp_info
*info
); /* unicast info */
63 extern void vnc_import_bgp_add_vnc_host_route_mode_resolve_nve(
64 struct bgp
*bgp
, struct prefix_rd
*prd
, /* RD */
65 struct bgp_table
*table_rd
, /* per-rd VPN route table */
66 struct prefix
*prefix
, /* VPN prefix */
67 struct bgp_info
*bi
); /* new VPN host route */
69 extern void vnc_import_bgp_del_vnc_host_route_mode_resolve_nve(
70 struct bgp
*bgp
, struct prefix_rd
*prd
, /* RD */
71 struct bgp_table
*table_rd
, /* per-rd VPN route table */
72 struct prefix
*prefix
, /* VPN prefix */
73 struct bgp_info
*bi
); /* old VPN host route */
75 #endif /* _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_ */