我的 Ubuntu 16.04 系统在华硕 Zenbook 上运行。当我运行以下代码写出所有接口(interface)的 MAC 地址时:
#include <QCoreApplication>
#include <QNetworkInterface>
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
auto interfaces = QNetworkInterface::allInterfaces();
for (const auto& i : interfaces)
qDebug() << i.humanReadableName() << "; "<< i.hardwareAddress() << '\n';
return a.exec();
}
我得到:
"lo" ; "00:00:00:00:00:00"
"wlp2s0" ; "00:21:5C:B2:C7:58"
我的笔记本电脑有内置 WiFi,但没有以太网电缆端口。
我真的很想知道这个零 MAC 地址指的是什么。
到目前为止,我的研究将我转向论坛,其中这要么是驱动程序的问题,要么是 Kaspersky antivirus 的问题。 .
此 MAC 地址是否有任何合法含义,或者是否有误?
最佳答案
localhost,环回接口(interface)。这是合法的。维基百科上对此有一个很好的解释:https://en.wikipedia.org/wiki/Localhost
关于qt - MAC地址为零指的是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41316745/