Skip to content

Instantly share code, notes, and snippets.

@eenblam
Last active April 25, 2024 10:25
Show Gist options
  • Star 26 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save eenblam/2e610de9dd089188b354595f10f99823 to your computer and use it in GitHub Desktop.
Save eenblam/2e610de9dd089188b354595f10f99823 to your computer and use it in GitHub Desktop.
Linux Networking Reading List

Linux Networking Reading List

Currently in no particular order. Most of these are kind of ancient.

Where's all the modern documentation? So much of what I've turned up searching is other folks complaining about having few options beyond reading source code.

The OREILLY books, while dated, seem to be some of the best available. Note that these can be read with a 7-day trial. Do this! At least get through the introduction section and first chapter of each to see if it's what you're after.

https://www.netfilter.org/

BOOK OREILLY Understanding Linux Network Internals

  • Doesn't really cover netfilter???

PAPER Linux Advanced Routing & Traffic Control HOWTO

Sergey's netreads:

WIKI Generic Netlink by Example focuses on targeting Generic Netlink from within the kernel, not from user-space.

SLIDES A Map of the Networking Code in Linux Kernel 2.4.20

PAPER Linux Network Stack Walkthrough (2.4.20)

Q&A's

This Quora has some good diagrams in the responses. https://www.quora.com/What-is-the-best-way-resource-to-learn-Linux-networking-concepts-and-practices-like-open-source-training-manuals-and-hand-outs

Netlink

See Rosen's Linux Kernel Networking.

I'd like to answer this question: https://stackoverflow.com/questions/18541517/live-socket-monitoring-with-netlink-inet-diag

These weren't sufficient:

See also:

Source code

Netfilter: https://github.com/torvalds/linux/tree/db54615e21419c3cb4d699a0b0aa16cc44d0e9da/net/netfilterGo

ss, from iproute2: https://github.com/shemminger/iproute2/blob/master/misc/ss.c

  • This should provide an example of monitoring via NETLINK+INET_DIAG sockets.

Making it work in Go/Python

https://github.com/mdlayher/netlink

https://godoc.org/github.com/ti-mo/conntrack

https://github.com/svinota/pyroute2/blob/master/pyroute2/netlink/

@ani-bxd
Copy link

ani-bxd commented Oct 2, 2023

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment