jaypipes / ghw

Go HardWare discovery/inspection library
Apache License 2.0
1.62k stars 174 forks source link

Win32_NetworkAdapter: use PhysicalAdapter to check whether the NIC IsVirtual #292

Closed lukashartl closed 2 years ago

lukashartl commented 2 years ago

This is my proposed fix for #291 .

Simple test with my windows pc, showing nic.Name and nic.IsVirtual:

Microsoft Kernel Debug Network Adapter                                                  true
VirtualBox Host-Only Network - VirtualBox Host-Only Ethernet Adapter                    false
Ethernet - Realtek Gaming GbE Family Controller                                         false
WAN Miniport (SSTP)                                                                     true
WAN Miniport (IKEv2)                                                                    true
WAN Miniport (L2TP)                                                                     true
WAN Miniport (PPTP)                                                                     true
WAN Miniport (PPPOE)                                                                    true
WAN Miniport (IP)                                                                       true
WAN Miniport (IPv6)                                                                     true
WAN Miniport (Network Monitor)                                                          true

fixes #291