2022-03-15 17:57:46 +00:00
|
|
|
//go:build openbsd
|
|
|
|
|
|
|
|
package aghnet
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net"
|
2022-10-25 13:08:12 +01:00
|
|
|
"net/netip"
|
2022-03-15 17:57:46 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const arpAOutput = `
|
|
|
|
Host Ethernet Address Netif Expire Flags
|
2022-03-23 17:47:45 +00:00
|
|
|
1.2.3.4.5 aa:bb:cc:dd:ee:ff em0 permanent
|
|
|
|
1.2.3.4 12:34:56:78:910 em0 permanent
|
2022-03-15 17:57:46 +00:00
|
|
|
192.168.1.2 ab:cd:ef:ab:cd:ef em0 19m56s
|
|
|
|
::ffff:ffff ef:cd:ab:ef:cd:ab em0 permanent l
|
|
|
|
`
|
|
|
|
|
|
|
|
var wantNeighs = []Neighbor{{
|
2022-10-25 13:08:12 +01:00
|
|
|
IP: netip.MustParseAddr("192.168.1.2"),
|
2022-03-15 17:57:46 +00:00
|
|
|
MAC: net.HardwareAddr{0xAB, 0xCD, 0xEF, 0xAB, 0xCD, 0xEF},
|
|
|
|
}, {
|
2022-10-25 13:08:12 +01:00
|
|
|
IP: netip.MustParseAddr("::ffff:ffff"),
|
2022-03-15 17:57:46 +00:00
|
|
|
MAC: net.HardwareAddr{0xEF, 0xCD, 0xAB, 0xEF, 0xCD, 0xAB},
|
|
|
|
}}
|