mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
Move platform-specific network interface detection from cmd/cli/ to root package as ValidInterfaces function. This eliminates code duplication and provides a consistent interface for determining valid physical network interfaces across all platforms. - Remove duplicate validInterfacesMap functions from platform-specific files - Add context parameter to virtualInterfaces for proper logging - Update all callers to use ctrld.ValidInterfaces instead of local functions - Improve error handling in virtual interface detection on Linux
14 lines
417 B
Go
14 lines
417 B
Go
//go:build !darwin && !windows && !linux
|
|
|
|
package cli
|
|
|
|
import (
|
|
"net"
|
|
)
|
|
|
|
// patchNetIfaceName patches network interface names on non-Linux/Darwin platforms
|
|
func patchNetIfaceName(iface *net.Interface) (bool, error) { return true, nil }
|
|
|
|
// validInterface checks if an interface is valid on non-Linux/Darwin platforms
|
|
func validInterface(iface *net.Interface, validIfacesMap map[string]struct{}) bool { return true }
|