From c74c0e3cdf008988a8873d3f76c0d71b29ab8673 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 27 Nov 1998 21:09:57 +0000 Subject: First attempt at protocol configuration (now done only for RIP). --- sysdep/unix/main.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'sysdep') diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index c649cb27..4aeb9c19 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -78,9 +78,12 @@ read_config(void) conf_fd = open(PATH_CONFIG, O_RDONLY); if (conf_fd < 0) die("Unable to open configuration file " PATH_CONFIG ": %m"); + protos_preconfig(); cf_read_hook = cf_read; cf_lex_init(1); cf_parse(); + add_tail(&protocol_list, &proto_unix_kernel.n); /* FIXME: Must be _always_ the last one */ + protos_postconfig(); } /* @@ -93,29 +96,25 @@ main(void) log(L_INFO "Launching BIRD -1.-1-pre-omega..."); log_init_debug(NULL); - resource_init(); - - debug("Reading configuration file.\n"); - read_config(); debug("Initializing.\n"); + resource_init(); io_init(); rt_init(); if_init(); + protos_build(); - add_tail(&protocol_list, &proto_unix_kernel.n); /* FIXME: Must be _always_ the last one */ protos_init(); - protos_preconfig(); - protos_postconfig(); + + debug("Reading configuration file.\n"); + read_config(); signal_init(); scan_if_init(); auto_router_id(); -#if 0 protos_start(); -#endif handle_sigusr(0); -- cgit v1.2.3