only return loopback and ethernet types in net_interface_list
This commit is contained in:
parent
c77dd61985
commit
72dcec2dde
|
@ -2295,9 +2295,12 @@ sigar_net_interface_list_get(sigar_t *sigar,
|
|||
else if (ifr->dwType == MIB_IF_TYPE_LOOPBACK) {
|
||||
sprintf(name, "lo%d", lo++);
|
||||
}
|
||||
else {
|
||||
else if (ifr->dwType == MIB_IF_TYPE_ETHERNET) {
|
||||
sprintf(name, "eth%d", eth++);
|
||||
}
|
||||
else {
|
||||
continue; /*XXX*/
|
||||
}
|
||||
|
||||
if (iflist) {
|
||||
iflist->data[iflist->number++] = strdup(name);
|
||||
|
|
Loading…
Reference in New Issue