Source File
error_cause_protocol_violation.go
Belonging Package
github.com/pion/sctp
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>// SPDX-License-Identifier: MITpackage sctpimport ()/*This error cause MAY be included in ABORT chunks that are sentbecause an SCTP endpoint detects a protocol violation of the peerthat is not covered by the error causes described in Section 3.3.10.1to Section 3.3.10.12. An implementation MAY provide additionalinformation specifying what kind of protocol violation has beendetected.0 1 2 30 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Cause Code=13 | Cause Length=Variable |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+/ Additional Information /\ \+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/type errorCauseProtocolViolation struct {errorCauseHeaderadditionalInformation []byte}// Abort chunk errors.var (ErrProtocolViolationUnmarshal = errors.New("unable to unmarshal Protocol Violation error"))func ( *errorCauseProtocolViolation) () ([]byte, error) {.raw = .additionalInformationreturn .errorCauseHeader.marshal()}func ( *errorCauseProtocolViolation) ( []byte) error {:= .errorCauseHeader.unmarshal()if != nil {return fmt.Errorf("%w: %v", ErrProtocolViolationUnmarshal, ) //nolint:errorlint}.additionalInformation = .rawreturn nil}// String makes errorCauseProtocolViolation printable.func ( *errorCauseProtocolViolation) () string {return fmt.Sprintf("%s: %s", .errorCauseHeader, .additionalInformation)}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |