Skip to main content

Module protocol

Module protocol 

Source
Expand description

Protocol compatibility exports.

Runtime-agnostic wire codecs live under proto::protocol; this module keeps the existing public crate::protocol path stable.

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