Expand description
SWIM direct and indirect liveness probe packets.
SWIM probes use standard NDN Interest/Data so they traverse the normal forwarding pipeline. The PIT handles rendezvous for indirect probes — no special routing is needed.
§Packet formats
Direct probe (node A → node B):
Interest: /ndn/local/nd/probe/direct/<B-name>/<nonce-u32>Indirect probe (node A asks node C to probe node B):
Interest: /ndn/local/nd/probe/via/<C-name>/<B-name>/<nonce-u32>Probe ACK (node B or C → node A via PIT reverse path):
Data: same name as the Interest
Content: empty (the ACK is the Data itself)§Usage pattern
- A detects B is
STALE; sendsbuild_direct_probe(b, nonce)on B’s face. - If no ACK within
probe_timeout, A sendsbuild_indirect_probe(c, b, nonce)for K randomly chosen intermediaries. - Only if all K indirect probes time out does A declare B
ABSENT.
The SWIM fanout K is set by DiscoveryConfig::swim_indirect_fanout.
K = 0 disables indirect probing entirely (use BackoffScheduler instead).
Structs§
- Direct
Probe - Parsed fields from a direct probe Interest.
- Indirect
Probe - Parsed fields from an indirect probe Interest.
Functions§
- build_
direct_ probe - Build a direct probe Interest.
- build_
indirect_ probe - Build an indirect probe Interest.
- build_
indirect_ probe_ encoded - Build an indirect probe with the length-prefix encoding.
- build_
probe_ ack - Build a probe ACK Data packet.
- is_
probe_ ack - Check whether the raw packet is a probe ACK Data (empty-content reply).
- parse_
direct_ probe - Parse a direct probe Interest name.
- parse_
indirect_ probe - Parse an indirect probe Interest name.