Reflect latest interface changes.
This commit is contained in:
@@ -13,7 +13,7 @@ libgtop_sysdeps_suid_la_SOURCES = open.c close.c siglist.c cpu.c mem.c swap.c \
|
|||||||
sem_limits.c proclist.c procstate.c procuid.c \
|
sem_limits.c proclist.c procstate.c procuid.c \
|
||||||
proctime.c procmem.c procsignal.c prockernel.c \
|
proctime.c procmem.c procsignal.c prockernel.c \
|
||||||
procsegment.c procargs.c procmap.c netload.c \
|
procsegment.c procargs.c procmap.c netload.c \
|
||||||
ppp.c
|
interfaces.c ppp.c
|
||||||
|
|
||||||
libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO)
|
libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||||
|
|
||||||
|
@@ -45,6 +45,7 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#define GLIBTOP_SUID_PROC_ARGS (1 << GLIBTOP_SYSDEPS_PROC_ARGS)
|
#define GLIBTOP_SUID_PROC_ARGS (1 << GLIBTOP_SYSDEPS_PROC_ARGS)
|
||||||
#define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP)
|
#define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP)
|
||||||
#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
|
#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
|
||||||
|
#define GLIBTOP_SUID_INTERFACE_NAMES (1 << GLIBTOP_SYSDEPS_INTERFACE_NAMES)
|
||||||
#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
|
#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
END_LIBGTOP_DECLS
|
||||||
|
54
sysdeps/freebsd/interfaces.c
Normal file
54
sysdeps/freebsd/interfaces.c
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/error.h>
|
||||||
|
#include <glibtop/interfaces.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_interface_names =
|
||||||
|
(1L << GLIBTOP_INTERFACE_NAMES_NUMBER) +
|
||||||
|
(1L << GLIBTOP_INTERFACE_NAMES_SIZE);
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
int
|
||||||
|
glibtop_init_interface_names_p (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.interface_names = _glibtop_sysdeps_interface_names;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides network statistics. */
|
||||||
|
|
||||||
|
char *
|
||||||
|
glibtop_get_interface_names_p (glibtop *server, glibtop_interface_names *buf,
|
||||||
|
unsigned interface, unsigned number,
|
||||||
|
unsigned strategy)
|
||||||
|
{
|
||||||
|
glibtop_init_s (&server, GLIBTOP_SYSDEPS_INTERFACE_NAMES, 0);
|
||||||
|
|
||||||
|
memset (buf, 0, sizeof (glibtop_interface_names));
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
@@ -9,7 +9,8 @@ libgtop_sysdeps_la_SOURCES = open.c close.c siglist.c cpu.c mem.c \
|
|||||||
proclist.c procstate.c procuid.c \
|
proclist.c procstate.c procuid.c \
|
||||||
proctime.c procmem.c procsignal.c \
|
proctime.c procmem.c procsignal.c \
|
||||||
prockernel.c procsegment.c procargs.c \
|
prockernel.c procsegment.c procargs.c \
|
||||||
procmap.c netload.c ppp.c procdata.c
|
procmap.c netload.c ppp.c procdata.c \
|
||||||
|
interfaces.c
|
||||||
|
|
||||||
libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO)
|
libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||||
|
|
||||||
|
@@ -45,6 +45,7 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#define GLIBTOP_SUID_PROC_ARGS 0
|
#define GLIBTOP_SUID_PROC_ARGS 0
|
||||||
#define GLIBTOP_SUID_PROC_MAP 0
|
#define GLIBTOP_SUID_PROC_MAP 0
|
||||||
#define GLIBTOP_SUID_NETLOAD 0
|
#define GLIBTOP_SUID_NETLOAD 0
|
||||||
|
#define GLIBTOP_SUID_INTERFACE_NAMES 0
|
||||||
#define GLIBTOP_SUID_PPP 0
|
#define GLIBTOP_SUID_PPP 0
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
END_LIBGTOP_DECLS
|
||||||
|
54
sysdeps/solaris/interfaces.c
Normal file
54
sysdeps/solaris/interfaces.c
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/error.h>
|
||||||
|
#include <glibtop/interfaces.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_interface_names =
|
||||||
|
(1L << GLIBTOP_INTERFACE_NAMES_NUMBER) +
|
||||||
|
(1L << GLIBTOP_INTERFACE_NAMES_SIZE);
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
int
|
||||||
|
glibtop_init_interface_names_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.interface_names = _glibtop_sysdeps_interface_names;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides network statistics. */
|
||||||
|
|
||||||
|
char *
|
||||||
|
glibtop_get_interface_names_s (glibtop *server, glibtop_interface_names *buf,
|
||||||
|
unsigned interface, unsigned number,
|
||||||
|
unsigned strategy)
|
||||||
|
{
|
||||||
|
glibtop_init_s (&server, GLIBTOP_SYSDEPS_INTERFACE_NAMES, 0);
|
||||||
|
|
||||||
|
memset (buf, 0, sizeof (glibtop_interface_names));
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
@@ -9,7 +9,7 @@ libgtop_sysdeps_la_SOURCES = open.c close.c siglist.c cpu.c mem.c swap.c \
|
|||||||
sem_limits.c proclist.c procstate.c procuid.c \
|
sem_limits.c proclist.c procstate.c procuid.c \
|
||||||
proctime.c procmem.c procsignal.c prockernel.c \
|
proctime.c procmem.c procsignal.c prockernel.c \
|
||||||
procsegment.c procargs.c procmap.c netload.c \
|
procsegment.c procargs.c procmap.c netload.c \
|
||||||
ppp.c
|
interfaces.c ppp.c
|
||||||
|
|
||||||
libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO)
|
libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||||
|
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_cpu_s (glibtop *server)
|
glibtop_init_cpu_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
|
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides information about cpu usage. */
|
/* Provides information about cpu usage. */
|
||||||
@@ -40,4 +42,6 @@ int
|
|||||||
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_cpu));
|
memset (buf, 0, sizeof (glibtop_cpu));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
54
sysdeps/stub/interfaces.c
Normal file
54
sysdeps/stub/interfaces.c
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/error.h>
|
||||||
|
#include <glibtop/interfaces.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_interface_names =
|
||||||
|
(1L << GLIBTOP_INTERFACE_NAMES_NUMBER) +
|
||||||
|
(1L << GLIBTOP_INTERFACE_NAMES_SIZE);
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
int
|
||||||
|
glibtop_init_interface_names_s (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.interface_names = _glibtop_sysdeps_interface_names;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides network statistics. */
|
||||||
|
|
||||||
|
char *
|
||||||
|
glibtop_get_interface_names_s (glibtop *server, glibtop_interface_names *buf,
|
||||||
|
unsigned interface, unsigned number,
|
||||||
|
unsigned strategy)
|
||||||
|
{
|
||||||
|
glibtop_init_s (&server, GLIBTOP_SYSDEPS_INTERFACE_NAMES, 0);
|
||||||
|
|
||||||
|
memset (buf, 0, sizeof (glibtop_interface_names));
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_loadavg_s (glibtop *server)
|
glibtop_init_loadavg_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
|
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides load averange. */
|
/* Provides load averange. */
|
||||||
@@ -40,4 +42,6 @@ int
|
|||||||
glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
|
glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_loadavg));
|
memset (buf, 0, sizeof (glibtop_loadavg));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_mem_s (glibtop *server)
|
glibtop_init_mem_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.mem = _glibtop_sysdeps_mem;
|
server->sysdeps.mem = _glibtop_sysdeps_mem;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides information about memory usage. */
|
/* Provides information about memory usage. */
|
||||||
@@ -40,4 +42,6 @@ int
|
|||||||
glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
|
glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_mem));
|
memset (buf, 0, sizeof (glibtop_mem));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_msg_limits_s (glibtop *server)
|
glibtop_init_msg_limits_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
|
server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides information about sysv ipc limits. */
|
/* Provides information about sysv ipc limits. */
|
||||||
@@ -40,4 +42,6 @@ int
|
|||||||
glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf)
|
glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_msg_limits));
|
memset (buf, 0, sizeof (glibtop_msg_limits));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,8 @@ int
|
|||||||
glibtop_init_netload_s (glibtop *server)
|
glibtop_init_netload_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.netload = _glibtop_sysdeps_netload;
|
server->sysdeps.netload = _glibtop_sysdeps_netload;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides network statistics. */
|
/* Provides network statistics. */
|
||||||
@@ -42,4 +44,6 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
|
|||||||
const char *interface)
|
const char *interface)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_netload));
|
memset (buf, 0, sizeof (glibtop_netload));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,8 @@ int
|
|||||||
glibtop_init_ppp_s (glibtop *server)
|
glibtop_init_ppp_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
|
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides PPP/ISDN information. */
|
/* Provides PPP/ISDN information. */
|
||||||
@@ -41,4 +43,6 @@ int
|
|||||||
glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
|
glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_ppp));
|
memset (buf, 0, sizeof (glibtop_ppp));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -34,6 +34,8 @@ int
|
|||||||
glibtop_init_proc_args_s (glibtop *server)
|
glibtop_init_proc_args_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
|
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_proc_kernel_s (glibtop *server)
|
glibtop_init_proc_kernel_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
|
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -41,4 +43,6 @@ glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf,
|
|||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_proc_kernel));
|
memset (buf, 0, sizeof (glibtop_proc_kernel));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -34,6 +34,8 @@ int
|
|||||||
glibtop_init_proclist_s (glibtop *server)
|
glibtop_init_proclist_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proclist = _glibtop_sysdeps_proclist;
|
server->sysdeps.proclist = _glibtop_sysdeps_proclist;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fetch list of currently running processes.
|
/* Fetch list of currently running processes.
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_proc_map_s (glibtop *server)
|
glibtop_init_proc_map_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
|
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_proc_mem_s (glibtop *server)
|
glibtop_init_proc_mem_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem;
|
server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -41,4 +43,6 @@ glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf,
|
|||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_proc_mem));
|
memset (buf, 0, sizeof (glibtop_proc_mem));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_proc_segment_s (glibtop *server)
|
glibtop_init_proc_segment_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
|
server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -41,4 +43,6 @@ glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
|
|||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_proc_segment));
|
memset (buf, 0, sizeof (glibtop_proc_segment));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_proc_signal_s (glibtop *server)
|
glibtop_init_proc_signal_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
|
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -41,4 +43,6 @@ glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf,
|
|||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_proc_signal));
|
memset (buf, 0, sizeof (glibtop_proc_signal));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_proc_state_s (glibtop *server)
|
glibtop_init_proc_state_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state;
|
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -41,4 +43,6 @@ glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf,
|
|||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_proc_state));
|
memset (buf, 0, sizeof (glibtop_proc_state));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_proc_time_s (glibtop *server)
|
glibtop_init_proc_time_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
|
server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -41,4 +43,6 @@ glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf,
|
|||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_proc_time));
|
memset (buf, 0, sizeof (glibtop_proc_time));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_proc_uid_s (glibtop *server)
|
glibtop_init_proc_uid_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid;
|
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -41,4 +43,6 @@ glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf,
|
|||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_proc_uid));
|
memset (buf, 0, sizeof (glibtop_proc_uid));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_sem_limits_s (glibtop *server)
|
glibtop_init_sem_limits_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
|
server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides information about sysv sem limits. */
|
/* Provides information about sysv sem limits. */
|
||||||
@@ -40,4 +42,6 @@ int
|
|||||||
glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf)
|
glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_sem_limits));
|
memset (buf, 0, sizeof (glibtop_sem_limits));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_shm_limits_s (glibtop *server)
|
glibtop_init_shm_limits_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
|
server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides information about sysv ipc limits. */
|
/* Provides information about sysv ipc limits. */
|
||||||
@@ -40,4 +42,6 @@ int
|
|||||||
glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf)
|
glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_shm_limits));
|
memset (buf, 0, sizeof (glibtop_shm_limits));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_swap_s (glibtop *server)
|
glibtop_init_swap_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.swap = _glibtop_sysdeps_swap;
|
server->sysdeps.swap = _glibtop_sysdeps_swap;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides information about swap usage. */
|
/* Provides information about swap usage. */
|
||||||
@@ -40,4 +42,6 @@ int
|
|||||||
glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
|
glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_swap));
|
memset (buf, 0, sizeof (glibtop_swap));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,8 @@ int
|
|||||||
glibtop_init_uptime_s (glibtop *server)
|
glibtop_init_uptime_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
|
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides uptime and idle time. */
|
/* Provides uptime and idle time. */
|
||||||
@@ -40,4 +42,6 @@ int
|
|||||||
glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
|
glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_uptime));
|
memset (buf, 0, sizeof (glibtop_uptime));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -13,7 +13,7 @@ libgtop_sysdeps_suid_la_SOURCES = open.c close.c siglist.c cpu.c mem.c swap.c \
|
|||||||
sem_limits.c proclist.c procstate.c procuid.c \
|
sem_limits.c proclist.c procstate.c procuid.c \
|
||||||
proctime.c procmem.c procsignal.c prockernel.c \
|
proctime.c procmem.c procsignal.c prockernel.c \
|
||||||
procsegment.c procargs.c procmap.c netload.c \
|
procsegment.c procargs.c procmap.c netload.c \
|
||||||
ppp.c
|
interfaces.c ppp.c
|
||||||
|
|
||||||
libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO)
|
libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||||
|
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_cpu_p (glibtop *server)
|
glibtop_init_cpu_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
|
server->sysdeps.cpu = _glibtop_sysdeps_cpu;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides information about cpu usage. */
|
/* Provides information about cpu usage. */
|
||||||
@@ -45,4 +47,6 @@ glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf)
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_CPU, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_CPU, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_cpu));
|
memset (buf, 0, sizeof (glibtop_cpu));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -45,6 +45,7 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#define GLIBTOP_SUID_PROC_ARGS (1 << GLIBTOP_SYSDEPS_PROC_ARGS)
|
#define GLIBTOP_SUID_PROC_ARGS (1 << GLIBTOP_SYSDEPS_PROC_ARGS)
|
||||||
#define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP)
|
#define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP)
|
||||||
#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
|
#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
|
||||||
|
#define GLIBTOP_SUID_INTERFACE_NAMES (1 << GLIBTOP_SYSDEPS_INTERFACE_NAMES)
|
||||||
#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
|
#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
END_LIBGTOP_DECLS
|
||||||
|
54
sysdeps/stub_suid/interfaces.c
Normal file
54
sysdeps/stub_suid/interfaces.c
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/error.h>
|
||||||
|
#include <glibtop/interfaces.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_interface_names =
|
||||||
|
(1L << GLIBTOP_INTERFACE_NAMES_NUMBER) +
|
||||||
|
(1L << GLIBTOP_INTERFACE_NAMES_SIZE);
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
int
|
||||||
|
glibtop_init_interface_names_p (glibtop *server)
|
||||||
|
{
|
||||||
|
server->sysdeps.interface_names = _glibtop_sysdeps_interface_names;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides network statistics. */
|
||||||
|
|
||||||
|
char *
|
||||||
|
glibtop_get_interface_names_p (glibtop *server, glibtop_interface_names *buf,
|
||||||
|
unsigned interface, unsigned number,
|
||||||
|
unsigned strategy)
|
||||||
|
{
|
||||||
|
glibtop_init_s (&server, GLIBTOP_SYSDEPS_INTERFACE_NAMES, 0);
|
||||||
|
|
||||||
|
memset (buf, 0, sizeof (glibtop_interface_names));
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_loadavg_p (glibtop *server)
|
glibtop_init_loadavg_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
|
server->sysdeps.loadavg = _glibtop_sysdeps_loadavg;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides load averange. */
|
/* Provides load averange. */
|
||||||
@@ -45,4 +47,6 @@ glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf)
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_LOADAVG, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_LOADAVG, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_loadavg));
|
memset (buf, 0, sizeof (glibtop_loadavg));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_mem_p (glibtop *server)
|
glibtop_init_mem_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.mem = _glibtop_sysdeps_mem;
|
server->sysdeps.mem = _glibtop_sysdeps_mem;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides information about memory usage. */
|
/* Provides information about memory usage. */
|
||||||
@@ -45,4 +47,6 @@ glibtop_get_mem_p (glibtop *server, glibtop_mem *buf)
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_MEM, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_MEM, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_mem));
|
memset (buf, 0, sizeof (glibtop_mem));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_msg_limits_p (glibtop *server)
|
glibtop_init_msg_limits_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
|
server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides information about sysv ipc limits. */
|
/* Provides information about sysv ipc limits. */
|
||||||
@@ -45,4 +47,6 @@ glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_MSG_LIMITS, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_MSG_LIMITS, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_msg_limits));
|
memset (buf, 0, sizeof (glibtop_msg_limits));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,8 @@ int
|
|||||||
glibtop_init_netload_p (glibtop *server)
|
glibtop_init_netload_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.netload = _glibtop_sysdeps_netload;
|
server->sysdeps.netload = _glibtop_sysdeps_netload;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides Network statistics. */
|
/* Provides Network statistics. */
|
||||||
@@ -42,4 +44,6 @@ glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
|
|||||||
const char *interface)
|
const char *interface)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_netload));
|
memset (buf, 0, sizeof (glibtop_netload));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/open.h>
|
#include <glibtop/open.h>
|
||||||
|
#include <glibtop/close.h>
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_open_s (glibtop *server, const char *program_name,
|
glibtop_open_s (glibtop *server, const char *program_name,
|
||||||
|
@@ -33,6 +33,8 @@ int
|
|||||||
glibtop_init_ppp_p (glibtop *server)
|
glibtop_init_ppp_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
|
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides PPP/ISDN information. */
|
/* Provides PPP/ISDN information. */
|
||||||
@@ -41,4 +43,6 @@ int
|
|||||||
glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device)
|
glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_ppp));
|
memset (buf, 0, sizeof (glibtop_ppp));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -34,6 +34,8 @@ int
|
|||||||
glibtop_init_proc_args_p (glibtop *server)
|
glibtop_init_proc_args_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
|
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_proc_kernel_p (glibtop *server)
|
glibtop_init_proc_kernel_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
|
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -46,4 +48,6 @@ glibtop_get_proc_kernel_p (glibtop *server, glibtop_proc_kernel *buf,
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_KERNEL, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_KERNEL, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_kernel));
|
memset (buf, 0, sizeof (glibtop_proc_kernel));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_proclist_p (glibtop *server)
|
glibtop_init_proclist_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proclist = _glibtop_sysdeps_proclist;
|
server->sysdeps.proclist = _glibtop_sysdeps_proclist;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned *
|
unsigned *
|
||||||
|
@@ -34,6 +34,8 @@ int
|
|||||||
glibtop_init_proc_map_p (glibtop *server)
|
glibtop_init_proc_map_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
|
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_proc_mem_p (glibtop *server)
|
glibtop_init_proc_mem_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem;
|
server->sysdeps.proc_mem = _glibtop_sysdeps_proc_mem;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -46,4 +48,6 @@ glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_MEM, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_MEM, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_mem));
|
memset (buf, 0, sizeof (glibtop_proc_mem));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_proc_segment_p (glibtop *server)
|
glibtop_init_proc_segment_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
|
server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -46,4 +48,6 @@ glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf,
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_SEGMENT, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_SEGMENT, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_segment));
|
memset (buf, 0, sizeof (glibtop_proc_segment));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_proc_signal_p (glibtop *server)
|
glibtop_init_proc_signal_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
|
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -46,4 +48,6 @@ glibtop_get_proc_signal_p (glibtop *server, glibtop_proc_signal *buf,
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_SIGNAL, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_SIGNAL, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_signal));
|
memset (buf, 0, sizeof (glibtop_proc_signal));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_proc_state_p (glibtop *server)
|
glibtop_init_proc_state_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state;
|
server->sysdeps.proc_state = _glibtop_sysdeps_proc_state;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -46,4 +48,6 @@ glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf,
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_STATE, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_STATE, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_state));
|
memset (buf, 0, sizeof (glibtop_proc_state));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_proc_time_p (glibtop *server)
|
glibtop_init_proc_time_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
|
server->sysdeps.proc_time = _glibtop_sysdeps_proc_time;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -46,4 +48,6 @@ glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_TIME, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_TIME, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_time));
|
memset (buf, 0, sizeof (glibtop_proc_time));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_proc_uid_p (glibtop *server)
|
glibtop_init_proc_uid_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid;
|
server->sysdeps.proc_uid = _glibtop_sysdeps_proc_uid;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides detailed information about a process. */
|
/* Provides detailed information about a process. */
|
||||||
@@ -46,4 +48,6 @@ glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf,
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_UID, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_UID, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_uid));
|
memset (buf, 0, sizeof (glibtop_proc_uid));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_sem_limits_p (glibtop *server)
|
glibtop_init_sem_limits_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
|
server->sysdeps.sem_limits = _glibtop_sysdeps_sem_limits;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides information about sysv sem limits. */
|
/* Provides information about sysv sem limits. */
|
||||||
@@ -45,4 +47,6 @@ glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf)
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_SEM_LIMITS, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_SEM_LIMITS, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_sem_limits));
|
memset (buf, 0, sizeof (glibtop_sem_limits));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_shm_limits_p (glibtop *server)
|
glibtop_init_shm_limits_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
|
server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides information about sysv ipc limits. */
|
/* Provides information about sysv ipc limits. */
|
||||||
@@ -45,4 +47,6 @@ glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_SHM_LIMITS, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_SHM_LIMITS, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_shm_limits));
|
memset (buf, 0, sizeof (glibtop_shm_limits));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_swap_p (glibtop *server)
|
glibtop_init_swap_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.swap = _glibtop_sysdeps_swap;
|
server->sysdeps.swap = _glibtop_sysdeps_swap;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides information about swap usage. */
|
/* Provides information about swap usage. */
|
||||||
@@ -45,4 +47,6 @@ glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_SWAP, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_SWAP, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_swap));
|
memset (buf, 0, sizeof (glibtop_swap));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,8 @@ int
|
|||||||
glibtop_init_uptime_p (glibtop *server)
|
glibtop_init_uptime_p (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
|
server->sysdeps.uptime = _glibtop_sysdeps_uptime;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides uptime and idle time. */
|
/* Provides uptime and idle time. */
|
||||||
@@ -45,4 +47,6 @@ glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf)
|
|||||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_UPTIME, 0);
|
glibtop_init_p (server, GLIBTOP_SYSDEPS_UPTIME, 0);
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_uptime));
|
memset (buf, 0, sizeof (glibtop_uptime));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user