]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/rfapi/rfapi_ap.h
bgpd: add L3/L2VPN Virtual Network Control feature
[mirror_frr.git] / bgpd / rfapi / rfapi_ap.h
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 #ifndef _QUAGGA_BGP_RFAPI_AP_H
22 #define _QUAGGA_BGP_RFAPI_AP_H
23
24 /* TBD delete some of these #includes */
25
26 #include <errno.h>
27
28 #include "zebra.h"
29 #include "prefix.h"
30 #include "table.h"
31 #include "vty.h"
32 #include "memory.h"
33 #include "routemap.h"
34 #include "log.h"
35 #include "linklist.h"
36 #include "command.h"
37 #include "stream.h"
38
39 #include "bgpd.h"
40
41 #include "bgp_rfapi_cfg.h"
42 #include "rfapi.h"
43 #include "rfapi_backend.h"
44
45 #include "bgp_route.h"
46 #include "bgp_aspath.h"
47 #include "bgp_advertise.h"
48
49 #include "rfapi_import.h"
50 #include "rfapi_private.h"
51 #include "rfapi_monitor.h"
52 #include "rfapi_vty.h"
53 #include "vnc_export_bgp.h"
54 #include "vnc_export_bgp_p.h"
55 #include "vnc_zebra.h"
56 #include "vnc_import_bgp.h"
57 #include "rfapi_rib.h"
58
59
60 extern void
61 rfapiApInit (struct rfapi_advertised_prefixes *ap);
62
63 extern void
64 rfapiApRelease (struct rfapi_advertised_prefixes *ap);
65
66 extern int
67 rfapiApCount (struct rfapi_descriptor *rfd);
68
69
70 extern int
71 rfapiApCountAll (struct bgp *bgp);
72
73 extern void
74 rfapiApReadvertiseAll (struct bgp *bgp, struct rfapi_descriptor *rfd);
75
76 extern void
77 rfapiApWithdrawAll (struct bgp *bgp, struct rfapi_descriptor *rfd);
78
79 extern int
80 rfapiApAdd (
81 struct bgp *bgp,
82 struct rfapi_descriptor *rfd,
83 struct prefix *pfx_ip,
84 struct prefix *pfx_eth,
85 struct prefix_rd *prd,
86 uint32_t lifetime,
87 uint8_t cost,
88 struct rfapi_l2address_option *l2o); /* other options TBD */
89
90 extern int
91 rfapiApDelete (
92 struct bgp *bgp,
93 struct rfapi_descriptor *rfd,
94 struct prefix *pfx_ip,
95 struct prefix *pfx_eth,
96 int *advertise_tunnel); /* out */
97
98
99 #endif /* _QUAGGA_BGP_RFAPI_AP_H */