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