diff options
author | Martin Mares <mj@ucw.cz> | 1998-06-03 10:43:44 +0200 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-06-03 10:43:44 +0200 |
commit | fd50083df499dd7aa4dd3eec97171003da300250 (patch) | |
tree | d48cac99242d0f7eb077ef833b661acda72b1ac2 /sysdep | |
parent | c5ffa447598bc24cf1b674553bc4d3cc80a831d1 (diff) | |
download | bird-fd50083df499dd7aa4dd3eec97171003da300250.tar bird-fd50083df499dd7aa4dd3eec97171003da300250.zip |
Killed socket debug code. Initialize config pool and protocols.
More to come later...
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/unix/main.c | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 5efd050..5e89b17 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -16,6 +16,7 @@ #include "nest/route.h" #include "nest/protocol.h" #include "nest/iface.h" +#include "nest/confile.h" #include "unix.h" @@ -51,31 +52,15 @@ signal_init(void) } /* - * Hic Est main() + * Config Pool */ -void erro(sock *s, int e) -{ - debug("errrr e=%d\n", e); - rfree(s); -} +pool *cfg_pool; +mempool *cfg_mem; -void bla(sock *s) -{ - puts("W"); - strcpy(s->tbuf, "RAM!\r\n"); - sk_send(s, 6); -} - -int xxx(sock *s, int h) -{ - puts("R"); - do { - strcpy(s->tbuf, "Hello, world!\r\n"); - } - while (sk_send(s, 15) > 0); - return 1; -} +/* + * Hic Est main() + */ int main(void) @@ -84,15 +69,22 @@ main(void) log_init_debug(NULL); resource_init(); + cfg_pool = rp_new(&root_pool, "Config"); + cfg_mem = mp_new(cfg_pool, 1024); + io_init(); rt_init(); if_init(); protos_init(); + protos_preconfig(); + protos_postconfig(); scan_if_init(); signal_init(); + protos_start(); + handle_sigusr(0); debug("Entering I/O loop.\n"); |