Screenshot from QEMU for quality but it does work on the Lenovo Thinkstation test brick. QEMU additionally doesn't leak any MAC addresses or the fact that my IP is 192.168.1.3 😱. The TCP driver is very unstable and needs rewriting, but it works most of the time at the moment, which is good enough for me to show off. The HTTP code does like 5% of what a compliant HTTP implementation is supposed to do (it parses header lines, how much data it should expect, and if it needs to use chunked transfer encoding) but that's fine. The code can also function as a similarly-feature rich HTTP server which returns entire files from the filesystem when asked politely. This does mean that you can visit <server_ip>/kernel.img without issue, which is quite fun.
Miscellany:
- Apparently you need 8.5 protocols to be able to use the useful parts of the internet: Ethernet, ARP, IPv4, TCP, UDP, DHCP, DNS, HTTP, and half of an ICMP (not necessary but it's good to have)
- The network portion of the OS is only 1800 lines of code according to
cloc(2100 incl. the E1000 NIC driver), which is less than it felt like I wrote. - The whole OS is an auspicious 13337 lines of code. It also has an auspicious 1337 blank lines. This somehow was not intentional.
- There is a github but I don't want to post it here because the code is sort of tragic and some of it desperately needs engoodening, intelligent readers can probably find it anyway.
- The timers in the corner differ by a somewhat concerning amount on QEMU but have no such discrepancy on bare metal. This is probably because VM TSC emulation is not very good.