Skip to main content

Module control

Module control 

Source
Expand description

SRT control packet dispatch — draft-sharabayko-srt-01 §3.2, Figure 4, Table 1.

word0  1|         Control Type (15)   |          Subtype (16)         |
word1                   Type-specific Information (32)
word2                          Timestamp (32)
word3                    Destination Socket ID (32)
rest                              CIF (variable, per Control Type)

Subtype is 0x0 for every Control Type in Table 1 except User-Defined Type (0x7FFF), where it carries SRT_CMD_KMREQ / SRT_CMD_KMRSP (Table 5) when the CIF is a Key Material message (§3.2.2). Subtype and the Type-specific Information word (where a given packet type does not use it) are validated as reserved-must-be-zero and are not stored in the typed per-type structs — see the crate root’s reserved-bit policy.

Structs§

UserDefinedPacket
A Control Type = User-Defined (0x7FFF) packet, or a Control Type not defined by Table 1. The CIF is genuinely opaque here — the only defined use is the Key Material message (§3.2.2) via Subtype SRT_CMD_KMREQ/SRT_CMD_KMRSP — see Self::as_key_material.

Enums§

ControlPacket
An SRT control packet (draft-sharabayko-srt-01 §3.2).
ControlType
The Control Type field (draft-sharabayko-srt-01 §3.2, Table 1) — 15 bits.

Constants§

CONTROL_TYPE_ACK
ACK (§3.2.4).
CONTROL_TYPE_ACKACK
ACKACK (§3.2.8).
CONTROL_TYPE_CONGESTION_WARNING
Congestion Warning (§3.2.6).
CONTROL_TYPE_DROPREQ
Message Drop Request (§3.2.9).
CONTROL_TYPE_HANDSHAKE
Control Type wire values (draft-sharabayko-srt-01 §3.2, Table 1).
CONTROL_TYPE_KEEPALIVE
Keep-Alive (§3.2.3).
CONTROL_TYPE_NAK
NAK / Loss Report (§3.2.5).
CONTROL_TYPE_PEERERROR
Peer Error (§3.2.10).
CONTROL_TYPE_SHUTDOWN
Shutdown (§3.2.7).
CONTROL_TYPE_USER_DEFINED
User-Defined Type (reserved value; also carries the Key Material message per §3.2.2 via Subtype SRT_CMD_KMREQ/SRT_CMD_KMRSP).