routing.py- Purpose: Registry of mesh routing protocols. Exactly one is active per scenario, selected with
[Routing] protocol = 'olsrd' | 'babel' | 'none'inconfig.toml(none= netem shaping only, no daemon). - Usage:
get_protocol(name)returns theRoutingProtocolentry,Nonefor'none', and raises on unknown names so config errors surface at load time.- Each
RoutingProtocoldeclares its firewall binary, dedicated chain (VSNES_OLSR,VSNES_BABEL), how out-of-LOS peers are dropped (src_ipfor OLSR,src_macfor babel’s IPv6 link-local hellos), the gated UDP port (698 / 6696), and therouting-ctlstart/stop commands. - Its methods build the shell lines that set up/tear down the chain, add/remove per-peer DROP rules, and start/stop the daemon;
Channel.pybatches them into onedocker execper node. - To add a protocol, add one entry to
PROTOCOLS(plusrouting-ctlsupport in the node image) — see the module docstring, “Adding a routing protocol”.
- Related Files:
- Used by
Scenario.py(validates the protocol at load) andChannel.py(applies the gating and manages the daemon lifecycle).
- Used by
- Purpose: Registry of mesh routing protocols. Exactly one is active per scenario, selected with