Skip to main content

Crate ntkd

Crate ntkd 

Source
Expand description

ntkd: the Netsukuku routing daemon. Composition root wiring the eleven ntk-* library crates into a running node; see research/notes/02-vala-services-daemon.md §5 for the upstream daemon this replaces.

A library target (with src/main.rs as a thin fn main shim over it) exists so integration tests can use ntkd::... directly instead of re-including source files with #[path] — the previous approach compiled kernel/node as an entirely separate crate per test binary, which made every test-only accessor (e.g. kernel::routes::RouteInstaller::kernel_ref) look dead to cargo clippy’s per-crate dead-code analysis when only the bin target was checked.

Modules§

kernel
The half of ntkd that talks to the machine: parsing the on-disk config file, probing the running kernel’s routing capabilities, and translating QSPN’s routing decisions into netlink state. Its sibling, crate::node, is the protocol composition half (spawning and wiring the ntk-* actor crates together); kernel knows nothing about RPC, arcs, or peer discovery — it only knows NIP↔IPv4 addressing, ntk_common::Topology, and ntk_netlink.
node
The ntkd node composition: CLI, supervisor, transport wiring, and steady-state loop.