]>
git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_table.h
2 Copyright (C) 1998, 2001 Kunihiro Ishiguro
4 This file is part of GNU Zebra.
6 GNU Zebra is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 GNU Zebra is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Zebra; see the file COPYING. If not, write to the Free
18 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 #ifndef _QUAGGA_BGP_TABLE_H
22 #define _QUAGGA_BGP_TABLE_H
34 /* afi/safi of this table */
38 /* The owner of this 'bgp_table' structure. */
50 struct bgp_table
*table
;
51 struct bgp_node
*parent
;
52 struct bgp_node
*link
[2];
53 #define l_left link[0]
54 #define l_right link[1]
58 struct bgp_adj_out
*adj_out
;
60 struct bgp_adj_in
*adj_in
;
67 #define BGP_NODE_PROCESS_SCHEDULED (1 << 0)
70 extern struct bgp_table
*bgp_table_init (afi_t
, safi_t
);
71 extern void bgp_table_finish (struct bgp_table
*);
72 extern void bgp_unlock_node (struct bgp_node
*node
);
73 extern void bgp_node_delete (struct bgp_node
*node
);
74 extern struct bgp_node
*bgp_table_top (struct bgp_table
*);
75 extern struct bgp_node
*bgp_route_next (struct bgp_node
*);
76 extern struct bgp_node
*bgp_route_next_until (struct bgp_node
*, struct bgp_node
*);
77 extern struct bgp_node
*bgp_node_get (struct bgp_table
*, struct prefix
*);
78 extern struct bgp_node
*bgp_node_lookup (struct bgp_table
*, struct prefix
*);
79 extern struct bgp_node
*bgp_lock_node (struct bgp_node
*node
);
80 extern struct bgp_node
*bgp_node_match (struct bgp_table
*, struct prefix
*);
81 extern struct bgp_node
*bgp_node_match_ipv4 (struct bgp_table
*,
84 extern struct bgp_node
*bgp_node_match_ipv6 (struct bgp_table
*,
86 #endif /* HAVE_IPV6 */
87 extern unsigned long bgp_table_count (struct bgp_table
*);
88 #endif /* _QUAGGA_BGP_TABLE_H */