arp

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// completed entry (ha valid)
	ATF_COM = 0x02
	// permanent entry
	ATF_PERM = 0x04
	// publish entry
	ATF_PUBL = 0x08
	// has requested trailers
	ATF_USETRAILERS = 0x10
	// want to use a netmask (only for proxy entries)
	ATF_NETMASK = 0x20
	// don't answer this addresses
	ATF_DONTPUB = 0x40
)

ARP Flag values these are not in golang.org/x/sys/unix

Variables

This section is empty.

Functions

func InjectArp

func InjectArp(ip net.IP, mac net.HardwareAddr, flags int32, dev string) (err error)

InjectArp injects an ARP entry into dev's ARP table syscalls roughly based on https://www.unix.com/302447674-post3.html see:

https://github.com/torvalds/linux/blob/8cf8821e15cd553339a5b48ee555a0439c2b2742/net/ipv4/arp.c#L1179
https://github.com/torvalds/linux/blob/8cf8821e15cd553339a5b48ee555a0439c2b2742/net/ipv4/arp.c#L1024

func InjectArpFd

func InjectArpFd(fd uintptr, ip net.IP, mac net.HardwareAddr, flags int32, dev string) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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