0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

Killed socket debug code. Initialize config pool and protocols.

More to come later...
This commit is contained in:
Martin Mares 1998-06-03 08:43:44 +00:00
parent c5ffa44759
commit fd50083df4

View File

@ -16,6 +16,7 @@
#include "nest/route.h" #include "nest/route.h"
#include "nest/protocol.h" #include "nest/protocol.h"
#include "nest/iface.h" #include "nest/iface.h"
#include "nest/confile.h"
#include "unix.h" #include "unix.h"
@ -51,31 +52,15 @@ signal_init(void)
} }
/* /*
* Hic Est main() * Config Pool
*/ */
void erro(sock *s, int e) pool *cfg_pool;
{ mempool *cfg_mem;
debug("errrr e=%d\n", e);
rfree(s);
}
void bla(sock *s) /*
{ * Hic Est main()
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;
}
int int
main(void) main(void)
@ -84,15 +69,22 @@ main(void)
log_init_debug(NULL); log_init_debug(NULL);
resource_init(); resource_init();
cfg_pool = rp_new(&root_pool, "Config");
cfg_mem = mp_new(cfg_pool, 1024);
io_init(); io_init();
rt_init(); rt_init();
if_init(); if_init();
protos_init(); protos_init();
protos_preconfig();
protos_postconfig();
scan_if_init(); scan_if_init();
signal_init(); signal_init();
protos_start();
handle_sigusr(0); handle_sigusr(0);
debug("Entering I/O loop.\n"); debug("Entering I/O loop.\n");