Skip to content

major network update, added IPv6, refactor TCP stack and various minor improvements#65

Merged
differrari merged 34 commits intodifferrari:experimental/netfrom
CodeAnarchist:ipv6
Jan 16, 2026
Merged

major network update, added IPv6, refactor TCP stack and various minor improvements#65
differrari merged 34 commits intodifferrari:experimental/netfrom
CodeAnarchist:ipv6

Conversation

@CodeAnarchist
Copy link
Contributor

This pr is a networking upgrade aimed at making the stack more modern and oriented toward common/realworld use. the biggest change is IPv6 support, alongside multicast membership management, tcp refactor and a handful of qol improvements

on a more personal note (even if it sounds silly): while working on this pr(it took about 3 months) I ended up tying part of it to my own memory of Outer Wilds, the most beautiful game i've ever played, and i genuinely hope anyone reading this has (or will) play it

so what's in here
added ipv6, including extension header handling, fragmentation/reassembly, and PMTU caching
added neighbor discovery(NDP), the control plane needed for IPv6(ICMPv6) and IPv6 routing
improved multicast management, added IGMP(v4 ), MLD(v6) and interface membership changes now propagate correctly syncing multicast filters to the NIC when applicable
added a DHCPv6 implementation(both stateful and stateless), slaac autoconfiguration and dad
moved dns into a dedicated dns/ folder and expanded with localhost resolution, caching, mdns and dns sd
added NTP client and adjusted timer logic to support slewing rather than hard jumps
replaced the the monolithic tcp with a split layout (core/rx/tx/timer) and added several missing features to be closer to the TCP RFC
added a loopback NIC so localhost works cleanly for both IPv4 and Ipv6

and since it's not always Christmas, but it was recently, consider this a small late gift inside the same pr:
the shutdown command (reboot/power-off), a small terminal improvements(you can move around in the terminal using the arrow keys) and usb keyboard improvements, fixing the issue of duplicated key presses on Qemu and properly handling key repeat when a key is held down

a few parts are partially untested:
DHCPv6 stateful mode hasnt been tested
some IPv6 edge cases havent been tested due to the difficulty of reproducing them reliably

and there is a tcp issue where, if the same connection ends up handling both IPv4 and IPv6, the second one to arrive may experience a short delay of a few seconds before receiving the payload data

@differrari differrari changed the base branch from main to experimental/net January 16, 2026 17:50
@differrari differrari merged commit db54513 into differrari:experimental/net Jan 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants