You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
518 B

#include <QtCore/QCoreApplication>
#include <iostream>
#include <QTimer>
#include <QStringList>
#include "ip.h"
int main(int argc, char *argv[]) {
QCoreApplication app(argc, argv);
IP ip;
std::cout << "MAC: " << qPrintable(ip.macOfIP("10.0.4.1")) << std::endl;
QStringList addresses = ip.addresses("wlp3s0");
foreach(QString address, addresses) {
std::cout << "Address: " << qPrintable(address) << std::endl;
}
QTimer::singleShot(0, qApp, SLOT(quit()));
int ret = app.exec();
return ret;
}