arp

package
v0.0.0-...-ec91871 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

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.ProtocolName 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 (
	// ProtocolName is the string representation of the ARP protocol name.
	ProtocolName = "arp"

	// 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

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL