arp

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package arp implements the ARP header.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ARP

type ARP struct {
	// contains filtered or unexported fields
}

An ARP is an ARP header. It can parse, query and operate on an ARP header in the packet. However it cannot add a new ARP header to a packet.

func (*ARP) Field

func (a *ARP) Field(id fwdpacket.FieldID) ([]byte, error)

Field returns bytes within the ARP header as specified by id.

func (*ARP) Header

func (a *ARP) Header() []byte

Header returns the ARP header.

func (ARP) ID

ID returns the ARP protocol header ID.

func (ARP) Modify

func (ARP) Modify(fwdpb.PacketHeaderId) error

Modify returns an error as the ARP header does not support extensions.

func (ARP) Rebuild

func (ARP) Rebuild() error

Rebuild succeeds by default as the ARP header does not need updates.

func (ARP) Remove

func (ARP) Remove(fwdpb.PacketHeaderId) error

Remove returns an error as the ARP header cannot be removed.

func (ARP) Trailer

func (ARP) Trailer() []byte

Trailer returns the no trailing bytes.

func (*ARP) UpdateField

func (a *ARP) UpdateField(id fwdpacket.FieldID, op int, arg []byte) (bool, error)

UpdateField sets bytes within the ARP header.

Jump to

Keyboard shortcuts

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