-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patharp_stub.go
More file actions
executable file
·26 lines (21 loc) · 1018 Bytes
/
arp_stub.go
File metadata and controls
executable file
·26 lines (21 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// File: arp_stub.go
// Version: 1.0.0
// Last Updated: 2026-03-01 15:00 CET
// Description: No-op stubs for InitARP and LookupMAC on non-Linux platforms.
// arp.go uses /proc/net/arp which is Linux-only. On other platforms
// (macOS for dev builds, BSDs, etc.) ARP resolution is simply skipped —
// identity fallback via IP->name from /etc/hosts still works fine.
//
// Changes:
// 1.0.0 - Initial stub to satisfy the compiler when arp.go is excluded by build tags.
//
// ... Older commit-information removed for brevity.
//go:build !linux
package main
// InitARP is a no-op on non-Linux platforms.
// MAC-based routing and {client-name} resolution via MAC are unavailable,
// but IP-based identity (hosts files, leases) and all upstream routing still work.
func InitARP() {}
// LookupMAC always returns "" on non-Linux platforms.
// process.go gracefully falls through to IP-based identity resolution when MAC is empty.
func LookupMAC(_ string) string { return "" }