The following code
if (!(ni.flags() & ni.IsLoopBack)){
macName = ni.hardwareAddress(); // lets match & get our information for this device
qDebug() << macName;
foreach (const QNetworkInterface &ni, QNetworkInterface::allInterfaces()) {
if (!(ni.flags() & ni.IsLoopBack)){
macName = ni.hardwareAddress(); // lets match & get our information for this device
qDebug() << macName;
To copy to clipboard, switch view to plain text mode
outputs
"00:1C:DF:93:1D:5D"
"00:1C:DF:93:1D:5D"
"00:23:AE:A8:26:FC" // this one being Local Area Connection
"00:50:56:C0:00:01"
"00:50:56:C0:00:08"
"3E:9B:20:52:41:53"
"3E:9B:20:52:41:53"
"00:23:AE:A8:26:FC"
"00:23:AE:A8:26:FC"
"3E:9B:20:52:41:53"
"3E:9B:20:52:41:53"
"3E:9B:20:52:41:53"
"3E:9B:20:52:41:53"
"20:41:53:59:4E:FF"
"00:00:00:00:00:00:00:00"
"00:00:00:00:00:00:00:E0"
"00:00:00:00:00:00:00:E0"
"00:00:00:00:00:00:00:E0"
"00:00:00:00:00:00:00:E0"
"00:00:00:00:00:00:00:E0"
"00:1C:DF:93:1D:5D"
"00:1C:DF:93:1D:5D"
"00:23:AE:A8:26:FC" // this one being Local Area Connection
"00:50:56:C0:00:01"
"00:50:56:C0:00:08"
"3E:9B:20:52:41:53"
"3E:9B:20:52:41:53"
"00:23:AE:A8:26:FC"
"00:23:AE:A8:26:FC"
"3E:9B:20:52:41:53"
"3E:9B:20:52:41:53"
"3E:9B:20:52:41:53"
"3E:9B:20:52:41:53"
"20:41:53:59:4E:FF"
"00:00:00:00:00:00:00:00"
"00:00:00:00:00:00:00:E0"
"00:00:00:00:00:00:00:E0"
"00:00:00:00:00:00:00:E0"
"00:00:00:00:00:00:00:E0"
"00:00:00:00:00:00:00:E0"
To copy to clipboard, switch view to plain text mode
how can i filter threw the hardware addresses where QNetworkInterface::humanReadableName = local area connection and spit that one out only ?
Bookmarks