mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-21 20:45:33 +03:00
04c8e3b288
Updates #5035. Squashed commit of the following: commit d1c4493ee4e28d05670c20532ebae1aa809d18da Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Oct 25 14:26:52 2022 +0300 aghnet: imp hosts rec equal commit 0a7f40a64a819245fba20d3b481b0fc34e0c60e6 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Oct 24 18:10:09 2022 +0300 aghnet: move arp and hosts to netip.Addr
24 lines
569 B
Go
24 lines
569 B
Go
//go:build openbsd
|
|
|
|
package aghnet
|
|
|
|
import (
|
|
"net"
|
|
"net/netip"
|
|
)
|
|
|
|
const arpAOutput = `
|
|
Host Ethernet Address Netif Expire Flags
|
|
1.2.3.4.5 aa:bb:cc:dd:ee:ff em0 permanent
|
|
1.2.3.4 12:34:56:78:910 em0 permanent
|
|
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{{
|
|
IP: netip.MustParseAddr("192.168.1.2"),
|
|
MAC: net.HardwareAddr{0xAB, 0xCD, 0xEF, 0xAB, 0xCD, 0xEF},
|
|
}, {
|
|
IP: netip.MustParseAddr("::ffff:ffff"),
|
|
MAC: net.HardwareAddr{0xEF, 0xCD, 0xAB, 0xEF, 0xCD, 0xAB},
|
|
}}
|