Closed lukashartl closed 2 years ago
On Windows all NICs have IsVirtual set to false, as seen on these lines of code:
IsVirtual
https://github.com/jaypipes/ghw/blob/b1b38be8a0b23a04caf8debe02fa6a0599bc5908/pkg/net/net_windows.go#L44-L49
The data is obtained via the following WMI Query:
https://github.com/jaypipes/ghw/blob/b1b38be8a0b23a04caf8debe02fa6a0599bc5908/pkg/net/net_windows.go#L14
Win32_NetworkAdapter has an attribute called PhysicalAdapter.
Win32_NetworkAdapter
PhysicalAdapter
How about using this attribute instead?
I'm also willing to make a PR for that, if you approve :smile:
@lukashartl nice catch! yes, feel free to push up a PR and I will review ASAP! :)
On Windows all NICs have
IsVirtual
set to false, as seen on these lines of code:https://github.com/jaypipes/ghw/blob/b1b38be8a0b23a04caf8debe02fa6a0599bc5908/pkg/net/net_windows.go#L44-L49
The data is obtained via the following WMI Query:
https://github.com/jaypipes/ghw/blob/b1b38be8a0b23a04caf8debe02fa6a0599bc5908/pkg/net/net_windows.go#L14
Win32_NetworkAdapter
has an attribute calledPhysicalAdapter
.How about using this attribute instead?
I'm also willing to make a PR for that, if you approve :smile: