How to check the type of network interface: Ethernet or Wireless in Windows using Qt?

I need to know what type of network interface is Wired or Wireless on a PC.

I tried to use a class QNetworkInterfacethat provides Adapter Name. But the adapter name can be changed by the user in Windows. On a Mac, I can check the type of interface as eth0or eth1, since it is the same for all users.

I also tried QNetworkConfiguration::bearerType, but I get the configuration as Ethernet ie BearerEthernet for wired and wireless configuration.

Is there any other way to find out the type of network interface in Qt or using the Windows platform APIs?

+4
source share
1 answer
0
source

Source: https://habr.com/ru/post/1526187/


All Articles