Module payload

Module payload 

Source
Expand description

HelloPayload — NDN neighbor discovery hello packet TLV codec.

Both EtherNeighborDiscovery and UdpNeighborDiscovery encode their Data Content using this shared format.

§Wire format

HelloPayload  ::= NODE-NAME TLV
                  (SERVED-PREFIX TLV)*
                  CAPABILITIES TLV?
                  (NEIGHBOR-DIFF TLV)*

NODE-NAME     ::= 0xC1 length Name
SERVED-PREFIX ::= 0xC2 length Name
CAPABILITIES  ::= 0xC3 length FLAGS-BYTE*
NEIGHBOR-DIFF ::= 0xC4 length (ADD-ENTRY | REMOVE-ENTRY)*
ADD-ENTRY     ::= 0xC5 length Name
REMOVE-ENTRY  ::= 0xC6 length Name

TLV types use the application-specific range (≥ 0xC0) to avoid collisions with NDN packet-level types.

§Hello Interest / Data names

Interest: /ndn/local/nd/hello/<nonce-u32>
Data:     /ndn/local/nd/hello/<nonce-u32>
          Content = HelloPayload TLV (this module)

The Interest carries no AppParams. The sender’s link-layer address is obtained from the socket (recv_with_source) and never embedded in the NDN packet.

Structs§

HelloPayload
Payload carried in the Content of a hello Data packet.
NeighborDiff
SWIM gossip piggyback carried in hello Data Content.

Enums§

DiffEntry
A single entry inside a NeighborDiff: add or remove a neighbor name.

Constants§

CAP_CONTENT_STORE
Capability flag: this node has an active content store.
CAP_FRAGMENTATION
Capability flag: this node can reassemble NDN fragments.
CAP_SVS
Capability flag: this node supports State Vector Sync (SVS).
CAP_VALIDATION
Capability flag: this node validates signatures on forwarded data.
T_ADD_ENTRY
ADD-ENTRY within a NEIGHBOR-DIFF: a newly discovered neighbor.
T_CAPABILITIES
CAPABILITIES TLV type: advisory capability flags byte.
T_NEIGHBOR_DIFF
NEIGHBOR-DIFF TLV type: SWIM gossip piggyback.
T_NODE_NAME
NODE-NAME TLV type: the sender’s NDN node name.
T_PUBLIC_KEY
PUBLIC-KEY TLV type: raw 32-byte Ed25519 public key for self-attesting signed hellos.
T_REMOVE_ENTRY
REMOVE-ENTRY within a NEIGHBOR-DIFF: a departed neighbor.
T_SERVED_PREFIX
SERVED-PREFIX TLV type: a prefix the sender can serve.
T_UNICAST_PORT
UNICAST-PORT TLV type: the sender’s UDP unicast listen port.