]> Joshua Wise's Git repositories - netwatch.git/blobdiff - net/net.c
Remove demapper from pagingstub.c, since that code is now elsewhere. Correct locatio...
[netwatch.git] / net / net.c
index 25926af7dac5225d84cac8a765b90ce6c6ee9fbf..d762b47fa85c9949b74dcc9595c02217e85cb07b 100644 (file)
--- 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 <pci.h>
 #include <smram.h>
 #include <pci-bother.h>
 #include <output.h>
 #include <minilib.h>
+#include <tables.h>
 #include <lwip/init.h>
 #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]();
 }
This page took 0.026286 seconds and 4 git commands to generate.