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§
- Protocol
Version - Specifications
- Record
Layer Header - 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_
VERSIO N1_ 0 - DTLS 1.0 as a
ProtocolVersion. - PROTOCOL_
VERSIO N1_ 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.