X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/3c4e084de9ed00171748c20de1251d347fc33c1c..a807be6ab277fe4bde9285b55c2ac637160132cb:/net/net.c?ds=sidebyside diff --git a/net/net.c b/net/net.c index 1462f09..d762b47 100644 --- a/net/net.c +++ b/net/net.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "net.h" @@ -28,8 +29,6 @@ #include "netif/etharp.h" #include "netif/ppp_oe.h" -#include "rfb.h" - static struct nic *_nic = 0x0; static struct netif _netif; @@ -139,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](); }