Split netload into netload and netinfo.

1999-11-28  Martin Baulig  <martin@home-of-linux.org>

	Split netload into netload and netinfo.

	* include/glibtop/netinfo.h: New file.

	* include/glibtop/netload.h (glibtop_netload): Moved `if_flags',
	`mtu', `subnet' and `address' into the new `glibtop_netinfo'.

	* include/glibtop/sysdeps.h (GLIBTOP_SYSDEPS_NETINFO): Added.
	(glibtop_sysdeps): Added `netinfo.
	* include/glibtop/union.h (glibtop_union): Added `netinfo.
	* include/glibtop/command.h (GLIBTOP_CMND_NETINFO): Added.
This commit is contained in:
Martin Baulig
1999-11-28 18:17:21 +00:00
committed by Martin Baulig
parent 53f9d03e30
commit 4a01752467
18 changed files with 366 additions and 140 deletions

View File

@@ -231,6 +231,12 @@ handle_parent_connection (int s)
(server, &resp->u.data.ppp, device);
do_output (s, resp, _offset_data (ppp), 0, NULL, retval);
break;
case GLIBTOP_CMND_NETINFO:
retval = glibtop_get_netinfo_l
(server, &resp->u.data.netinfo, parameter);
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);

View File

@@ -51,6 +51,7 @@ GLIBTOP_SUID_PROC_KERNEL +
GLIBTOP_SUID_PROC_SEGMENT +
GLIBTOP_SUID_PROC_ARGS +
GLIBTOP_SUID_PROC_MAP +
GLIBTOP_SUID_NETINFO +
GLIBTOP_SUID_NETLOAD +
GLIBTOP_SUID_INTERFACE_NAMES +
GLIBTOP_SUID_PPP;

View File

@@ -263,6 +263,12 @@ handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
resp->offset = _offset_data (proc_segment);
break;
#endif
#if GLIBTOP_SUID_NETINFO
case GLIBTOP_CMND_NETINFO:
retval = glibtop_get_netinfo_p (server, &resp->u.data.netinfo, parameter);
resp->offset = _offset_data (netload);
break;
#endif
#if GLIBTOP_SUID_NETLOAD
case GLIBTOP_CMND_NETLOAD:
retval = glibtop_get_netload_p (server, &resp->u.data.netload, parameter);