babeld: remove remains of standalone babeld's configuration code.
Standalone babeld has a configuration interface that is not used in
Quagga. This removes a few bits of this code that survived the
port to Quagga.
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 24f56f3..2b5f956 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -565,10 +565,6 @@
babel_ifp->flags |= BABEL_IF_LQ;
}
- /* Since the interface was marked as active above, the
- idle_hello_interval cannot be the one being used here. */
- babel_ifp->update_interval = babel_ifp->hello_interval * 4;
-
memset(&mreq, 0, sizeof(mreq));
memcpy(&mreq.ipv6mr_multiaddr, protocol_group, 16);
mreq.ipv6mr_interface = ifp->ifindex;
@@ -1019,7 +1015,8 @@
babel_ifp->bucket_time = babel_now.tv_sec;
babel_ifp->bucket = BUCKET_TOKENS_MAX;
babel_ifp->hello_seqno = (random() & 0xFFFF);
- babel_ifp->hello_interval = BABELD_DEFAULT_HELLO_INTERVAL;
+ babel_ifp->hello_interval = BABEL_DEFAULT_HELLO_INTERVAL;
+ babel_ifp->update_interval = BABEL_DEFAULT_UPDATE_INTERVAL;
babel_ifp->channel = BABEL_IF_CHANNEL_INTERFERING;
return babel_ifp;
diff --git a/babeld/babel_interface.h b/babeld/babel_interface.h
index 1761e3d..94fd8e5 100644
--- a/babeld/babel_interface.h
+++ b/babeld/babel_interface.h
@@ -91,8 +91,6 @@
return ((babel_interface_nfo*) ifp->info);
}
-#define IF_CONF(_ifp, _field) babel_get_if_nfo(_ifp)->_field
-
/* babel_interface_nfo flags */
#define BABEL_IF_IS_UP (1 << 0)
#define BABEL_IF_WIRED (1 << 1)
diff --git a/babeld/babel_main.c b/babeld/babel_main.c
index 3d83091..0fcba74 100644
--- a/babeld/babel_main.c
+++ b/babeld/babel_main.c
@@ -79,8 +79,6 @@
unsigned char myid[8]; /* unique id (mac address of an interface) */
int debug = 0;
-int default_wireless_hello_interval = -1;
-int default_wired_hello_interval = -1;
int resend_delay = -1;
static const char *pidfile = PATH_BABELD_PID;
@@ -258,18 +256,7 @@
vty_init (master);
memory_init ();
- if(default_wireless_hello_interval <= 0)
- default_wireless_hello_interval = 4000;
- default_wireless_hello_interval = MAX(default_wireless_hello_interval, 5);
-
- if(default_wired_hello_interval <= 0)
- default_wired_hello_interval = 4000;
- default_wired_hello_interval = MAX(default_wired_hello_interval, 5);
-
- resend_delay = 2000;
- resend_delay = MIN(resend_delay, default_wireless_hello_interval / 2);
- resend_delay = MIN(resend_delay, default_wired_hello_interval / 2);
- resend_delay = MAX(resend_delay, 20);
+ resend_delay = BABEL_DEFAULT_RESEND_DELAY;
if(parasitic && allow_duplicates >= 0) {
/* Too difficult to get right. */
diff --git a/babeld/babel_main.h b/babeld/babel_main.h
index 4c08e18..a4038de 100644
--- a/babeld/babel_main.h
+++ b/babeld/babel_main.h
@@ -41,7 +41,6 @@
extern struct timeval babel_now; /* current time */
extern struct thread_master *master; /* quagga's threads handler */
extern int debug;
-extern int default_wireless_hello_interval, default_wired_hello_interval;
extern int resend_delay;
extern unsigned char myid[8];
diff --git a/babeld/babeld.h b/babeld/babeld.h
index 3c47323..b19ae0f 100644
--- a/babeld/babeld.h
+++ b/babeld/babeld.h
@@ -107,7 +107,11 @@
#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. */