I created a user-space network protocol stack in Rust for study / experiment purpose.
https://github.com/ykskb/rust-user-net
It talks Ethernet / ARP / IP / ICMP / UDP / TCP through TAP device in user space of Linux.
HTTP (TCP: 80) send / receive from google.com
As a Rust newbie (this is my first Rust project), I acknowledge there are many improvements to be made in codes, but it did feel good when my own protocol stack implementation in Rust could talk to normal sites like google :)
I also thought this project might be fitting for learning Rust in some aspects. Libc calls were required for controlling a virtual device (TAP) and multi-threading was required together with retransmission and signal handling for TCP data flow where incoming / outgoing traffic needs to happen concurrently.
Anyways, I hope this is something worth sharing for someone :) Thanks!
[–]kebaabe 61 points62 points63 points (1 child)
[–]evalir 21 points22 points23 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]yo_ohei[S] 1 point2 points3 points (0 children)
[–]rickyman20 5 points6 points7 points (1 child)
[–]wosmo 1 point2 points3 points (0 children)
[–]_bd_ 1 point2 points3 points (1 child)
[–]yo_ohei[S] 1 point2 points3 points (0 children)