Hi, I'm trying to get the list of all real network interfaces in a computer. Both the active and inactive ones. This is the code I used:

Qt Code:
  1. QList<QNetworkInterface> allInterfaces = QNetworkInterface::allInterfaces();
  2. foreach(QNetworkInterface iFace, allInterfaces) {
  3. qDebug() << iFace.humanReadableName();
  4. }
To copy to clipboard, switch view to plain text mode 

and this is what I get

Qt Code:
  1. "Bluetooth Network Connection"
  2. "Wireless Network Connection"
  3. "Local Area Connection"
  4. "Local Area Connection* 9"
  5. "Local Area Connection* 6"
  6. "Local Area Connection* 7"
  7. "Local Area Connection-McAfee NDIS Light-Weight Filter-0000"
  8. "Local Area Connection-WFP LightWeight Filter-0000"
  9. "Local Area Connection* 8"
  10. "Local Area Connection-QoS Packet Scheduler-0000"
  11. "Local Area Connection* 6-McAfee NDIS Light-Weight Filter-0000"
  12. "Local Area Connection* 6-QoS Packet Scheduler-0000"
  13. "Local Area Connection* 8-McAfee NDIS Light-Weight Filter-0000"
  14. "Local Area Connection* 8-QoS Packet Scheduler-0000"
  15. "Local Area Connection* 7-McAfee NDIS Light-Weight Filter-0000"
  16. "Local Area Connection* 7-QoS Packet Scheduler-0000"
  17. "Local Area Connection* 5"
  18. "Local Area Connection* 10"
  19. "Loopback Pseudo-Interface 1"
  20. "Wireless Network Connection-Native WiFi Filter Driver-0000"
  21. "Wireless Network Connection-QoS Packet Scheduler-0000"
  22. "Wireless Network Connection-McAfee NDIS Light-Weight Filter-0000"
  23. "Wireless Network Connection-WFP LightWeight Filter-0000"
  24. "Local Area Connection*"
  25. "Local Area Connection* 2"
  26. "Local Area Connection* 3"
  27. "Local Area Connection* 4"
  28. "isatap.{1A7372EB-C154-48C7-A90C-5D20357D5682}"
  29. "isatap.{1A7372EB-C154-48C7-A90C-5D20357D5682}-McAfee NDIS Light-Weight Filter-0000"
  30. "Teredo Tunneling Pseudo-Interface"
  31. "Reusable ISATAP Interface {881DDFED-EB39-42CA-A446-F4B55E48C2A6}-McAfee NDIS Light-Weight Filter-0000"
  32. "isatap.Belkin-McAfee NDIS Light-Weight Filter-0000"
  33. "Local Area Connection* 11"
  34. "isatap.Belkin"
  35. "isatap.{DBFD5208-893B-4F36-859C-480E466384E0}-McAfee NDIS Light-Weight Filter-0000"
  36. "isatap.{DBFD5208-893B-4F36-859C-480E466384E0}"
  37. "Reusable ISATAP Interface {881DDFED-EB39-42CA-A446-F4B55E48C2A6}"
  38. "Local Area Connection* 11-McAfee NDIS Light-Weight Filter-0000"
To copy to clipboard, switch view to plain text mode 

I just need the first three as all the others are virtual connections. Filtering the list with network interface flags did not work as they only removed the inactive connections and all these virtual ones seem to be active.

Does anyone have any suggestions? I need help!