]> git.proxmox.com Git - mirror_frr.git/blob - babeld/xroute.h
Merge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed
[mirror_frr.git] / babeld / xroute.h
1 /*
2 Copyright (c) 2007, 2008 by Juliusz Chroboczek
3 Copyright 2011 by Matthieu Boutier and Juliusz Chroboczek
4
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
11
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 THE SOFTWARE.
22 */
23
24 #ifndef BABEL_XROUTE_H
25 #define BABEL_XROUTE_H
26
27 struct xroute {
28 unsigned char prefix[16];
29 unsigned char plen;
30 unsigned short metric;
31 unsigned int ifindex;
32 int proto;
33 };
34
35 struct xroute_stream;
36
37 struct xroute *find_xroute(const unsigned char *prefix, unsigned char plen);
38 void flush_xroute(struct xroute *xroute);
39 int babel_route_add (struct zapi_route *api);
40 int babel_route_delete (struct zapi_route *api);
41 int xroutes_estimate(void);
42 struct xroute_stream *xroute_stream(void);
43 struct xroute *xroute_stream_next(struct xroute_stream *stream);
44 void xroute_stream_done(struct xroute_stream *stream);
45
46 #endif /* BABEL_XROUTE_H */