Module ether

Module ether 

Source
Expand description

EtherNeighborDiscovery — NDN neighbor discovery over raw Ethernet.

Implements DiscoveryProtocol using periodic hello Interest broadcasts on a [MulticastEtherFace] and unicast NamedEtherFace creation per peer.

§Protocol (doc format)

Hello Interest (broadcast on multicast face):

Name: /ndn/local/nd/hello/<nonce-u32>
(no AppParams)

Hello Data (reply sent back on multicast face):

Name:    /ndn/local/nd/hello/<nonce-u32>
Content: HelloPayload TLV
  NODE-NAME     = /ndn/site/mynode
  SERVED-PREFIX = ...        (optional, InHello mode)
  CAPABILITIES  = [flags]    (optional)
  NEIGHBOR-DIFF = [...]      (SWIM gossip piggyback, optional)

The sender’s MAC is extracted from meta.source (populated by the engine via MulticastEtherFace::recv_with_source), not from the packet payload.

On receiving a Hello Interest a node:

  1. Reads the sender MAC from meta.source (LinkAddr::Ether).
  2. Triggers PassiveDetection on the strategy when the MAC is new.
  3. Replies with a Hello Data carrying its own HelloPayload.

On receiving a Hello Data the sender:

  1. Decodes HelloPayload from Content.
  2. Reads responder MAC from meta.source.
  3. Creates a NamedEtherFace to the responder if needed.
  4. Updates the neighbor to Established and records RTT.
  5. Installs FIB routes for served_prefixes (if InHello mode).
  6. Applies any piggybacked NEIGHBOR-DIFF entries.

Structs§

EtherMedium
Ethernet-specific link medium for HelloProtocol.
EtherNeighborDiscovery
Ethernet neighbor discovery — newtype wrapper around HelloProtocol<EtherMedium>.