Creates an empty routing table for a node at address.
capacity is how many routes to make room for, defaulting to
[ROUTING_DEFAULT_CAPACITY]. A capacity of zero floods every unknown
destination, which is the behavior with no table at all.
Optionalcapacity: number | nullThe address this router answers for.
How many routes the table can hold.
Whether the table has learned nothing yet.
How many routes the table currently holds.
Returns what the known route to dst costs, or null when none is known.
Forgets the route to dst, for example after it stops answering.
Returns the neighbor to send a packet to on the way to dst, or null.
Learns a route from a packet that arrived.
When a packet from origin comes in through neighbor via at cost,
that neighbor is the way back. Returns whether the table changed.
Returns the whole route to dst, or null when none is known.
Lists the routes the table holds, each once, in the order the table holds them rather than sorted by destination or cost.
One node routing table, learned from the traffic the node hears.