]> git.proxmox.com Git - mirror_frr.git/blobdiff - babeld/xroute.h
Merge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed
[mirror_frr.git] / babeld / xroute.h
index 4d4ab99d03590bc584e7ca98f204a1c52b373668..59afccb5904f2de673e29b3a2bbc3c8a39237606 100644 (file)
@@ -1,20 +1,4 @@
-/*  
- *  This file is free software: you may copy, redistribute and/or modify it  
- *  under the terms of the GNU General Public License as published by the  
- *  Free Software Foundation, either version 2 of the License, or (at your  
- *  option) any later version.  
- *  
- *  This file is distributed in the hope that it will be useful, but  
- *  WITHOUT ANY WARRANTY; without even the implied warranty of  
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  
- *  General Public License for more details.  
- *  
- *  You should have received a copy of the GNU General Public License  
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.  
- *  
- * This file incorporates work covered by the following copyright and  
- * permission notice:  
- *  
+/*
 Copyright (c) 2007, 2008 by Juliusz Chroboczek
 Copyright 2011 by Matthieu Boutier and Juliusz Chroboczek
 
@@ -37,6 +21,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 */
 
+#ifndef BABEL_XROUTE_H
+#define BABEL_XROUTE_H
+
 struct xroute {
     unsigned char prefix[16];
     unsigned char plen;
@@ -45,15 +32,15 @@ struct xroute {
     int proto;
 };
 
+struct xroute_stream;
+
 struct xroute *find_xroute(const unsigned char *prefix, unsigned char plen);
 void flush_xroute(struct xroute *xroute);
-int babel_ipv4_route_add (struct zapi_ipv4 *api, struct prefix_ipv4 *prefix,
-                          unsigned int ifindex, struct in_addr *nexthop);
-int babel_ipv4_route_delete (struct zapi_ipv4 *api, struct prefix_ipv4 *prefix,
-                             unsigned int ifindex);
-int babel_ipv6_route_add (struct zapi_ipv6 *api, struct prefix_ipv6 *prefix,
-                          unsigned int ifindex, struct in6_addr *nexthop);
-int babel_ipv6_route_delete (struct zapi_ipv6 *api, struct prefix_ipv6 *prefix,
-                             unsigned int ifindex);
+int babel_route_add (struct zapi_route *api);
+int babel_route_delete (struct zapi_route *api);
 int xroutes_estimate(void);
-void for_all_xroutes(void (*f)(struct xroute*, void*), void *closure);
+struct xroute_stream *xroute_stream(void);
+struct xroute *xroute_stream_next(struct xroute_stream *stream);
+void xroute_stream_done(struct xroute_stream *stream);
+
+#endif /* BABEL_XROUTE_H */