Expand description
The C ABI for cost-aware mesh routing.
These functions wrap [pamoja_routing] for callers that reach the SDK through
the flat C boundary: a table that learns the way to a node from the traffic it
already hears, and the per-packet decision of whether to deliver, relay, or
fall back to flooding.
A router holds state across calls, so it crosses as an opaque handle. Its table
is sized when it is built rather than by the const generic the Rust crate uses,
since a const generic cannot cross a C ABI at all;
PAMOJA_ROUTING_DEFAULT_CAPACITY is what a caller with no reason to choose
should pass.
Structs§
- Pamoja
Route - A learned way to reach one node.
- Pamoja
Router - An opaque handle to one node routing table.
Enums§
- Pamoja
Forward - What to do with a packet bound for a given node.
Constants§
- PAMOJA_
ROUTING_ DEFAULT_ CAPACITY - A reasonable routing table size for a caller with no reason to choose one.
Functions§
- pamoja_
router_ ⚠address - Returns the address a router answers for.
- pamoja_
router_ ⚠capacity - Returns how many routes a table can hold.
- pamoja_
router_ ⚠cost - Returns what the known route to a node costs.
- pamoja_
router_ ⚠forget - Forgets the route to a node, for example after it stops answering.
- pamoja_
router_ ⚠forward - Decides what to do with a packet bound for a node.
- pamoja_
router_ ⚠free - Releases a routing table handle.
- pamoja_
router_ ⚠len - Returns how many routes a table currently holds.
- pamoja_
router_ new - Creates an empty routing table for a node.
- pamoja_
router_ ⚠next_ hop - Returns the neighbour to send a packet to on the way to a node.
- pamoja_
router_ ⚠observe - Learns a route from a packet that arrived.
- pamoja_
router_ ⚠route - Returns the whole route to a node.