Skip to content

Instantly share code, notes, and snippets.

@shriphani
Last active March 5, 2022 05:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shriphani/c3e67e4c0a3a3aff18a34c0464de15be to your computer and use it in GitHub Desktop.
Save shriphani/c3e67e4c0a3a3aff18a34c0464de15be to your computer and use it in GitHub Desktop.

Linux/Unix Networking Concepts and Associated Rust Libraries

IPV4 Address Handling And Manipulation

Protocol Levels

  • L1 - transport layer (copper wires, waves)
  • L2 - Ethernet frames,
  • L3 - IP
  • L4 - TCP, UDP

Device Levels (analogous to protocol levels)

  • tap / veth - L2 (i.e. tap devices allow user-space processing of raw ethernet frames)
  • tun (user-space processing of raw IP packets without the ethernet headers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment