Skip to main content

Module control

Module control 

Source
Expand description

Control-plane messages exchanged with the coordinator.

Peers register with the coordinator, ask it to match them into a cohort, then keep the registration alive with heartbeats until they either rotate to a new cohort or disconnect. Each of those steps is represented by one struct in this module; ControlMessage is the tagged sum that travels inside crate::frame::Frame::Control.

Per the project threat model the coordinator is semi-trusted: it is authenticated and rate-limited, but it never sees plaintext tunnel payloads. Every shape here is therefore part of the public, signed control plane and intentionally carries no secret material — the one apparent exception, RegisterAck::session_token, holds a PASETO v4 token that is itself self-contained and verifiable.

All timestamps use Timestamp, which round-trips through RFC 3339 on the wire (see bibeam_core::time).

Structs§

Disconnect
Voluntary disconnect notification.
Heartbeat
Peer-to-coordinator keep-alive.
MatchRequest
Peer-initiated request to be matched into a cohort.
MultiHopAssignment
Multi-hop match: client routes through a chain of forwarders to an exit (R-MULTIHOP-PROTO).
Register
Initial registration message a peer sends to the coordinator.
RegisterAck
Coordinator’s acknowledgement of a successful Register.
SingleHopMatch
Single-hop match: cohort + canonical exit set + rotation deadline.

Enums§

ControlMessage
Tagged sum of every control-plane message.
MatchResponse
Coordinator’s response to a MatchRequest.