package recordlayer

Import Path
	github.com/pion/dtls/v3/pkg/protocol/recordlayer (on go.dev)

Dependency Relation
	imports 7 packages, and imported by 3 packages

Involved Source Files Package recordlayer implements the TLS Record Layer https://tools.ietf.org/html/rfc5246#section-6 header.go inner_plaintext.go recordlayer.go
Package-Level Type Names (total 3)
/* sort by: | */
Header implements a TLS RecordLayer header. Optional Fields ContentLen uint16 ContentType protocol.ContentType Epoch uint16 // uint48 in spec Version protocol.Version Marshal encodes a TLS RecordLayer Header to binary. Size returns the total size of the header. Unmarshal populates a TLS RecordLayer Header from binary. *Header : github.com/pion/rtcp.PacketStatusChunk *Header : github.com/gogo/protobuf/proto.Marshaler *Header : github.com/gogo/protobuf/proto.Sizer *Header : github.com/gogo/protobuf/proto.Unmarshaler *Header : github.com/golang/protobuf/proto.Marshaler *Header : github.com/golang/protobuf/proto.Unmarshaler func github.com/pion/dtls/v3/pkg/crypto/ciphersuite.(*CBC).Decrypt(header Header, in []byte) ([]byte, error) func github.com/pion/dtls/v3/pkg/crypto/ciphersuite.(*CCM).Decrypt(header Header, in []byte) ([]byte, error) func github.com/pion/dtls/v3/pkg/crypto/ciphersuite.(*GCM).Decrypt(header Header, in []byte) ([]byte, error) func github.com/pion/dtls/v3.CipherSuite.Decrypt(h Header, in []byte) ([]byte, error) func github.com/pion/dtls/v3/internal/ciphersuite.(*AesCcm).Decrypt(h Header, raw []byte) ([]byte, error) func github.com/pion/dtls/v3/internal/ciphersuite.(*TLSEcdheEcdsaWithAes128GcmSha256).Decrypt(h Header, raw []byte) ([]byte, error) func github.com/pion/dtls/v3/internal/ciphersuite.(*TLSEcdheEcdsaWithAes256CbcSha).Decrypt(h Header, raw []byte) ([]byte, error) func github.com/pion/dtls/v3/internal/ciphersuite.(*TLSEcdhePskWithAes128CbcSha256).Decrypt(h Header, raw []byte) ([]byte, error) func github.com/pion/dtls/v3/internal/ciphersuite.(*TLSPskWithAes128CbcSha256).Decrypt(h Header, raw []byte) ([]byte, error)
InnerPlaintext implements DTLSInnerPlaintext https://datatracker.ietf.org/doc/html/rfc9146#name-record-layer-extensions Content []byte RealType protocol.ContentType Zeros uint Marshal encodes a DTLS InnerPlaintext to binary. Unmarshal populates a DTLS InnerPlaintext from binary. *InnerPlaintext : github.com/pion/rtcp.PacketStatusChunk *InnerPlaintext : github.com/gogo/protobuf/proto.Marshaler *InnerPlaintext : github.com/gogo/protobuf/proto.Unmarshaler *InnerPlaintext : github.com/golang/protobuf/proto.Marshaler *InnerPlaintext : github.com/golang/protobuf/proto.Unmarshaler
RecordLayer which handles all data transport. The record layer is assumed to sit directly on top of some reliable transport such as TCP. The record layer can carry four types of content: 1. Handshake messages—used for algorithm negotiation and key establishment. 2. ChangeCipherSpec messages—really part of the handshake but technically a separate kind of message. 3. Alert messages—used to signal that errors have occurred 4. Application layer data The DTLS record layer is extremely similar to that of TLS 1.1. The only change is the inclusion of an explicit sequence number in the record. This sequence number allows the recipient to correctly verify the TLS MAC. https://tools.ietf.org/html/rfc4347#section-4.1 Content protocol.Content Header Header Marshal encodes the RecordLayer to binary. Unmarshal populates the RecordLayer from binary. *RecordLayer : github.com/pion/rtcp.PacketStatusChunk *RecordLayer : github.com/gogo/protobuf/proto.Marshaler *RecordLayer : github.com/gogo/protobuf/proto.Unmarshaler *RecordLayer : github.com/golang/protobuf/proto.Marshaler *RecordLayer : github.com/golang/protobuf/proto.Unmarshaler func github.com/pion/dtls/v3/pkg/crypto/ciphersuite.(*CBC).Encrypt(pkt *RecordLayer, raw []byte) ([]byte, error) func github.com/pion/dtls/v3/pkg/crypto/ciphersuite.(*CCM).Encrypt(pkt *RecordLayer, raw []byte) ([]byte, error) func github.com/pion/dtls/v3/pkg/crypto/ciphersuite.(*GCM).Encrypt(pkt *RecordLayer, raw []byte) ([]byte, error) func github.com/pion/dtls/v3.CipherSuite.Encrypt(pkt *RecordLayer, raw []byte) ([]byte, error) func github.com/pion/dtls/v3/internal/ciphersuite.(*AesCcm).Encrypt(pkt *RecordLayer, raw []byte) ([]byte, error) func github.com/pion/dtls/v3/internal/ciphersuite.(*TLSEcdheEcdsaWithAes128GcmSha256).Encrypt(pkt *RecordLayer, raw []byte) ([]byte, error) func github.com/pion/dtls/v3/internal/ciphersuite.(*TLSEcdheEcdsaWithAes256CbcSha).Encrypt(pkt *RecordLayer, raw []byte) ([]byte, error) func github.com/pion/dtls/v3/internal/ciphersuite.(*TLSEcdhePskWithAes128CbcSha256).Encrypt(pkt *RecordLayer, raw []byte) ([]byte, error) func github.com/pion/dtls/v3/internal/ciphersuite.(*TLSPskWithAes128CbcSha256).Encrypt(pkt *RecordLayer, raw []byte) ([]byte, error)
Package-Level Functions (total 2)
ContentAwareUnpackDatagram is the same as UnpackDatagram but considers the presence of a connection identifier if the record is of content type tls12_cid.
UnpackDatagram extracts all RecordLayer messages from a single datagram. Note that as with TLS, multiple handshake messages may be placed in the same DTLS record, provided that there is room and that they are part of the same flight. Thus, there are two acceptable ways to pack two DTLS messages into the same datagram: in the same record or in separate records. https://tools.ietf.org/html/rfc6347#section-4.2.3
Package-Level Variables (only one)
ErrInvalidPacketLength is returned when the packet length too small or declared length do not match.
Package-Level Constants (total 2)
FixedHeaderSize is the size of a DTLS record header when connection IDs are not in use.
RecordLayer enums.