Hi all
I am feteching mac address it is coming right on pc but when i run it on devices it is not correct address.
I am using this code
Like if devices's mac address is "74:45:8A:5D:15:B9" and "00:19:07:43:c6:55" then it is coming "01:00:74:45:8A:5D" and "01:00:00:19:07:43" respectively. Thank You.Qt Code:
bool result = false; for (int i = 0; i < ifaces.count(); i++) { if ( iface.flags().testFlag(QNetworkInterface::IsUp) && !iface.flags().testFlag(QNetworkInterface::IsLoopBack) ) { qDebug() << "name:" << iface.name() << endl << "ip addresses:" << endl<< "mac:" << iface.hardwareAddress() << endl; for (int j=0; j<iface.addressEntries().count(); j++) { qDebug() << iface.addressEntries().at(j).ip().toString()<< " / " << iface.addressEntries().at(j).netmask().toString() << endl; if (result == false) result = true; } } }To copy to clipboard, switch view to plain text mode
Bookmarks