diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | features.def | 4 | ||||
-rw-r--r-- | include/glibtop/netinfo.h | 8 | ||||
-rw-r--r-- | include/glibtop/netload.h | 8 | ||||
-rw-r--r-- | src/daemon/main.c | 6 | ||||
-rw-r--r-- | src/daemon/slave.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/netinfo.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/netload.c | 3 |
8 files changed, 28 insertions, 14 deletions
@@ -1,5 +1,14 @@ 1999-11-28 Martin Baulig <martin@home-of-linux.org> + * include/glibtop/netload.h (glibtop_get_netload): Added + `transport' and `protocol' argument to specify transport method + and protocol. + + * include/glibtop/netinfo.h (glibtop_get_netinfo): Added + `transport' argument to specify the transport method. + +1999-11-28 Martin Baulig <martin@home-of-linux.org> + * include/glibtop/netinfo.h (glibtop_netinfo): Added `transport' field for the transport method. diff --git a/features.def b/features.def index 04c52c25..a454cb81 100644 --- a/features.def +++ b/features.def @@ -19,6 +19,6 @@ glibtop_map_entry *|proc_map|ulong(number,size,total)|pid_t(pid) glibtop_mountentry *|@mountlist|ulong(number,size,total)|int(all_fs) retval|@fsusage|ulong(blocks,bfree,bavail,files,ffree)|string(mount_dir) char *|interface_names|ulong(size)|unsigned(interface,number,instance,strategy) -retval|netinfo|ulong(if_flags,transport,mtu,subnet,address)|string(interface) -retval|netload|ulong(packets_in,packets_out,packets_total,bytes_in,bytes_out,bytes_total,errors_in,errors_out,errors_total,collisions)|string(interface) +retval|netinfo|ulong(if_flags,transport,mtu,subnet,address)|string(interface):unsigned(transport) +retval|netload|ulong(packets_in,packets_out,packets_total,bytes_in,bytes_out,bytes_total,errors_in,errors_out,errors_total,collisions)|string(interface):unsigned(transport,protocol) retval|ppp|ulong(state,bytes_in,bytes_out)|ushort(device) diff --git a/include/glibtop/netinfo.h b/include/glibtop/netinfo.h index b53d6370..512181ed 100644 --- a/include/glibtop/netinfo.h +++ b/include/glibtop/netinfo.h @@ -72,7 +72,7 @@ struct _glibtop_netinfo address; /* GLIBTOP_NETINFO_ADDRESS */ }; -#define glibtop_get_netinfo(netinfo,interface) glibtop_get_netinfo_l(glibtop_global_server, netinfo, interface) +#define glibtop_get_netinfo(netinfo,interface,transport) glibtop_get_netinfo_l(glibtop_global_server, netinfo, interface, transport) #if GLIBTOP_SUID_NETINFO #define glibtop_get_netinfo_r glibtop_get_netinfo_p @@ -80,14 +80,14 @@ struct _glibtop_netinfo #define glibtop_get_netinfo_r glibtop_get_netinfo_s #endif -int glibtop_get_netinfo_l (glibtop *server, glibtop_netinfo *buf, const char *interface); +int glibtop_get_netinfo_l (glibtop *server, glibtop_netinfo *buf, const char *interface, unsigned transport); #if GLIBTOP_SUID_NETINFO int glibtop_init_netinfo_p (glibtop *server); -int glibtop_get_netinfo_p (glibtop *server, glibtop_netinfo *buf, const char *interface); +int glibtop_get_netinfo_p (glibtop *server, glibtop_netinfo *buf, const char *interface, unsigned transport); #else int glibtop_init_netinfo_s (glibtop *server); -int glibtop_get_netinfo_s (glibtop *server, glibtop_netinfo *buf, const char *interface); +int glibtop_get_netinfo_s (glibtop *server, glibtop_netinfo *buf, const char *interface, unsigned transport); #endif #ifdef GLIBTOP_NAMES diff --git a/include/glibtop/netload.h b/include/glibtop/netload.h index 27ffa787..fe1e3238 100644 --- a/include/glibtop/netload.h +++ b/include/glibtop/netload.h @@ -63,7 +63,7 @@ struct _glibtop_netload collisions; /* GLIBTOP_NETLOAD_COLLISIONS */ }; -#define glibtop_get_netload(netload,interface) glibtop_get_netload_l(glibtop_global_server, netload, interface) +#define glibtop_get_netload(netload,interface,transport,protocol) glibtop_get_netload_l(glibtop_global_server, netload, interface, transport, protocol) #if GLIBTOP_SUID_NETLOAD #define glibtop_get_netload_r glibtop_get_netload_p @@ -71,14 +71,14 @@ struct _glibtop_netload #define glibtop_get_netload_r glibtop_get_netload_s #endif -int glibtop_get_netload_l (glibtop *server, glibtop_netload *buf, const char *interface); +int glibtop_get_netload_l (glibtop *server, glibtop_netload *buf, const char *interface, unsigned transport, unsigned protocol); #if GLIBTOP_SUID_NETLOAD int glibtop_init_netload_p (glibtop *server); -int glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, const char *interface); +int glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, const char *interface, unsigned transport, unsigned protocol); #else int glibtop_init_netload_s (glibtop *server); -int glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, const char *interface); +int glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, const char *interface, unsigned transport, unsigned protocol); #endif #ifdef GLIBTOP_NAMES diff --git a/src/daemon/main.c b/src/daemon/main.c index 7b1e8732..3744b0b1 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -50,6 +50,8 @@ handle_parent_connection (int s) u_int64_t number G_GNUC_UNUSED; u_int64_t instance G_GNUC_UNUSED; u_int64_t strategy G_GNUC_UNUSED; + u_int64_t transport G_GNUC_UNUSED; + u_int64_t protocol G_GNUC_UNUSED; glibtop_send_version (glibtop_global_server, s); @@ -233,13 +235,13 @@ handle_parent_connection (int s) break; case GLIBTOP_CMND_NETINFO: retval = glibtop_get_netinfo_l - (server, &resp->u.data.netinfo, parameter); + (server, &resp->u.data.netinfo, parameter, 0); do_output (s, resp, _offset_data (netinfo), 0, NULL, retval); break; case GLIBTOP_CMND_NETLOAD: retval = glibtop_get_netload_l - (server, &resp->u.data.netload, parameter); + (server, &resp->u.data.netload, parameter, 0, 0); do_output (s, resp, _offset_data (netload), 0, NULL, retval); break; diff --git a/src/daemon/slave.c b/src/daemon/slave.c index 05f69240..773dac30 100644 --- a/src/daemon/slave.c +++ b/src/daemon/slave.c @@ -35,6 +35,8 @@ handle_slave_connection (int input, int output) u_int64_t number G_GNUC_UNUSED; u_int64_t instance G_GNUC_UNUSED; u_int64_t strategy G_GNUC_UNUSED; + u_int64_t transport G_GNUC_UNUSED; + u_int64_t protocol G_GNUC_UNUSED; unsigned short max_len G_GNUC_UNUSED; pid_t pid G_GNUC_UNUSED; diff --git a/sysdeps/linux/netinfo.c b/sysdeps/linux/netinfo.c index 31ca9a42..0683c3b8 100644 --- a/sysdeps/linux/netinfo.c +++ b/sysdeps/linux/netinfo.c @@ -66,7 +66,7 @@ glibtop_init_netinfo_s (glibtop *server) int glibtop_get_netinfo_s (glibtop *server, glibtop_netinfo *buf, - const char *interface) + const char *interface, unsigned transport) { int skfd; diff --git a/sysdeps/linux/netload.c b/sysdeps/linux/netload.c index 745f6f26..d42c524e 100644 --- a/sysdeps/linux/netload.c +++ b/sysdeps/linux/netload.c @@ -97,7 +97,8 @@ glibtop_init_netload_s (glibtop *server) int glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, - const char *interface) + const char *interface, unsigned transport, + unsigned protocol) { char buffer [BUFSIZ], *p; int have_bytes, fields; |