]>
Commit | Line | Data |
---|---|---|
1 | /* | |
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 | * | |
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_RFAPI_VNC_IMPORT_BGP_H_ | |
22 | #define _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_ | |
23 | ||
24 | #include "lib/zebra.h" | |
25 | #include "lib/prefix.h" | |
26 | ||
27 | #include "bgpd/bgpd.h" | |
28 | #include "bgpd/bgp_route.h" | |
29 | ||
30 | #define VALID_INTERIOR_TYPE(type) \ | |
31 | (((type) == ZEBRA_ROUTE_BGP) || ((type) == ZEBRA_ROUTE_BGP_DIRECT)) | |
32 | ||
33 | extern uint32_t | |
34 | calc_local_pref (struct attr *attr, struct peer *peer); | |
35 | ||
36 | extern int | |
37 | vnc_prefix_cmp (void *pfx1, void *pfx2); | |
38 | ||
39 | extern void | |
40 | vnc_import_bgp_add_route ( | |
41 | struct bgp *bgp, | |
42 | struct prefix *prefix, | |
43 | struct bgp_info *info); | |
44 | ||
45 | extern void | |
46 | vnc_import_bgp_del_route ( | |
47 | struct bgp *bgp, | |
48 | struct prefix *prefix, | |
49 | struct bgp_info *info); | |
50 | ||
51 | extern void | |
52 | vnc_import_bgp_redist_enable (struct bgp *bgp, afi_t afi); | |
53 | ||
54 | extern void | |
55 | vnc_import_bgp_redist_disable (struct bgp *bgp, afi_t afi); | |
56 | ||
57 | extern void | |
58 | vnc_import_bgp_exterior_redist_enable (struct bgp *bgp, afi_t afi); | |
59 | ||
60 | extern void | |
61 | vnc_import_bgp_exterior_redist_disable (struct bgp *bgp, afi_t afi); | |
62 | ||
63 | ||
64 | extern void | |
65 | vnc_import_bgp_exterior_add_route ( | |
66 | struct bgp *bgp, /* exterior instance, we hope */ | |
67 | struct prefix *prefix,/* unicast prefix */ | |
68 | struct bgp_info *info); /* unicast info */ | |
69 | ||
70 | extern void | |
71 | vnc_import_bgp_exterior_del_route ( | |
72 | struct bgp *bgp, | |
73 | struct prefix *prefix,/* unicast prefix */ | |
74 | struct bgp_info *info); /* unicast info */ | |
75 | ||
76 | extern void | |
77 | vnc_import_bgp_add_vnc_host_route_mode_resolve_nve ( | |
78 | struct bgp *bgp, | |
79 | struct prefix_rd *prd, /* RD */ | |
80 | struct bgp_table *table_rd, /* per-rd VPN route table */ | |
81 | struct prefix *prefix, /* VPN prefix */ | |
82 | struct bgp_info *bi); /* new VPN host route */ | |
83 | ||
84 | extern void | |
85 | vnc_import_bgp_del_vnc_host_route_mode_resolve_nve ( | |
86 | struct bgp *bgp, | |
87 | struct prefix_rd *prd, /* RD */ | |
88 | struct bgp_table *table_rd, /* per-rd VPN route table */ | |
89 | struct prefix *prefix, /* VPN prefix */ | |
90 | struct bgp_info *bi); /* old VPN host route */ | |
91 | ||
92 | #endif /* _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_ */ |