Skip to main content

Module packet

Module packet 

Source
Expand description

SRT packet structure — draft-sharabayko-srt-01 §3 (Packet Structure).

Every SRT packet is the payload of one UDP datagram (§3, Figure 1). It starts with a 16-byte SRT header (Figure 2): a leading F bit distinguishes data packets (F=0, §3.1) from control packets (F=1, §3.2); the following two header words carry packet-type-specific fields, and the header always closes with a 32-bit Timestamp and a 32-bit Destination Socket ID.

This module is packet structure only — parse/serialize of the wire format. The handshake state machine (caller/listener/rendezvous exchange, §4.3), loss/ARQ handling, TSBPD, congestion control, and the actual AES key-wrap/unwrap crypto (§6) are explicit follow-ups; see the crate root docs.

Re-exports§

pub use ack::AckCif;
pub use ack::AckPacket;
pub use control::ControlPacket;
pub use control::ControlType;
pub use control::UserDefinedPacket;
pub use data::DataPacket;
pub use data::EncryptionKeyField;
pub use data::PacketPosition;
pub use handshake::EncryptionField;
pub use handshake::ExtensionType;
pub use handshake::GroupFlags;
pub use handshake::GroupMembershipExtension;
pub use handshake::GroupType;
pub use handshake::HandshakeExtensionBlock;
pub use handshake::HandshakeExtensionFlags;
pub use handshake::HandshakeExtensionMessageFlags;
pub use handshake::HandshakeExtensions;
pub use handshake::HandshakePacket;
pub use handshake::HandshakeType;
pub use handshake::HsExtMessage;
pub use key_material::Cipher;
pub use key_material::KeyMaterial;
pub use key_material::KmAuth;
pub use key_material::KmKeyFlag;
pub use key_material::StreamEncapsulation;
pub use misc::AckAckPacket;
pub use misc::CongestionWarningPacket;
pub use misc::DropReqPacket;
pub use misc::KeepAlivePacket;
pub use misc::PeerErrorPacket;
pub use misc::ShutdownPacket;
pub use nak::LossListEntry;
pub use nak::NakPacket;

Modules§

ack
ACK (Acknowledgment) control packet — draft-sharabayko-srt-01 §3.2.4, Figure 13.
control
SRT control packet dispatch — draft-sharabayko-srt-01 §3.2, Figure 4, Table 1.
data
SRT data packet — draft-sharabayko-srt-01 §3.1, Figure 3.
handshake
Handshake control packet — draft-sharabayko-srt-01 §3.2.1, Figure 5, and its extension messages: Handshake Extension Message (§3.2.1.1 / Figure 6, flags in §3.2.1.1.1 / Table 6), Key Material Extension (§3.2.1.2, content is a super::KeyMaterial — §3.2.2), Stream ID Extension (§3.2.1.3 / Figure 7), and Group Membership Extension (§3.2.1.4 / Figures 8-9).
key_material
Key Material message — draft-sharabayko-srt-01 §3.2.2, Figures 10-11.
misc
The CIF-less / single-scalar-CIF control packets: Keep-Alive (§3.2.3), Congestion Warning (§3.2.6), Shutdown (§3.2.7), ACKACK (§3.2.8), Message Drop Request (§3.2.9), and Peer Error (§3.2.10).
nak
NAK (Negative Acknowledgement / Loss Report) control packet — draft-sharabayko-srt-01 §3.2.5, Figure 14, and the loss-list coding of Appendix A.

Enums§

SrtPacket
A parsed SRT packet — the payload of one UDP datagram carrying SRT traffic (draft-sharabayko-srt-01 §3, Figure 1 / Figure 2).

Constants§

SRT_HEADER_LEN
Length in bytes of the fixed SRT header shared by data and control packets (draft-sharabayko-srt-01 §3, Figure 2): 4 header words = 16 bytes, before any packet-type-specific payload (data) or Control Information Field (control).