RustForge

foundry

Foundry OS: the operating system built on the Rustbelt kernel

authorTyler Fowler <tyler@localhost>2026-10-30 03:53:54 -0700
commit8c422d39686a0f48deba0d6826fb21819f5d3110
parent2bd4007a984d91efab6fdb4fc95ebec5f661150d
treebrowse files at this commit
Stage 12: networking (0.12.0)

- virtio-net driver (legacy, interrupt-driven via PIC IRQ 11) + smoltcp 0.14
  (ARP, IPv4, ICMP, UDP, TCP, DHCP, DNS); a netd thread polls on IRQs/timers
- BSD-style socket syscalls with Linux numbers (socket 41, connect 42,
  accept 43, sendto 44, recvfrom 45, bind 49, listen 50, setsockopt 54),
  plus clock_gettime 228 and our own resolve 503 / netinfo 504; blocking on
  wait queues with SO_RCVTIMEO deadlines
- programs: ifconfig (ip), ping, host (nslookup), fetch (wget), httpd
- spurious PIC IRQ 7/15 handlers (fixes a double fault)
- tests/net.rs (10 tests: DHCP, ICMP, UDP/TFTP, TCP echo + HTTP GET,
  ECONNREFUSED, recv timeout, programs, leak check, DNS or skip);
  self-test covers ifconfig/ping/fetch/wget to D:/host/httpd via hostfwd
- README networking chapter, roadmap; boot.png shows ifconfig/ping/fetch
Mscripts/selftest.sh+11 -0

1 file changed, 11 insertions, 0 deletions

@@ -68,6 +68,17 @@ start spin start spin sysinfo wait+# Stage 12: networking. DHCP gave us an address; ping QEMU's gateway; fetch+# from the test web server QEMU runs for 10.0.2.100 (guestfwd), and save a+# 108 KB file to D:; look up a name (only works if the host has DNS); then+# serve one request with httpd (run-headless.sh curls it through hostfwd).+ifconfig+ping -c 3 -i 200 10.0.2.2+fetch http://10.0.2.100/+wget -o D:/seq.txt http://10.0.2.100/big+cat D:/seq.txt | wc -l+host example.com+httpd -n 1 -t 20 nosuchprogram cd Q: cd A:/tmp