The kernel docs, man pages, source files, and external designs this subsystem encodes or learns from. Cite specific sections in the source when interpretation is non-obvious.

Kernel UAPI headers (authoritative wire format)

Kernel documentation

Man pages

  • nft(8) — userspace tool reference; the grammar ~NFT parses is the one documented here.
  • libnftables(3) — official C library API; cross-reference for the JSON schema even though we don't use it.
  • libnftables-json(5) — JSON schema documentation; useful as a structural cross-reference for the AST shape.

Community references (wiki.nftables.org)

nftables source (grammar reference for ~NFT)

  • src/parser_bison.y — full bison grammar, ~6,594 lines, ~471 left-hand-side non-terminals. The reference for what ~NFT parses (subset) and emits.
  • src/scanner.l — flex lexer with 50+ start conditions; reference for Linx.NFT.Tokenizer's start-condition stack.
  • libnftnl — readable netlink-message construction reference (we don't link it, but it's the canonical implementation of the wire format).

HEEx implementation (model for ~NFT)

Production-shape references

Adjacent userspace tooling

  • nft (the CLI) — userspace tool; everything Linx.Netfilter does could alternatively be done via nft. We don't shell to it; the point of Linx is to be the in-Elixir equivalent.
  • google/nftables (Go) — pure-Go reimplementation of libnftnl. Closest precedent for what we're building. ~15 kloc; informative for sizing the codec milestones.
  • nftnl-rs / nftables-rs (Rust) — low-level netlink and JSON-shim respectively.
  • nftables on hex.pm — pre-existing Elixir wrapper (libnftables JSON via a Zig port); different architecture from Linx, but useful prior art to know about.

In-repo cross-references

  • Linx.NetlinkLinx.Netlink.Rtnl's codec DSL + socket plumbing; Linx.Netlink.Nfnl mirrors the family-specific parts for netfilter.
  • Linx.Seccomp — the value-type-with-codec precedent (%Linx.Seccomp.Filter{} is the small-scale version of what %Linx.Netfilter.Ruleset{} is at large scale).
  • Linx.Process — the checkpoint composition story; every cross-namespace verb (Mount, User, Capabilities, Seccomp, Sysctl, Netfilter) hooks in the same way.
  • Linx.Sysctl — the most recent "build a subsystem from scratch" template; Netfilter's milestone shape borrows from it.