Versions in this module Expand all Collapse all v1 v1.0.0 Jun 25, 2023 Changes in this version + var ErrInvalidHardwareAddr = errors.New("invalid hardware address") + var ErrInvalidIP = errors.New("invalid IPv4 address") + type Client struct + func Dial(ifi *net.Interface) (*Client, error) + func New(ifi *net.Interface, p net.PacketConn) (*Client, error) + func (c *Client) Close() error + func (c *Client) Read() (*Packet, *ethernet.Frame, error) + func (c *Client) Reply(req *Packet, hwAddr net.HardwareAddr, ip netip.Addr) error + func (c *Client) Request(ip netip.Addr) error + func (c *Client) Resolve(ip netip.Addr) (net.HardwareAddr, error) + func (c *Client) SetDeadline(t time.Time) error + func (c *Client) SetReadDeadline(t time.Time) error + func (c *Client) SetWriteDeadline(t time.Time) error + func (c *Client) WriteTo(p *Packet, addr net.HardwareAddr) error + func (c Client) HardwareAddr() net.HardwareAddr + type Operation uint16 + const OperationReply + const OperationRequest + func (i Operation) String() string + type Packet struct + HardwareAddrLength uint8 + HardwareType uint16 + IPLength uint8 + Operation Operation + ProtocolType uint16 + SenderHardwareAddr net.HardwareAddr + SenderIP netip.Addr + TargetHardwareAddr net.HardwareAddr + TargetIP netip.Addr + func NewPacket(op Operation, srcHW net.HardwareAddr, srcIP netip.Addr, dstHW net.HardwareAddr, ...) (*Packet, error) + func (p *Packet) MarshalBinary() ([]byte, error) + func (p *Packet) UnmarshalBinary(b []byte) error