mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
cmd/cli: extend list of valid interfaces for MacOS
This commit is contained in:
committed by
Cuong Manh Le
parent
3b71d26cf3
commit
95a9df826d
@@ -43,18 +43,20 @@ func networkServiceName(ifaceName string, r io.Reader) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// validInterface reports whether the *net.Interface is a valid one, which includes:
|
// validInterface reports whether the *net.Interface is a valid one, which includes en0 -> en10.
|
||||||
//
|
|
||||||
// - en0: physical wireless
|
// - en0: physical wireless
|
||||||
// - en1: Thunderbolt 1
|
// - en1: Thunderbolt 1
|
||||||
// - en2: Thunderbolt 2
|
// - en2: Thunderbolt 2
|
||||||
// - en3: Thunderbolt 3
|
// - en3: Thunderbolt 3
|
||||||
// - en4: Thunderbolt 4
|
// - en4: Thunderbolt 4
|
||||||
|
// - ...
|
||||||
|
// - en10: iPad
|
||||||
//
|
//
|
||||||
// For full list, see: https://unix.stackexchange.com/questions/603506/what-are-these-ifconfig-interfaces-on-macos
|
// For full list, see: https://unix.stackexchange.com/questions/603506/what-are-these-ifconfig-interfaces-on-macos
|
||||||
func validInterface(iface *net.Interface) bool {
|
func validInterface(iface *net.Interface) bool {
|
||||||
switch iface.Name {
|
switch iface.Name {
|
||||||
case "en0", "en1", "en2", "en3", "en4":
|
case "en0", "en1", "en2", "en3", "en4", "en5",
|
||||||
|
"en6", "en7", "en8", "en9", "en10":
|
||||||
return true
|
return true
|
||||||
default:
|
default:
|
||||||
return false
|
return false
|
||||||
|
|||||||
Reference in New Issue
Block a user