Skip to main content

Crate gbp_stack

Crate gbp_stack 

Source
Expand description

Top-level facade for the Group Protocol Stack.

Most users should depend on this single crate; the layered architecture is an implementation detail that is exposed for users who only need a subset of the stack.

§Layers

  ┌────────────────────────────────────────────────────────┐
  │  Layer 4 — orchestration                               │
  │      gbp-node  →  gbp-stack  →  gbp-stack-ffi          │
  ├────────────────────────────────────────────────────────┤
  │  Layer 3 — security & transport                        │
  │      gbp-mls  ·  gbp-transport  ·  gbp-sframe          │
  ├────────────────────────────────────────────────────────┤
  │  Layer 2 — sub-protocols on top of GBP                 │
  │      gtp-protocol · gap-protocol · gsp-protocol        │
  ├────────────────────────────────────────────────────────┤
  │  Layer 1 — base protocol                               │
  │      gbp-protocol (GbpFrame, ControlMessage, …)        │
  ├────────────────────────────────────────────────────────┤
  │  Layer 0 — vocabulary                                  │
  │      gbp-core (StreamType, Flags, FSM, codes)          │
  └────────────────────────────────────────────────────────┘

Re-exports§

pub use gap;
pub use gbp;
pub use gbp_core as core;
pub use gbp_mls as mls;
pub use gbp_node as node;
pub use gbp_transport as transport;
pub use gsp;
pub use gtp;
pub use gbp_sframe;

Modules§

codes
All canonical error codes.
timeouts
Timeout defaults normative for interoperable deployments (gbp-state-machine §6).

Structs§

BoundedSeen
A set with a bounded capacity that evicts the oldest entry on overflow.
CapabilitiesNegotiator
Per-member set of advertised capability tokens.
ControlMessage
Control plane message that travels on Stream 0.
DeliveredPayload
Information about a payload delivered by GBP to a sub-protocol.
ErrorObject
Wire-serialisable error object.
GapClient
Stateful GAP client.
GapPayload
Audio frame payload.
GbpFlags
Bit set on top of u16. Hand-rolled to keep gbp-core free of any dependency tree.
GbpFrame
CBOR-encoded GBP frame.
GroupNode
GBP-layer node.
GspAccept
Accepted signal: decoded fields plus the local state effects already applied by the client.
GspClient
Stateful GSP client.
GspSignal
GSP signal envelope. args carries opcode-specific CBOR bytes.
GtpClient
Stateful GTP client.
GtpMessage
GTP message envelope. Eight CBOR keys.
MlsContext
MLS context for a single group member.
OutboundFrame
A wire-ready outbound frame: the recipient and its serialised CBOR bytes.
SFrameDecryptor
Multi-sender SFrame decryptor for one epoch.
SFrameEncryptor
Stateful per-sender SFrame encryptor.
SFrameHeader
SFrame Key ID helper, backed by sframe’s MlsKeyId (RFC 9605 §5.2).
SFrameSession
An SFrame session bound to one MLS epoch.

Enums§

CipherSuite
SFrame ciphersuite selection.
ControlOpcode
Control plane opcode. Width: u16.
ErrorClass
Coarse classification of an error. Single byte on the wire.
Event
Events surfaced by the GBP layer.
GapAccept
Outcome of accepting a GAP payload.
GapError
Errors returned by GapClient.
GspError
Errors returned by GspClient.
GtpAccept
Outcome of accepting a GTP payload.
GtpError
Errors returned by GtpClient.
NodeError
Errors raised by GroupNode.
NodeState
Group node FSM.
PayloadCodec
Codec used to encode the sub-protocol payload inside a GbpFrame.
ProcessedKind
Categorises an MLS message processed via MlsContext::process_message.
SFrameError
Errors that can occur in the SFrame layer.
SignalType
Signal opcode. Allocation: 1xx — membership, 2xx — media permissions, 3xx — stream, 4xx — config.
StreamLabel
Exporter label that binds the AEAD key to a stream class.
StreamType
Stream class. Each StreamType is a separate sub-protocol with its own delivery and reliability policy (see the GBP interop profile).
TransitionState
Epoch transition FSM.
WireError
Errors raised by the transport layer.

Constants§

MAX_FRAME
Maximum size of a single on-the-wire message (1 MiB).

Traits§

Sealer
Trait abstracting the AEAD seal / open operations.

Functions§

label_for
Maps a StreamType to the corresponding StreamLabel.
read_blob
Reads an opaque length-prefixed blob.
read_frame
Reads a GbpFrame using length-prefix + CBOR framing.
write_blob
Writes an opaque length-prefixed blob (e.g. a serialised MLS Welcome or KeyPackage).
write_frame
Writes a GbpFrame using CBOR + length-prefix framing.

Type Aliases§

GroupId
Group identifier. On the wire, a 16-byte big-endian unsigned integer.
MemberId
Application-level group member identifier.