mirror of
https://github.com/soypat/lneto.git
synced 2026-08-25 17:09:05 +00:00
Error rewrites (#43)
* pcap: reuse Frame memory * slog: reduce heap allocations of addresses; also prevent heap alloc of dhcp options in pcap * dns: heapless improvement; add StackAsync buffer for more heapless operation; start thinking of errors * errors: begin standardise errors in lneto * errors: finish standardization of errors * fix merge issues * add more lneto errors to rest of package * format errors.go
This commit is contained in:
@@ -93,7 +93,7 @@ func (h *handlers) prepAdd() error {
|
||||
if h.full() {
|
||||
h.compact()
|
||||
if h.full() {
|
||||
return errNodesFull
|
||||
return lneto.ErrBufferFull
|
||||
}
|
||||
}
|
||||
return nil
|
||||
@@ -200,11 +200,7 @@ func (h *handlers) encapsulateAny(buf []byte, offsetIP, offsetThisFrame int) (_
|
||||
}
|
||||
|
||||
var (
|
||||
errZeroMaxNodesArg = errors.New("zero max nodes arg")
|
||||
errZeroPort = errors.New("port must be greater than zero")
|
||||
errInvalidProto = errors.New("invalid protocol")
|
||||
errProtoRegistered = errors.New("protocol already registered")
|
||||
errNodesFull = errors.New("no more room for new nodes")
|
||||
_ = net.ErrClosed
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user