Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QNetworkInterface getting a name that means something?



  • When the application is started I test for a switch /listNI, if this is present I iterate through the network adapters on the system and display the interface name:

                        for( const QNetworkInterface& interface : QNetworkInterface::allInterfaces() )
                        {
                            const QString cstrName(interface.name());
                            if ( cstrName.startsWith(SckServer::mscszLoopback) != true )
                            {
                                qinf() << "\t" << interface.name();
                            }
                        }
    

    The output from this is:

    Network interfaces:
    ethernet_32771
    ethernet_32769
    ethernet_32772
    wireless_32769
    wireless_32770
    wireless_32768
    

    Looking in Device Manager and at the Network adapters, none of these are found. Is there anything that displayed that can be cross referenced with the output from ipconfig /all?

    Edit, Fixed, replaced .name() with .humanReadableName()



  • mark as solved?


Log in to reply