News for hackers. Stuff that matters.
Re:Let's code a TCP/IP stack, 1: Ethernet and ARP by cihangir on Tuesday March 04, 2025 @05:52AM (#43252996)
Years ago, I attempted to build a user-space network stack in C [0] that processes raw packets through the TUN interface and got it working to a certain point. It currently includes a simple shell that allows configuring IP addresses, routes, and such. A hybrid structure reminiscent of both mbuf and sk_buf is used to hold the network packets. However, after completing the UDP implementation I didn't find the time or motivation to implement TCP. If you want to check it out, here's the link:

[0] https://github.com/cakturk/unet

Re:Let's code a TCP/IP stack, 1: Ethernet and ARP by VWWHFSfQ on Tuesday March 04, 2025 @08:48AM (#43254527)
Many years ago, I wrote a pcap/tcpdump parser in pure bash, because it's all I knew how to write "programs" with. It was, of course, the slowest and most brittle thing of all time, but it did actually work. And was kinda fun. Wish I still had that code somewhere.
Re:Let's code a TCP/IP stack, 1: Ethernet and ARP by jpfr on Thursday March 06, 2025 @03:28PM (#43284773)
Many embedded devices run the lwip implementation of TCP/IP.

The "POSIX port" of lwip does the same. It takes the raw Ethernet bytes from a TUN/TAP device.

https://github.com/lwip-tcpip/lwip/blob/master/contrib/ports...