arp

package module
Version: v0.0.0-...-a305654 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2015 License: MIT Imports: 5 Imported by: 0

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 or OSX.

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

For Linux, /proc/net/arp is used. For OSX (or other unix systems), 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
t or T : Toggle theme light dark auto
y or Y : Canonical URL