Added new feature to get PPP/ISDN support:
enum { GLIBTOP_PPP_STATE_UNKNOWN = 0, GLIBTOP_PPP_STATE_HANGUP, GLIBTOP_PPP_STATE_ONLINE }; struct _glibtop_ppp { u_int64_t flags, state, /* GLIBTOP_PPP_STATE */ bytes_in, /* GLIBTOP_PPP_BYTES_IN */ bytes_out; /* GLIBTOP_PPP_BYTES_OUT */ }; Currently only implemented in the FreeBSD port with ISDN via I4B. - Martin
This commit is contained in:
@@ -45,7 +45,8 @@ GLIBTOP_SUID_PROC_TIME +
|
||||
GLIBTOP_SUID_PROC_SIGNAL +
|
||||
GLIBTOP_SUID_PROC_KERNEL +
|
||||
GLIBTOP_SUID_PROC_SEGMENT +
|
||||
GLIBTOP_SUID_PROC_MAP;
|
||||
GLIBTOP_SUID_PROC_MAP +
|
||||
GLIBTOP_SUID_PPP;
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <locale.h>
|
||||
|
@@ -101,6 +101,7 @@ handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
|
||||
const void *parameter)
|
||||
{
|
||||
glibtop *server = glibtop_global_server;
|
||||
unsigned short device;
|
||||
pid_t pid;
|
||||
|
||||
switch (cmnd->command) {
|
||||
@@ -213,6 +214,13 @@ handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
|
||||
(server, &resp->u.data.proc_segment, pid);
|
||||
resp->offset = _offset_data (proc_segment);
|
||||
break;
|
||||
#endif
|
||||
#if GLIBTOP_SUID_PPP
|
||||
case GLIBTOP_CMND_PPP:
|
||||
memcpy (&device, parameter, sizeof (unsigned short));
|
||||
glibtop_get_ppp_p (server, &resp->u.data.ppp, device);
|
||||
resp->offset = _offset_data (ppp);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
glibtop_error ("Child received unknown command %u",
|
||||
|
Reference in New Issue
Block a user