]> git.proxmox.com Git - mirror_frr.git/blobdiff - babeld/babeld.h
Merge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed
[mirror_frr.git] / babeld / babeld.h
index 87b4de7b1fd32da894968c5e5ad8501368b86302..752cc8620a84708dc5189d5c53d9fca6907dacf6 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
 
@@ -41,6 +25,7 @@ THE SOFTWARE.
 #define BABEL_BABELD_H
 
 #include <zebra.h>
+#include "vty.h"
 
 #define INFINITY ((unsigned short)(~0))
 
@@ -105,12 +90,20 @@ THE SOFTWARE.
 
 #define BABEL_VTY_PORT 2609
 #define BABEL_DEFAULT_CONFIG "babeld.conf"
-#define BABEL_VERSION "0.1 for quagga"
-#define BABELD_DEFAULT_HELLO_INTERVAL 4000 /* miliseconds */
 
+/* Values in milliseconds */
+#define BABEL_DEFAULT_HELLO_INTERVAL 4000
+#define BABEL_DEFAULT_UPDATE_INTERVAL 16000
+#define BABEL_DEFAULT_RESEND_DELAY 2000
 
-/* Babel socket. */
-extern int protocol_socket;
+/* In units of seconds */
+#define BABEL_DEFAULT_SMOOTHING_HALF_LIFE 4
+
+/* In units of 1/256. */
+#define BABEL_DEFAULT_DIVERSITY_FACTOR 256
+
+#define BABEL_DEFAULT_RXCOST_WIRED 96
+#define BABEL_DEFAULT_RXCOST_WIRELESS 256
 
 /* Babel structure. */
 struct babel
@@ -118,8 +111,11 @@ struct babel
     /* Babel threads. */
     struct thread *t_read;    /* on Babel protocol's socket */
     struct thread *t_update;  /* timers */
+    /* distribute_ctx */
+    struct distribute_ctx *distribute_ctx;
 };
 
+extern struct zebra_privs_t babeld_privs;
 
 extern void babeld_quagga_init(void);
 extern int input_filter(const unsigned char *id,
@@ -131,6 +127,6 @@ extern int redistribute_filter(const unsigned char *prefix, unsigned short plen,
                                unsigned int ifindex, int proto);
 extern int resize_receive_buffer(int size);
 extern void schedule_neighbours_check(int msecs, int override);
-
+extern struct babel *babel_lookup(void);
 
 #endif /* BABEL_BABELD_H */