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