mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
By parsing "networksetup -listallhardwareports" output to get list of available hardware ports.
24 lines
503 B
Go
24 lines
503 B
Go
package cli
|
|
|
|
import (
|
|
"net"
|
|
)
|
|
|
|
func patchNetIfaceName(iface *net.Interface) error {
|
|
return nil
|
|
}
|
|
|
|
// validInterface reports whether the *net.Interface is a valid one.
|
|
// On Windows, only physical interfaces are considered valid.
|
|
func validInterface(iface *net.Interface, validIfacesMap map[string]struct{}) bool {
|
|
if iface == nil {
|
|
return false
|
|
}
|
|
if isPhysicalInterface(iface.HardwareAddr.String()) {
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
func validInterfacesMap() map[string]struct{} { return nil }
|