rtciv0.5.0

rtci-sctp

Sans-I/O SCTP (RFC 9260) with partial reliability and stream reconfiguration, for WebRTC data channels. 1 public module, 39 items at 0.5.0.

README

SCTP as WebRTC data channels use it: associations over DTLS, ordered and unordered streams, partial reliability, stream reconfiguration, stream schedulers, congestion and flow control, path MTU handling and the association lifecycle.

Specifications

  • RFC 9260, Stream Control Transmission Protocol
  • RFC 3758 and RFC 7496, partial reliability and its policies
  • RFC 6525, stream reconfiguration
  • RFC 8260, user message interleaving (I-DATA and I-FORWARD-TSN, negotiated when both sides announce it) and stream schedulers
  • RFC 8261, SCTP over DTLS

Clause-by-clause status, with the test that proves each clause: rfc9260, rfc3758, rfc7496, rfc6525, rfc8260, rfc8261.

Use

Endpoint accepts and opens associations; an Association carries the streams. The root crate (rtci) runs one association per peer connection under its data channels (rtci-datachannel).

Sans-I/O

A deterministic state machine: feed it datagrams and time, poll it for datagrams, timeouts and events. The crate does no I/O and reads no clock: every call that depends on time takes an Instant from the caller.

Licence

Licensed under either of the MIT licence or the Apache License, Version 2.0, at your option.

This crate is part of the rtci workspace, which descends from webrtc-rs/rtc and is developed independently; FORK.md lists what it carries over upstream. Upstream's licence and copyright notices are retained.

rtci_sctp

SCTP for the Sans-I/O WebRTC stack.

  • structAssociationfrom crate::association::AssociationAssociation represents an SCTP association
  • structAssociationEventfrom crate::shared::AssociationEventEvents sent from an Endpoint to an Association
  • structAssociationHandlefrom crate::endpoint::AssociationHandleInternal identifier for an Association currently associated with an endpoint
  • structAssociationStatsfrom crate::association::stats::AssociationStatsAssociation statistics
  • structAssociationStatusfrom crate::association::AssociationStatusWhat Association::status reports (RFC 9260 11.1.8).
  • structChunkfrom crate::queue::reassembly_queue::ChunkA chunk of data from the stream
  • structChunkPayloadDatafrom crate::chunk::chunk_payload_data::ChunkPayloadDataChunkPayloadData represents an SCTP Chunk of type DATA
  • structChunksfrom crate::queue::reassembly_queue::ChunksChunks is a set of chunks that share the same SSN
  • structClientConfigfrom crate::config::ClientConfigConfiguration for outgoing associations
  • structEndpointfrom crate::endpoint::EndpointThe main entry point to the library
  • structEndpointConfigfrom crate::config::EndpointConfigGlobal configuration for the endpoint, affecting all associations
  • structEndpointEventfrom crate::shared::EndpointEventEvents sent from an Association to an Endpoint
  • structErrorCauseCodefrom crate::chunk::ErrorCauseCodeErrorCauseCode is a cause code that appears in either a ERROR or ABORT chunk
  • structMessagePartfrom crate::queue::reassembly_queue::MessagePartPart of a message, read with Stream::read_part: the partial delivery API of RFC 9260 section 6.9 (the RECEIVE primitive's "partial flag", section 11.1.7; MSG_EOR of RFC 6458 section 3.1.4).
  • structPathMtuDiscoveryConfigfrom crate::association::pmtud::PathMtuDiscoveryConfigSettings of the path MTU discovery (RFC 8899 sections 5.1.1 and 5.1.2), in SCTP packet bytes (common header and chunks).
  • structRtoConfigfrom crate::association::timer::RtoConfigRTO.Initial, RTO.Min and RTO.Max (RFC 9260 section 16), the bounds of the retransmission timeout. Default is the RFC's recommended values: 1, 1 and 60 seconds.
  • structServerConfigfrom crate::config::ServerConfigParameters governing incoming associations
  • structStreamfrom crate::association::stream::StreamStream represents an SCTP stream
  • structStreamStatefrom crate::association::stream::StreamStateStreamState represents the state of an SCTP stream
  • structTimerConfigfrom crate::association::timer::TimerConfigRetransmission limits for the association's timers.
  • structTransportConfigfrom crate::config::TransportConfigConfig collects the arguments to create_association construction into a single structure
  • structUndeliveredMessagefrom crate::association::undelivered::UndeliveredMessageA user message an association did not deliver, handed back by Association::take_undelivered_messages once the association ended.
  • enumAssociationErrorfrom crate::association::AssociationErrorReasons why an association might be lost
  • enumConnectErrorfrom crate::endpoint::ConnectErrorErrors in the parameters being used to create a new association
  • enumDatagramEventfrom crate::endpoint::DatagramEventEvent resulting from processing a single datagram
  • enumEventfrom crate::association::EventEvents of interest to the application
  • enumPathMtuStatefrom crate::association::pmtud::PathMtuStateThe phase of the discovery (RFC 8899 section 5.2).
  • enumPayloadPayload in Incoming/outgoing Transmit
  • enumPayloadProtocolIdentifierfrom crate::chunk::chunk_payload_data::PayloadProtocolIdentifierPayloadProtocolIdentifier is an enum for DataChannel payload types PayloadProtocolIdentifier enums <https://www.iana.org/assignments/sctp-parameters/sctp-parameters.xhtml#sctp-parameters-25>
  • enumReliabilityTypefrom crate::association::stream::ReliabilityTypeReliability type for stream
  • enumSideWhether an endpoint was the initiator of an association
  • enumStreamEventfrom crate::association::stream::StreamEventApplication events about streams
  • enumStreamSchedulerfrom crate::config::StreamSchedulerHow an association picks the stream whose data it sends next: the stream schedulers of RFC 8260 section 3.
  • enumUndeliveredModefrom crate::association::undelivered::UndeliveredModeWhether any of an undelivered message left this side (RFC 9260 11.2.2, "mode").
  • fnmax_payload_size_for_mtufrom crate::config::max_payload_size_for_mtuDerive an EndpointConfig::max_payload_size value from an outbound DATA-packet budget: the largest DATA packet (common header plus bundled DATA chunks) associations may emit, in bytes. Control packets (INIT, INIT ACK, SACK, RECONFIG, FORWARD TSN, shutdown) marshal without consulting this value.
  • typeAssociationIdfrom crate::shared::AssociationIdProtocol-level identifier for an Association.
  • typeStreamIdfrom crate::association::stream::StreamIdIdentifier for a stream within a particular association
  • constMIN_DATA_PACKET_MTUfrom crate::config::MIN_DATA_PACKET_MTUFloor for max_payload_size_for_mtu: the smallest representable padded DATA packet — the 12-byte common header, the 16-byte DATA chunk header, and a 1..=4-byte payload padded to the 4-byte chunk boundary.
  • useReconfigEventfrom crate::association::ReconfigEventThe outcome of a stream re-configuration (RFC 6525 section 6.1 describes these as socket events).

Generated from the sources of rtci-sctp 0.5.0 at its release tag. Items made by macros and methods are on docs.rs.