arp

package
v0.0.0-...-f4396f3 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0, MIT Imports: 11 Imported by: 28

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.

Index

Constants

View Source
const (
	// ProtocolNumber is the ARP protocol number.
	ProtocolNumber = header.ARPProtocolNumber
)

Variables

This section is empty.

Functions

func NewProtocol

func NewProtocol(s *stack.Stack) stack.NetworkProtocol

NewProtocol returns an ARP network protocol.

func NewProtocolWithOptions

func NewProtocolWithOptions(opts Options) stack.NetworkProtocolFactory

NewProtocolWithOptions returns an ARP network protocol factory that will return an ARP network protocol with the provided options.

Types

type Options

type Options struct {
	// DADConfigs is the default DAD configurations used by ARP endpoints.
	DADConfigs stack.DADConfigurations
}

Options holds options to configure a protocol.

+stateify savable

func (*Options) StateFields

func (o *Options) StateFields() []string

func (*Options) StateLoad

func (o *Options) StateLoad(ctx context.Context, stateSourceObject state.Source)

+checklocksignore

func (*Options) StateSave

func (o *Options) StateSave(stateSinkObject state.Sink)

+checklocksignore

func (*Options) StateTypeName

func (o *Options) StateTypeName() string

type Stats

type Stats struct {
	// ARP holds ARP statistics.
	ARP tcpip.ARPStats
}

Stats holds statistics related to ARP.

+stateify savable

func (*Stats) IsNetworkEndpointStats

func (*Stats) IsNetworkEndpointStats()

IsNetworkEndpointStats implements stack.NetworkEndpointStats.

func (*Stats) StateFields

func (s *Stats) StateFields() []string

func (*Stats) StateLoad

func (s *Stats) StateLoad(ctx context.Context, stateSourceObject state.Source)

+checklocksignore

func (*Stats) StateSave

func (s *Stats) StateSave(stateSinkObject state.Sink)

+checklocksignore

func (*Stats) StateTypeName

func (s *Stats) StateTypeName() string

Jump to

Keyboard shortcuts

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