Updated implementation.
2006-07-27 Benoît Dejean <benoit@placenet.org> * netload.c: (glibtop_get_netload_s): Updated implementation.
This commit is contained in:
committed by
Benoît Dejean
parent
c51a13bf0e
commit
a7a9e7e9f8
@@ -1,3 +1,9 @@
|
||||
2006-07-27 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* netload.c: (glibtop_get_netload_s):
|
||||
|
||||
Updated implementation.
|
||||
|
||||
2006-07-27 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* glibtop_private.c: (has_sysfs):
|
||||
|
@@ -500,6 +500,10 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_MULTICAST);
|
||||
}
|
||||
|
||||
g_strlcpy (ifr.ifr_name, interface, sizeof ifr.ifr_name);
|
||||
if (!ioctl(skfd, /* SIOCGIWNAME */ 0x8B01, &ifr))
|
||||
buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_WIRELESS);
|
||||
|
||||
g_strlcpy (ifr.ifr_name, interface, sizeof ifr.ifr_name);
|
||||
if (!ioctl (skfd, SIOCGIFADDR, &ifr)) {
|
||||
buf->address = ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr;
|
||||
|
Reference in New Issue
Block a user