diff --git a/include/sigar.h b/include/sigar.h index 065e3482..989e121c 100644 --- a/include/sigar.h +++ b/include/sigar.h @@ -467,7 +467,8 @@ typedef struct { netmask, flags, mtu, - metric; + metric, + speed; } sigar_net_interface_config_t; SIGAR_DECLARE(int) diff --git a/src/os/darwin/darwin_sigar.c b/src/os/darwin/darwin_sigar.c index 76180013..69328a41 100644 --- a/src/os/darwin/darwin_sigar.c +++ b/src/os/darwin/darwin_sigar.c @@ -1756,6 +1756,7 @@ int sigar_net_interface_config_get(sigar_t *sigar, const char *name, ifm = iter.data.ifm; SIGAR_SSTRCPY(ifconfig->name, name); + ifconfig->speed = SIGAR_FIELD_NOTIMPL; sdl = (struct sockaddr_dl *)(ifm + 1); sigar_hwaddr_format(ifconfig->hwaddr, diff --git a/src/os/win32/win32_sigar.c b/src/os/win32/win32_sigar.c index 050331a4..b66fb672 100644 --- a/src/os/win32/win32_sigar.c +++ b/src/os/win32/win32_sigar.c @@ -1981,6 +1981,7 @@ int sigar_get_ifentry_config(sigar_t *sigar, } ifconfig->mtu = ifr->dwMtu; + ifconfig->speed = ifr->dwSpeed; sigar_hwaddr_format(ifconfig->hwaddr, ifr->bPhysAddr); diff --git a/src/sigar.c b/src/sigar.c index 23cfbc4d..d582272b 100644 --- a/src/sigar.c +++ b/src/sigar.c @@ -1206,6 +1206,7 @@ int sigar_net_interface_config_get(sigar_t *sigar, const char *name, SIGAR_SSTRCPY(ifconfig->name, name); SIGAR_SSTRCPY(ifr.ifr_name, name); + ifconfig->speed = SIGAR_FIELD_NOTIMPL; #define ifr_s_addr(ifr) \ ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr diff --git a/src/sigar_win32ish.c b/src/sigar_win32ish.c index 329170c5..64b83d04 100644 --- a/src/sigar_win32ish.c +++ b/src/sigar_win32ish.c @@ -255,6 +255,8 @@ sigar_net_interface_config_get(sigar_t *sigar, */ SIGAR_SSTRCPY(ifconfig->description, ifconfig->name); + + ifconfig->speed = SIGAR_FIELD_NOTIMPL; hwaddr_lookup(sigar, ifconfig, i);