Module routes

Module routes 

Source
Expand description

Routes remembered between invocations.

The MAC learns a route from inbound traffic and keeps it in the peer registry, which lives exactly as long as the Mac does β€” and this tool builds a new one for every command. Without somewhere to put them, two manage calls a second apart each flood the mesh to discover the same path.

So each session hands its learned routes to a file, and the next one puts them back before it says anything. A route is a hint, not a promise: a stale one costs a single failed exchange, after which the MAC’s own ack-timeout retry rediscovers the path and overwrites it. That is why the file can be lost, truncated, or edited by hand without breaking anything.

StructsΒ§

RouteCache
Every route this tool remembers.
RouteRecord
One remembered route and when it was learned.

ConstantsΒ§

HEADER πŸ”’
The file’s first line, so a future format can be told apart from this one without guessing.
ROUTE_TTL
How long a remembered route is worth trying.

FunctionsΒ§

describe
How a route reads in a listing: what it does, not how it is encoded.
parse_line πŸ”’
parse_pairs πŸ”’
render_pairs πŸ”’
render_route πŸ”’
A route as one field of kind and its parameters: