https://github.com/itsjimi/go-arp
Parse ARP file from /proc/net/arp
https://github.com/itsjimi/go-arp
arp go golang ip mac
Last synced: 5 months ago
JSON representation
Parse ARP file from /proc/net/arp
- Host: GitHub
- URL: https://github.com/itsjimi/go-arp
- Owner: ItsJimi
- License: mit
- Created: 2019-12-10T12:58:08.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-01-30T13:35:17.000Z (over 1 year ago)
- Last Synced: 2025-06-02T02:19:20.922Z (about 1 year ago)
- Topics: arp, go, golang, ip, mac
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-arp
[](https://pkg.go.dev/github.com/ItsJimi/go-arp)
Parse ARP file from `/proc/net/arp`
## Install
```shell
go get -u github.com/ItsJimi/go-arp
```
## Example
#### GetEntries
```go
package main
import (
"fmt"
"github.com/ItsJimi/go-arp"
)
func main() {
list, err := arp.GetEntries()
if err != nil {
fmt.Println(err)
return
}
fmt.Println(list[0].IPAddress)
}
```
#### GetEntryFromMAC
```go
package main
import (
"fmt"
"github.com/ItsJimi/go-arp"
)
func main() {
entry, err := arp.GetEntryFromMAC("00:00:00:00:00:00")
if err != nil {
fmt.Println(err)
return
}
fmt.Println(entry.IPAddress)
}
```
## Contribute
Feel free to fork and make pull requests
## License
[MIT](https://github.com/ItsJimi/go-arp/blob/master/LICENSE)