]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/rfapi/rfapi_backend.h
bgpd: add L3/L2VPN Virtual Network Control feature
[mirror_frr.git] / bgpd / rfapi / rfapi_backend.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
22 #ifndef _QUAGGA_BGP_RFAPI_BACKEND_H
23 #define _QUAGGA_BGP_RFAPI_BACKEND_H
24
25 #if ENABLE_BGP_VNC
26
27 #include "bgp_route.h"
28 #include "bgp_nexthop.h"
29
30 extern void rfapi_init (void);
31 extern void vnc_zebra_init (struct thread_master *master);
32 extern void vnc_zebra_destroy (void);
33
34 extern void rfapi_delete (struct bgp *);
35
36 struct rfapi *bgp_rfapi_new (struct bgp *bgp);
37 void bgp_rfapi_destroy (struct bgp *bgp, struct rfapi *h);
38
39 struct rfapi_import_table *rfapiImportTableRefAdd (struct bgp *bgp,
40 struct ecommunity
41 *rt_import_list);
42
43 void
44 rfapiImportTableRefDelByIt (struct bgp *bgp,
45 struct rfapi_import_table *it_target);
46
47
48 extern void
49 rfapiProcessUpdate (struct peer *peer,
50 void *rfd,
51 struct prefix *p,
52 struct prefix_rd *prd,
53 struct attr *attr,
54 afi_t afi,
55 safi_t safi,
56 u_char type, u_char sub_type, uint32_t * label);
57
58
59 extern void
60 rfapiProcessWithdraw (struct peer *peer,
61 void *rfd,
62 struct prefix *p,
63 struct prefix_rd *prd,
64 struct attr *attr,
65 afi_t afi, safi_t safi, u_char type, int kill);
66
67 extern void rfapiProcessPeerDown (struct peer *peer);
68
69 extern void
70 vnc_zebra_announce (struct prefix *p,
71 struct bgp_info *new_select, struct bgp *bgp);
72
73 extern void
74 vnc_zebra_withdraw (struct prefix *p, struct bgp_info *old_select);
75
76
77 extern void
78 rfapi_vty_out_vncinfo (struct vty *vty,
79 struct prefix *p, struct bgp_info *bi, safi_t safi);
80
81
82 extern void vnc_direct_bgp_vpn_enable (struct bgp *bgp, afi_t afi);
83
84 extern void vnc_direct_bgp_vpn_disable (struct bgp *bgp, afi_t afi);
85
86 extern void vnc_direct_bgp_rh_vpn_enable (struct bgp *bgp, afi_t afi);
87
88 extern void vnc_direct_bgp_rh_vpn_disable (struct bgp *bgp, afi_t afi);
89
90 #endif /* ENABLE_BGP_VNC */
91
92 #endif /* _QUAGGA_BGP_RFAPI_BACKEND_H */