diff --git a/src/sigar.c b/src/sigar.c index 8ce777c8..08be5a33 100644 --- a/src/sigar.c +++ b/src/sigar.c @@ -1273,6 +1273,69 @@ static int sigar_netif_configured(sigar_t *sigar, char *name) } #endif +#ifdef __linux__ +static SIGAR_INLINE int has_interface(sigar_net_interface_list_t *iflist, + char *name) +{ + register int i; + register int num = iflist->number; + register char **data = iflist->data; + for (i=0; idata[iflist->number++] = + sigar_strdup(dev); + } + + fclose(fp); + + return SIGAR_OK; +} +#endif + int sigar_net_interface_list_get(sigar_t *sigar, sigar_net_interface_list_t *iflist) { @@ -1346,6 +1409,10 @@ int sigar_net_interface_list_get(sigar_t *sigar, sigar_strdup(ifr->ifr_name); } +#ifdef __linux__ + proc_net_interface_list_get(sigar, iflist); +#endif + return SIGAR_OK; }