Documentation ¶
Overview ¶
Package arp implements the ARP network protocol. It is used to resolve IPv4 addresses into link-local MAC addresses, and advertises IPv4 addresses of its stack with the local network.
To use it in the networking stack, pass arp.NewProtocol() as one of the network protocols when calling stack.New. Then add an "arp" address to every NIC on the stack that should respond to ARP requests. That is:
if err := s.AddAddress(1, arp.ProtocolNumber, "arp"); err != nil { // handle err }
Index ¶
Constants ¶
View Source
const ( // ProtocolNumber is the ARP protocol number. ProtocolNumber = header.ARPProtocolNumber // ProtocolAddress is the address expected by the ARP endpoint. ProtocolAddress = tcpip.Address("arp") )
Variables ¶
This section is empty.
Functions ¶
func NewProtocol ¶
func NewProtocol() stack.NetworkProtocol
NewProtocol returns an ARP network protocol.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.