]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/rfapi/vnc_export_table.h
bgpd: add L3/L2VPN Virtual Network Control feature
[mirror_frr.git] / bgpd / rfapi / vnc_export_table.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_VNC_VNC_EXPORT_TABLE_H_
23 #define _QUAGGA_VNC_VNC_EXPORT_TABLE_H_
24
25 #include "table.h"
26 #include "thread.h"
27 #include "vty.h"
28
29 #include "bgpd.h"
30
31 #define VNC_EXPORT_TYPE_BGP 1
32 #define VNC_EXPORT_TYPE_ZEBRA 2
33
34 typedef enum vnc_export_type
35 {
36 EXPORT_TYPE_BGP,
37 EXPORT_TYPE_ZEBRA
38 } vnc_export_type_t;
39
40 struct vnc_export_info
41 {
42 struct vnc_export_info *next;
43 struct route_node *node;
44 struct peer *peer;
45 u_char type;
46 u_char subtype;
47 uint32_t lifetime;
48 struct thread *timer;
49 };
50
51 extern struct route_node *
52 vnc_etn_get (
53 struct bgp *bgp,
54 vnc_export_type_t type,
55 struct prefix *p);
56
57 extern struct route_node *
58 vnc_etn_lookup (
59 struct bgp *bgp,
60 vnc_export_type_t type,
61 struct prefix *p);
62
63 extern struct vnc_export_info *
64 vnc_eti_get (
65 struct bgp *bgp,
66 vnc_export_type_t etype,
67 struct prefix *p,
68 struct peer *peer,
69 uint8_t type,
70 uint8_t subtype);
71
72 extern void
73 vnc_eti_delete (struct vnc_export_info *goner);
74
75 extern struct vnc_export_info *
76 vnc_eti_checktimer (
77 struct bgp *bgp,
78 vnc_export_type_t etype,
79 struct prefix *p,
80 struct peer *peer,
81 uint8_t type,
82 uint8_t subtype);
83
84
85 #endif /* _QUAGGA_VNC_VNC_EXPORT_TABLE_H_ */