X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/6d6494e427a90913216c94306593a65cb5361c0d..a807be6ab277fe4bde9285b55c2ac637160132cb:/net/net.c diff --git a/net/net.c b/net/net.c index 25926af..d762b47 100644 --- a/net/net.c +++ b/net/net.c @@ -1,8 +1,19 @@ +/* net.c + * Top-level network glue code + * NetWatch system management mode administration console + * + * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved. + * This program is free software; you can redistribute and/or modify it under + * the terms found in the file LICENSE in the root of this source tree. + * + */ + #include #include #include #include #include +#include #include #include "net.h" @@ -18,8 +29,6 @@ #include "netif/etharp.h" #include "netif/ppp_oe.h" -#include "rfb.h" - static struct nic *_nic = 0x0; static struct netif _netif; @@ -129,15 +138,19 @@ int eth_register(struct nic *nic) return 0; } +typedef void(*thunk_t)(); + +TABLE(thunk_t, protocols); + void eth_init() { - extern void httpd_init(); + int i; /* Required for DMA to work. :( */ smram_tseg_set_state(SMRAM_TSEG_OPEN); - lwip_init(); - httpd_init(); - rfb_init(); + lwip_init(); + for (i = 0; i < TABLE_LENGTH(protocols); i++) + protocols_table[i](); }