| 1 |
// SPDX-FileCopyrightText: 2026 The Pion community <https://pion.ly> |
| 2 |
// SPDX-License-Identifier: MIT |
| 3 |
|
| 4 |
package sctp |
| 5 |
|
| 6 |
import ( |
| 7 |
"errors" |
| 8 |
) |
| 9 |
|
| 10 |
var ( |
| 11 |
errNilNetConn = errors.New("netConn must not be nil") |
| 12 |
errNilLoggerFactory = errors.New("loggerFactory must not be nil") |
| 13 |
|
| 14 |
// errZeroMTUOption indicates that the MTU option was set to zero. |
| 15 |
errZeroMTUOption = errors.New("MTU option cannot be set to zero") |
| 16 |
|
| 17 |
// errMTUTooSmallOption indicates that the MTU cannot fit SCTP DATA and I-DATA headers plus padding. |
| 18 |
errMTUTooSmallOption = errors.New("MTU option is too small") |
| 19 |
|
| 20 |
// errZeroMaxReceiveBufferOption indicates that the MTU option was set to zero. |
| 21 |
errZeroMaxReceiveBufferOption = errors.New("MaxReceiveBuffer option cannot be set to zero") |
| 22 |
|
| 23 |
// errZeroMaxMessageSize indicates that the MTU option was set to zero. |
| 24 |
errZeroMaxMessageSize = errors.New("MaxMessageSize option cannot be set to zero") |
| 25 |
|
| 26 |
// errInvalidRTOMax indicates that the RTO max was set to 0 or a negative value. |
| 27 |
errInvalidRTOMax = errors.New("RTO max was set to <= 0") |
| 28 |
|
| 29 |
// errInvalidRackMinRTTWnd indicates the length of the local minimum window used to determine the |
| 30 |
// minRTT was set to <= 0. |
| 31 |
errInvalidRackMinRTTWnd = errors.New("RackMinRTT was set to <= 0") |
| 32 |
|
| 33 |
// errInvalidRackReoWndFloor indicates the length of the RACK reordering window floor was set to < 0. |
| 34 |
errInvalidRackReoWndFloor = errors.New("RackReoWndFloor was set to < 0") |
| 35 |
|
| 36 |
// errInvalidRackWcDelAck indicates the receiver worst-case delayed-ACK for PTO when only 1 packet in flight |
| 37 |
// was set to < 0. |
| 38 |
errInvalidRackWcDelAck = errors.New("RackWcDelAck was set to <= 0") |
| 39 |
|
| 40 |
// errInvalidSnapToken indicates a SNAP token that is not parseable. |
| 41 |
errInvalidSnapToken = errors.New("SNAP token is invalid") |
| 42 |
|
| 43 |
// errNilStreamScheduler indicates that a nil stream scheduler factory was configured. |
| 44 |
errNilStreamScheduler = errors.New("stream scheduler must not be nil") |
| 45 |
|
| 46 |
// errInvalidStreamSchedulerWeight indicates a stream scheduler weight was set to zero. |
| 47 |
errInvalidStreamSchedulerWeight = errors.New("stream scheduler weight must be > 0") |
| 48 |
) |