arp

package
v1.1.22 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package arp parse ARP file from /proc/net/arp

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entries

type Entries []Entry

func Get

func Get() (Entries, error)

Get list ARP entries in /proc/net/arp

func ReadAll

func ReadAll(r io.Reader) (Entries, error)

ReadAll parses ARP entries from reader.

func (Entries) FilterDeviceName

func (as Entries) FilterDeviceName(name string) Entries

func (Entries) HWAddrByIP

func (as Entries) HWAddrByIP() map[string]string

type Entry

type Entry struct {
	IPAddress string
	HWType    string
	Flags     string
	HWAddress string
	Mask      string
	Device    string
}

Entry define the list available in /proc/net/arp

Jump to

Keyboard shortcuts

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