Module epidemic

Module epidemic 

Source
Expand description

EpidemicGossip — pull-gossip for neighbor state dissemination.

Each node publishes a neighbor state snapshot under /ndn/local/nd/gossip/<node-name>/<seq> and subscribes to its peers’ snapshots by expressing prefix Interests (CanBePrefix=true) for /ndn/local/nd/gossip/.

§Wire format — gossip record payload

The Data Content is a sequence of concatenated Name TLVs, one per established-or-stale neighbor:

GossipRecord ::= (Name TLV)*

This is intentionally minimal — gossip records carry name hints for nodes that should be probed; the receiver creates Probing state entries and the normal hello state machine confirms them. No RTT or face-ID metadata is included (link-local face IDs have no meaning to remote peers).

§Operation

  • on_tick: every gossip_interval ticks, express a fresh prefix Interest for each established peer’s gossip prefix and publish a local snapshot when the local sequence number has advanced.
  • on_inbound for Interest: respond with the latest local gossip Data.
  • on_inbound for Data: decode the neighbor name list and add any unknown names as Probing entries to the neighbor table.

Structs§

EpidemicGossip
Pull-gossip protocol for neighbor state dissemination.