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