Files
lneto/errors.go
T
Pat Whittingslow 63f7870fe5 Add round-robin implementation (#66)
* add handler.encapsulateNode

* implement round robin handler approach

* simplify round robin implementation

* leave TODO

* internet.node touch up

* fix conflict resolve f-up

* replace certain ErrShortBuffer with ErrTruncatedFrame error
2026-04-09 09:36:17 -03:00

36 lines
1.5 KiB
Go

package lneto
type errGeneric uint8
// Generic errors common to internet functioning.
const (
_ errGeneric = iota // non-initialized err
ErrBug // lneto-bug(use build tag "debugheaplog")
ErrPacketDrop // packet dropped
ErrBadCRC // incorrect checksum
ErrZeroSource // zero source(port/addr)
ErrZeroDestination // zero destination(port/addr)
ErrShortBuffer // short buffer
ErrBufferFull // buffer full
ErrInvalidAddr // invalid address
ErrUnsupported // unsupported
ErrMismatch // mismatch
ErrMismatchLen // mismatched length
ErrInvalidConfig // invalid configuration
ErrInvalidField // invalid field
ErrInvalidLengthField // invalid length field
ErrExhausted // resource exhausted
ErrAlreadyRegistered // protocol already registered
ErrTruncatedFrame // truncated frame
// Below are potentially good future error additions
// based on one or two encountered use cases, example use case included.
/*
- ErrUnregistered/ErrAborted // connection unregistered. i.e: ICMP client aborted during active ping, ping process returns this.
*/
)
func (err errGeneric) Error() string {
return err.String()
}