|
@@ -18,7 +18,8 @@
|
|
|
#define streq stricmp
|
|
|
|
|
|
#else
|
|
|
-
|
|
|
+#include <linux/ethtool.h>
|
|
|
+#include <linux/sockios.h>
|
|
|
#include <net/if.h>
|
|
|
#include <sys/ioctl.h>
|
|
|
#include <unistd.h>
|
|
@@ -879,7 +880,7 @@ static ErrorCodeEnum GetINETMacAddresses(CAutoArray<NetworkAdapterItem> &netList
|
|
|
Dbg("HWaddr %s", mac);
|
|
|
inteMacs[buf[i].ifr_name] = mac;
|
|
|
}
|
|
|
- if (ioctl(fd, SIOCEHTOOL, (char*)& buf[i]) == -1) {
|
|
|
+ if (ioctl(fd, SIOCETHTOOL, (char*)& buf[i]) == -1) {
|
|
|
//up down
|
|
|
inteStatus[buf[i].ifr_name] = 0;
|
|
|
}
|
|
@@ -905,13 +906,13 @@ static ErrorCodeEnum GetINETMacAddresses(CAutoArray<NetworkAdapterItem> &netList
|
|
|
if (tmpip.Compare("127.0.0.1") == 0 && tmpmac.Compare("00:00:00:00:00:00") == 0) {
|
|
|
//skip
|
|
|
} else {
|
|
|
- tmpname = map_it->first;
|
|
|
+ tmpname = map_it->first.c_str();
|
|
|
netItem.friend_name = "";//oiltmp
|
|
|
netItem.description = tmpname;
|
|
|
netItem.mac = tmpmac;
|
|
|
netItem.ip = tmpip;
|
|
|
netItem.operStatus = inteStatus[map_it->first];
|
|
|
- netItem.type = IF_TYPE_ETHERNET_CSMACD;
|
|
|
+ netItem.type = 6;//oiltest haven't find the in linux
|
|
|
netLists.Append(&netItem, 0, 1);
|
|
|
}
|
|
|
++map_it;
|