mirror of
https://github.com/soypat/lneto.git
synced 2026-08-10 09:53:44 +00:00
be2d380753
* typo in error text * compactQueries was keeping invalid queries * compactQueries accidentally ended up creating shared slices
27 lines
688 B
Go
27 lines
688 B
Go
package arp
|
|
|
|
import "errors"
|
|
|
|
//go:generate stringer -type=Operation -linecomment -output stringers.go .
|
|
|
|
const (
|
|
sizeHeader = 8
|
|
sizeHeaderv4 = sizeHeader + 6*2 + 4*2
|
|
sizeHeaderv6 = sizeHeader + 6*2 + 16*2
|
|
)
|
|
|
|
var (
|
|
errARPBufferFull = errors.New("ARP client need handling:too many ops pending")
|
|
errShortARP = errors.New("packet too short to be ARP")
|
|
errARPUnsupported = errors.New("ARP not supported")
|
|
errLargeSizes = errors.New("size of ARP protocol+hardware is unusually large")
|
|
)
|
|
|
|
// Operation represents the type of ARP packet, either request or reply/response.
|
|
type Operation uint16
|
|
|
|
const (
|
|
OpRequest Operation = 1 // request
|
|
OpReply Operation = 2 // reply
|
|
)
|