2022-03-15 20:57:46 +03:00
|
|
|
//go:build openbsd
|
|
|
|
|
|
|
|
package aghnet
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net"
|
2022-10-25 15:08:12 +03:00
|
|
|
"net/netip"
|
2022-03-15 20:57:46 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
const arpAOutput = `
|
|
|
|
Host Ethernet Address Netif Expire Flags
|
2022-03-23 20:47:45 +03: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 20:57:46 +03: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 15:08:12 +03:00
|
|
|
IP: netip.MustParseAddr("192.168.1.2"),
|
2022-03-15 20:57:46 +03:00
|
|
|
MAC: net.HardwareAddr{0xAB, 0xCD, 0xEF, 0xAB, 0xCD, 0xEF},
|
|
|
|
}, {
|
2022-10-25 15:08:12 +03:00
|
|
|
IP: netip.MustParseAddr("::ffff:ffff"),
|
2022-03-15 20:57:46 +03:00
|
|
|
MAC: net.HardwareAddr{0xEF, 0xCD, 0xAB, 0xEF, 0xCD, 0xAB},
|
|
|
|
}}
|