Skip to main content

Module record_layer_header

Module record_layer_header 

Source
Expand description

The record header: content type, version, epoch and sequence number. The DTLS record header.

Thirteen bytes: content type, protocol version, a 16-bit epoch, a 48-bit sequence number, and the body length. The epoch is what DTLS adds over TLS here — it increments on every ChangeCipherSpec, so records protected with the old and new keys can be told apart while a rekey is in flight.

The sequence number is 48 bits on the wire but held as a u64; MAX_SEQUENCE_NUMBER is the largest value that fits.

Structs§

ProtocolVersion
Specifications
RecordLayerHeader
The header on every DTLS record.

Constants§

DTLS1_0MAJOR
Major version byte for DTLS 1.0.
DTLS1_0MINOR
Minor version byte for DTLS 1.0.
DTLS1_2MAJOR
Major version byte for DTLS 1.2.
DTLS1_2MINOR
Minor version byte for DTLS 1.2.
MAX_SEQUENCE_NUMBER
The largest sequence number the 48-bit field can hold.
PROTOCOL_VERSION1_0
DTLS 1.0 as a ProtocolVersion.
PROTOCOL_VERSION1_2
DTLS 1.2 as a ProtocolVersion.
RECORD_LAYER_HEADER_SIZE
Length of the DTLS record header in bytes.
VERSION_DTLS12
DTLS 1.2 as a single 16-bit value.