arp

package module
v0.0.0-...-541a212 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2017 License: MIT Imports: 5 Imported by: 50

README

golang library for looking up MAC address by IP address. It currently supports different methods for retrieving the ARP cache from the system depending if running on Linux, OSX or Windows.

I've only tested this library on OSX and Linux.

For Linux, /proc/net/arp is used. For OSX (or other unix systems) and Windows, exec.Command is used to call the arp utility and parse its output.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoRefresh

func AutoRefresh(t time.Duration)

func CacheLastUpdate

func CacheLastUpdate() time.Time

func CacheUpdate

func CacheUpdate()

func CacheUpdateCount

func CacheUpdateCount() int
func Search(ip string) string

Search looks up the MAC address for an IP address in the arp table

func StopAutoRefresh

func StopAutoRefresh()

Types

type ArpTable

type ArpTable map[string]string

func Table

func Table() ArpTable

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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