Add net_interface_config.description
This commit is contained in:
1 parent
8cc89cd367
commit
81a29ba2a2
8 files changed
+29
No files matched your search
@@ -1798,6 +1798,10 @@ int sigar_net_interface_config_get(sigar_t *sigar, const char *name,
|
||||
|
||||
close(sock);
|
||||
|
||||
/* XXX can we get a better description like win32? */
|
||||
SIGAR_SSTRCPY(ifconfig->description,
|
||||
ifconfig->name);
|
||||
|
||||
return SIGAR_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1985,6 +1985,9 @@ int sigar_get_ifentry_config(sigar_t *sigar,
|
||||
sigar_hwaddr_format(ifconfig->hwaddr,
|
||||
ifr->bPhysAddr);
|
||||
|
||||
SIGAR_SSTRCPY(ifconfig->description,
|
||||
ifr->bDescr);
|
||||
|
||||
return SIGAR_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1306,6 +1306,10 @@ int sigar_net_interface_config_get(sigar_t *sigar, const char *name,
|
||||
|
||||
close(sock);
|
||||
|
||||
/* XXX can we get a better description like win32? */
|
||||
SIGAR_SSTRCPY(ifconfig->description,
|
||||
ifconfig->name);
|
||||
|
||||
return SIGAR_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -250,6 +250,12 @@ sigar_net_interface_config_get(sigar_t *sigar,
|
||||
SIGAR_NIC_ETHERNET);
|
||||
}
|
||||
|
||||
/* should be overridden w/ better description
|
||||
* using MIB_IFROW.bDescr when hwaddr is lookedup
|
||||
*/
|
||||
SIGAR_SSTRCPY(ifconfig->description,
|
||||
ifconfig->name);
|
||||
|
||||
hwaddr_lookup(sigar, ifconfig, i);
|
||||
|
||||
if (flags & IFF_POINTTOPOINT) {
|
||||
|
||||
Reference in new issue
Block a user