]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/rfapi/vnc_export_table.h
*: reindent
[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 "lib/table.h"
26 #include "lib/thread.h"
27 #include "lib/vty.h"
28
29 #include "bgpd/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 EXPORT_TYPE_BGP,
36 EXPORT_TYPE_ZEBRA
37 } vnc_export_type_t;
38
39 struct vnc_export_info {
40 struct vnc_export_info *next;
41 struct route_node *node;
42 struct peer *peer;
43 u_char type;
44 u_char subtype;
45 uint32_t lifetime;
46 struct thread *timer;
47 };
48
49 extern struct route_node *vnc_etn_get(struct bgp *bgp, vnc_export_type_t type,
50 struct prefix *p);
51
52 extern struct route_node *
53 vnc_etn_lookup(struct bgp *bgp, vnc_export_type_t type, struct prefix *p);
54
55 extern struct vnc_export_info *vnc_eti_get(struct bgp *bgp,
56 vnc_export_type_t etype,
57 struct prefix *p, struct peer *peer,
58 uint8_t type, uint8_t subtype);
59
60 extern void vnc_eti_delete(struct vnc_export_info *goner);
61
62 extern struct vnc_export_info *
63 vnc_eti_checktimer(struct bgp *bgp, vnc_export_type_t etype, struct prefix *p,
64 struct peer *peer, uint8_t type, uint8_t subtype);
65
66
67 #endif /* _QUAGGA_VNC_VNC_EXPORT_TABLE_H_ */