From 8a48ecb8b15e827f779d4b9fb080dff280b99872 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 26 May 1998 21:42:05 +0000 Subject: Implemented scanning of network interfaces. Mostly very ugly code due to terrible kernel interface (SIOGIFCONF and friends). --- sysdep/unix/main.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'sysdep/unix/main.c') diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index b6b783b..293ee63 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -15,6 +15,7 @@ #include "lib/socket.h" #include "nest/route.h" #include "nest/protocol.h" +#include "nest/iface.h" #include "unix.h" @@ -29,6 +30,7 @@ handle_sigusr(int sig) sk_dump_all(); tm_dump_all(); + if_dump_all(); rta_dump_all(); rt_dump_all(); @@ -83,29 +85,16 @@ main(void) resource_init(); io_init(); rt_init(); + if_init(); protos_init(); + + scan_if_init(); + signal_init(); - { - sock *s = sk_new(&root_pool); - - if (!s) - die("no socket"); - s->type = SK_UDP_MC; - s->sport = 7899; - s->saddr = _MI(0x3ea80015); - s->daddr = _MI(0xe0000001); - s->dport = 7890; - s->rx_hook = xxx; - s->tx_hook = bla; - s->err_hook = erro; - s->rbsize = 1024; - s->tbsize = 1024; - s->ttl = 1; - if (sk_open(s)) - die("open failed"); - bla(s); - } + handle_sigusr(0); + + debug("Entering I/O loop.\n"); io_loop(); die("I/O loop died"); -- cgit v1.2.3