X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/d3411e0d51c282841fb0137fb3764860c9006002..720d0679adb8080f32a56546f60acb218ae9d62c:/net/net.c?ds=inline diff --git a/net/net.c b/net/net.c index 46ea9cd..7164746 100644 --- a/net/net.c +++ b/net/net.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "net.h" #include "../aseg/keyboard.h" @@ -44,10 +45,14 @@ void handle_command(packet_t * p) outputf("NIC: Command: 0x%x, %d bytes", p->command, dl); - if (p->command == 0x42) - { + switch (p->command) { + case 0x42: for (i = 0; i < dl; i++) kbd_inject_key(p->data[i]); + break; + case 0xFE: + outb(0xCF9, 0x4); /* Reboot */ + break; } } @@ -120,4 +125,5 @@ void eth_init() /* Required for DMA to work. :( */ smram_tseg_set_state(SMRAM_TSEG_OPEN); pci_probe_driver(a3c90x_driver); + lwip_init(); }