Skip to main content

Module protocol

Module protocol 

Source
Expand description

FIPS Protocol Messages

Wire format definitions for FIPS protocol communication across two layers:

Messages exchanged between directly connected peers over Noise-encrypted links. Includes spanning tree gossip, bloom filter propagation, discovery protocol, and forwarding of session-layer datagrams.

Link-layer peer authentication uses Noise IK (see noise.rs), which establishes the encrypted channel before any of these messages are sent.

§Session Layer (end-to-end, between FIPS addresses)

Messages exchanged between source and destination FIPS nodes, encrypted with session keys that intermediate nodes cannot read. Includes session establishment, IPv6 datagram encapsulation, and routing errors.

Session-layer datagrams are carried as opaque payloads through the link layer, encrypted end-to-end independently of per-hop link encryption.

Structs§

CoordsRequired
Link-layer error signal indicating router cache miss.
Disconnect
Orderly disconnect notification sent before closing a peer link.
FilterAnnounce
Bloom filter announcement for reachability propagation.
FspFlags
FSP common prefix flags (cleartext, in outer header).
FspInnerFlags
FSP inner header flags (encrypted, inside AEAD envelope).
LookupRequest
Request to discover a node’s coordinates.
LookupResponse
Response to a lookup request with target’s coordinates.
MtuExceeded
Error indicating a forwarded packet exceeded the next-hop transport MTU.
PathBroken
Error indicating routing failure (local minimum or unreachable).
PathMtuNotification
Path MTU notification (msg_type 0x13).
SessionAck
Session acknowledgement.
SessionDatagram
Encapsulated session-layer datagram for multi-hop forwarding.
SessionDatagramRef
Zero-copy view over a SessionDatagram. The inner payload is a borrowed slice into the caller’s buffer — no allocation, no memcpy.
SessionFlags
Session flags for setup options.
SessionMsg3
XK handshake message 3 (initiator -> responder).
SessionReceiverReport
Session-layer receiver report (msg_type 0x12).
SessionSenderReport
Session-layer sender report (msg_type 0x11).
SessionSetup
Session setup to establish cached coordinate state.
TreeAnnounce
Spanning tree announcement carrying parent declaration and ancestry.

Enums§

DisconnectReason
Reason for an orderly disconnect notification.
HandshakeMessageType
Handshake message type identifiers.
LinkMessageType
Link-layer message type identifiers.
ProtocolError
Errors related to protocol message handling.
SessionMessageType
SessionDatagram payload message type identifiers.

Constants§

COORDS_REQUIRED_SIZE
Wire size of CoordsRequired payload: msg_type(1) + flags(1) + dest_addr(16) + reporter(16).
MTU_EXCEEDED_SIZE
Wire size of MtuExceeded payload: msg_type(1) + flags(1) + dest_addr(16) + reporter(16) + mtu(2).
PATH_MTU_NOTIFICATION_SIZE
Body size for PathMtuNotification.
PROTOCOL_VERSION
Protocol version for message compatibility.
SESSION_DATAGRAM_HEADER_SIZE
SessionDatagram fixed header size: msg_type(1) + ttl(1) + path_mtu(2) + src_addr(16) + dest_addr(16).
SESSION_RECEIVER_REPORT_SIZE
Body size for SessionReceiverReport: 2 reserved + 64 fields.
SESSION_SENDER_REPORT_SIZE
Body size for SessionSenderReport: 2 reserved + 44 fields.

Type Aliases§

MessageTypeDeprecated