github.com/pion/dtls/v2@v2.2.12/pkg/protocol/recordlayer/errors.go (about) 1 // SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> 2 // SPDX-License-Identifier: MIT 3 4 // Package recordlayer implements the TLS Record Layer https://tools.ietf.org/html/rfc5246#section-6 5 package recordlayer 6 7 import ( 8 "errors" 9 10 "github.com/pion/dtls/v2/pkg/protocol" 11 ) 12 13 var ( 14 // ErrInvalidPacketLength is returned when the packet length too small or declared length do not match 15 ErrInvalidPacketLength = &protocol.TemporaryError{Err: errors.New("packet length and declared length do not match")} //nolint:goerr113 16 17 errBufferTooSmall = &protocol.TemporaryError{Err: errors.New("buffer is too small")} //nolint:goerr113 18 errSequenceNumberOverflow = &protocol.InternalError{Err: errors.New("sequence number overflow")} //nolint:goerr113 19 errUnsupportedProtocolVersion = &protocol.FatalError{Err: errors.New("unsupported protocol version")} //nolint:goerr113 20 errInvalidContentType = &protocol.TemporaryError{Err: errors.New("invalid content type")} //nolint:goerr113 21 )