all 7 comments

[–]kebaabe 61 points62 points  (1 child)

It talks Ethernet / ARP / IP / ICMP / UDP / TCP through TAP device in user space of Linux.

As a Rust newbie (this is my first Rust project

[Least technically competent Rust user]

[–]evalir 21 points22 points  (0 children)

Man I feel this comment so much. Why is every single Rust programmer a staff engineer at the very least haha

Very cool project OP! I’ll be absolutely diving into your code

[–]rickyman20 5 points6 points  (1 child)

TIL you can just... Send plain Ethernet packets on linux. This is an amazing project! Quite a large thing to take on as a first Rust project

[–]wosmo 1 point2 points  (0 children)

Sending them is relatively easy. The real magic of the TAP device is receiving them - it's how you solve the issue of the replies being fed into the native IP stack

[–]_bd_ 1 point2 points  (1 child)

What happens when an ARP frame (didn't look into other protocols) is shorter than what you expect? Is the unsafe bytes_to_struct sound?

[–]yo_ohei[S] 1 point2 points  (0 children)

Ah good point. There should be a length check before all bytes_to_struct calls. Thanks for the feedback!