PDA

View Full Version : How to discriminate if a MAC Address belongs to RJ45 Network Card or Wi-Fi...



cydside
6th November 2010, 08:52
Hi to all,
I'm parsing all the network interfaces using the following example code:



foreach (const QNetworkInterface &ni, QNetworkInterface::allInterfaces()) {
qDebug() << ni.hardwareAddress();
qDebug() << ni.name();
qDebug() << ni.index();
}


but It seems impossible to get know what is the interface.
Need help!!!
Thanks

ChrisW67
7th November 2010, 21:10
Have you tried looking at the name() of the interfaces to see if there is a useful clue? I don't think anything relying on this alone would be robust and portable but I don't know your application requirements and environment.