It's interesting to see how this looks in a higher level language.
https://github.com/ProjectMagma/Magma
Go in Fuchsia,
https://fuchsia.googlesource.com/third_party/netstack/
Oberon in Oberon (network stack but not TCP/IP though)
https://www.inf.ethz.ch/personal/wirth/ProjectOberon/Sources...
http://www.projectoberon.com/
Active Oberon in A2 - BlueBottle OS (TCP/IP stack)
https://github.com/btreut/a2/blob/48dcfc1f1a6ed2bec110ca3af3...
https://github.com/btreut/a2
Mesa at Xerox PARC (Courier RPC, XNX)
http://www.bitsavers.org/pdf/xerox/mesa/3.0_1977/listing/
Sing# on Singularity
https://archive.codeplex.com/?p=singularity
Start at sourceCode\sourceCode\base\Libraries\System.Net\Sockets
https://blog.docker.com/2016/05/docker-unikernels-open-sourc...
It's interesting to see how this looks in a higher level language.
https://github.com/ProjectMagma/Magma