]>
Commit | Line | Data |
---|---|---|
d62a17ae | 1 | /* |
65efcfce LB |
2 | * |
3 | * Copyright 2009-2016, LabN Consulting, L.L.C. | |
4 | * | |
5 | * | |
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. | |
10 | * | |
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. | |
15 | * | |
896014f4 DL |
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 | |
65efcfce LB |
19 | */ |
20 | ||
21 | #ifndef _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_ | |
22 | #define _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_ | |
23 | ||
f8b6f499 LB |
24 | #include "lib/zebra.h" |
25 | #include "lib/prefix.h" | |
65efcfce | 26 | |
f8b6f499 LB |
27 | #include "bgpd/bgpd.h" |
28 | #include "bgpd/bgp_route.h" | |
65efcfce | 29 | |
d62a17ae | 30 | #define VALID_INTERIOR_TYPE(type) \ |
31 | (((type) == ZEBRA_ROUTE_BGP) || ((type) == ZEBRA_ROUTE_BGP_DIRECT)) | |
65efcfce | 32 | |
d62a17ae | 33 | extern uint32_t calc_local_pref(struct attr *attr, struct peer *peer); |
65efcfce | 34 | |
d62a17ae | 35 | extern int vnc_prefix_cmp(void *pfx1, void *pfx2); |
65efcfce | 36 | |
d62a17ae | 37 | extern void vnc_import_bgp_add_route(struct bgp *bgp, struct prefix *prefix, |
4b7e6066 | 38 | struct bgp_path_info *info); |
65efcfce | 39 | |
d62a17ae | 40 | extern void vnc_import_bgp_del_route(struct bgp *bgp, struct prefix *prefix, |
4b7e6066 | 41 | struct bgp_path_info *info); |
65efcfce | 42 | |
d62a17ae | 43 | extern void vnc_import_bgp_redist_enable(struct bgp *bgp, afi_t afi); |
65efcfce | 44 | |
d62a17ae | 45 | extern void vnc_import_bgp_redist_disable(struct bgp *bgp, afi_t afi); |
65efcfce | 46 | |
d62a17ae | 47 | extern void vnc_import_bgp_exterior_redist_enable(struct bgp *bgp, afi_t afi); |
65efcfce | 48 | |
d62a17ae | 49 | extern void vnc_import_bgp_exterior_redist_disable(struct bgp *bgp, afi_t afi); |
65efcfce LB |
50 | |
51 | ||
d62a17ae | 52 | extern void vnc_import_bgp_exterior_add_route( |
4b7e6066 DS |
53 | struct bgp *bgp, /* exterior instance, we hope */ |
54 | struct prefix *prefix, /* unicast prefix */ | |
55 | struct bgp_path_info *info); /* unicast info */ | |
65efcfce | 56 | |
4b7e6066 DS |
57 | extern void vnc_import_bgp_exterior_del_route( |
58 | struct bgp *bgp, struct prefix *prefix, /* unicast prefix */ | |
59 | struct bgp_path_info *info); /* unicast info */ | |
d62a17ae | 60 | |
61 | extern void vnc_import_bgp_add_vnc_host_route_mode_resolve_nve( | |
62 | struct bgp *bgp, struct prefix_rd *prd, /* RD */ | |
63 | struct bgp_table *table_rd, /* per-rd VPN route table */ | |
64 | struct prefix *prefix, /* VPN prefix */ | |
40381db7 | 65 | struct bgp_path_info *bpi); /* new VPN host route */ |
d62a17ae | 66 | |
67 | extern void vnc_import_bgp_del_vnc_host_route_mode_resolve_nve( | |
68 | struct bgp *bgp, struct prefix_rd *prd, /* RD */ | |
69 | struct bgp_table *table_rd, /* per-rd VPN route table */ | |
70 | struct prefix *prefix, /* VPN prefix */ | |
40381db7 | 71 | struct bgp_path_info *bpi); /* old VPN host route */ |
65efcfce LB |
72 | |
73 | #endif /* _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_ */ |