diff options
author | Martin Baulig <martin@src.gnome.org> | 1998-10-26 10:39:14 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 1998-10-26 10:39:14 +0000 |
commit | 1289b92d063f31d7ec3675f0956d86dfcdc63b23 (patch) | |
tree | f3cd9f31c9bbf351c0d3d4cbd5cd935a349b9ca3 /sysdeps | |
parent | bdc4e08454cb6d175f4e6e36e5a63aa46dae09b5 (diff) | |
download | libgtop-1289b92d063f31d7ec3675f0956d86dfcdc63b23.tar.gz |
Added new features to get network load:
typedef struct _glibtop_netload glibtop_netload;
struct _glibtop_netload
{
u_int64_t flags,
mtu, /* GLIBTOP_NETLOAD_MTU */
address, /* GLIBTOP_NETLOAD_ADDRESS */
packets_in, /* GLIBTOP_NETLOAD_PACKETS_IN */
packets_out, /* GLIBTOP_NETLOAD_PACKETS_OUT */
bytes_in, /* GLIBTOP_NETLOAD_BYTES_IN */
bytes_out, /* GLIBTOP_NETLOAD_BYTES_OUT */
errors_in, /* GLIBTOP_NETLOAD_ERRORS_IN */
errors_out, /* GLIBTOP_NETLOAD_ERRORS_OUT */
collisions; /* GLIBTOP_NETLOAD_COLLISIONS */
};
Returns network load of the given interface, it is specified as string
like `isppp' or `ippp0':
extern void glibtop_get_netload_l __P((glibtop *, glibtop_netload *, const char *));
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/common/sysdeps_suid.c | 3 | ||||
-rw-r--r-- | sysdeps/freebsd/ChangeLog | 4 | ||||
-rw-r--r-- | sysdeps/freebsd/Makefile.am | 3 | ||||
-rw-r--r-- | sysdeps/freebsd/glibtop_server.h | 1 | ||||
-rw-r--r-- | sysdeps/freebsd/netload.c | 43 | ||||
-rw-r--r-- | sysdeps/kernel/ChangeLog | 4 | ||||
-rw-r--r-- | sysdeps/kernel/Makefile.am | 2 | ||||
-rw-r--r-- | sysdeps/kernel/glibtop_server.h | 3 | ||||
-rw-r--r-- | sysdeps/kernel/netload.c | 43 | ||||
-rw-r--r-- | sysdeps/linux/ChangeLog | 4 | ||||
-rw-r--r-- | sysdeps/linux/Makefile.am | 2 | ||||
-rw-r--r-- | sysdeps/linux/glibtop_server.h | 3 | ||||
-rw-r--r-- | sysdeps/linux/netload.c | 43 | ||||
-rw-r--r-- | sysdeps/names/Makefile.am | 3 | ||||
-rw-r--r-- | sysdeps/names/netload.c | 59 | ||||
-rw-r--r-- | sysdeps/stub/ChangeLog | 4 | ||||
-rw-r--r-- | sysdeps/stub/Makefile.am | 3 | ||||
-rw-r--r-- | sysdeps/stub/glibtop_server.h | 3 | ||||
-rw-r--r-- | sysdeps/stub/netload.c | 43 | ||||
-rw-r--r-- | sysdeps/stub_suid/ChangeLog | 4 | ||||
-rw-r--r-- | sysdeps/stub_suid/Makefile.am | 3 | ||||
-rw-r--r-- | sysdeps/stub_suid/glibtop_server.h | 4 | ||||
-rw-r--r-- | sysdeps/stub_suid/netload.c | 43 |
23 files changed, 321 insertions, 6 deletions
diff --git a/sysdeps/common/sysdeps_suid.c b/sysdeps/common/sysdeps_suid.c index dea87167..f729140b 100644 --- a/sysdeps/common/sysdeps_suid.c +++ b/sysdeps/common/sysdeps_suid.c @@ -77,6 +77,9 @@ glibtop_init_func_t _glibtop_init_hook_p [] = { #if GLIBTOP_SUID_PROC_MAP glibtop_init_proc_map_p, #endif +#if GLIBTOP_SUID_NETLOAD + glibtop_init_netload_p, +#endif #if GLIBTOP_SUID_PPP glibtop_init_ppp_p, #endif diff --git a/sysdeps/freebsd/ChangeLog b/sysdeps/freebsd/ChangeLog index 17bb517a..fe9fc503 100644 --- a/sysdeps/freebsd/ChangeLog +++ b/sysdeps/freebsd/ChangeLog @@ -1,5 +1,9 @@ 1998-10-26 Martin Baulig <martin@home-of-linux.org> + * netload.c: New file. Currently empty. + +1998-10-26 Martin Baulig <martin@home-of-linux.org> + * procargs.c: New file to get command line arguments. 1998-10-25 Martin Baulig <martin@home-of-linux.org> diff --git a/sysdeps/freebsd/Makefile.am b/sysdeps/freebsd/Makefile.am index 0e84b8ff..d4097701 100644 --- a/sysdeps/freebsd/Makefile.am +++ b/sysdeps/freebsd/Makefile.am @@ -10,7 +10,8 @@ libgtop_sysdeps_suid_la_SOURCES = open.c close.c siglist.c cpu.c mem.c swap.c \ uptime.c loadavg.c shm_limits.c msg_limits.c \ sem_limits.c proclist.c procstate.c procuid.c \ proctime.c procmem.c procsignal.c prockernel.c \ - procsegment.c procargs.c procmap.c ppp.c + procsegment.c procargs.c procmap.c netload.c \ + ppp.c libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO) diff --git a/sysdeps/freebsd/glibtop_server.h b/sysdeps/freebsd/glibtop_server.h index a87a1ffb..ab051092 100644 --- a/sysdeps/freebsd/glibtop_server.h +++ b/sysdeps/freebsd/glibtop_server.h @@ -42,6 +42,7 @@ __BEGIN_DECLS #define GLIBTOP_SUID_PROC_SEGMENT (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT) #define GLIBTOP_SUID_PROC_ARGS (1 << GLIBTOP_SYSDEPS_PROC_ARGS) #define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP) +#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD) #define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP) __END_DECLS diff --git a/sysdeps/freebsd/netload.c b/sysdeps/freebsd/netload.c new file mode 100644 index 00000000..e8ecaa3c --- /dev/null +++ b/sysdeps/freebsd/netload.c @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the Gnome Top Library. + Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998. + + The Gnome Top Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Gnome Top Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. 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/netload.h> + +static const unsigned long _glibtop_sysdeps_netload = 0; + +/* Init function. */ + +void +glibtop_init_netload_p (glibtop *server) +{ + server->sysdeps.netload = _glibtop_sysdeps_netload; +} + +/* Provides Network statistics. */ + +void +glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, + const char *interface) +{ + memset (buf, 0, sizeof (glibtop_netload)); +} diff --git a/sysdeps/kernel/ChangeLog b/sysdeps/kernel/ChangeLog index 12c7afd7..bfca82c0 100644 --- a/sysdeps/kernel/ChangeLog +++ b/sysdeps/kernel/ChangeLog @@ -1,5 +1,9 @@ 1998-10-26 Martin Baulig <martin@home-of-linux.org> + * netload.c: New file. Currently empty. + +1998-10-26 Martin Baulig <martin@home-of-linux.org> + * procargs.c: New file. Currently empty. 1998-10-25 Martin Baulig <martin@home-of-linux.org> diff --git a/sysdeps/kernel/Makefile.am b/sysdeps/kernel/Makefile.am index 2c17a4c1..e3cb860f 100644 --- a/sysdeps/kernel/Makefile.am +++ b/sysdeps/kernel/Makefile.am @@ -9,7 +9,7 @@ libgtop_sysdeps_la_SOURCES = open.c close.c kernel.s cpu.c mem.c swap.c \ sem_limits.c proclist.c procstate.c procuid.c \ proctime.c procmem.c procsignal.c prockernel.c \ procsegment.c siglist.c procargs.c procmap.c \ - ppp.c + netload.c ppp.c libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO) diff --git a/sysdeps/kernel/glibtop_server.h b/sysdeps/kernel/glibtop_server.h index 23664c12..48485001 100644 --- a/sysdeps/kernel/glibtop_server.h +++ b/sysdeps/kernel/glibtop_server.h @@ -40,7 +40,10 @@ __BEGIN_DECLS #define GLIBTOP_SUID_PROC_SIGNAL 0 #define GLIBTOP_SUID_PROC_KERNEL 0 #define GLIBTOP_SUID_PROC_SEGMENT 0 +#define GLIBTOP_SUID_PROC_ARGS 0 #define GLIBTOP_SUID_PROC_MAP 0 +#define GLIBTOP_SUID_NETLOAD 0 +#define GLIBTOP_SUID_PPP 0 __END_DECLS diff --git a/sysdeps/kernel/netload.c b/sysdeps/kernel/netload.c new file mode 100644 index 00000000..cbaac4f5 --- /dev/null +++ b/sysdeps/kernel/netload.c @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the Gnome Top Library. + Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998. + + The Gnome Top Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Gnome Top Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. 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/netload.h> + +static const unsigned long _glibtop_sysdeps_netload = 0; + +/* Init function. */ + +void +glibtop_init_netload_s (glibtop *server) +{ + server->sysdeps.netload = _glibtop_sysdeps_netload; +} + +/* Provides network statistics. */ + +void +glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, + const char *interface) +{ + memset (buf, 0, sizeof (glibtop_netload)); +} diff --git a/sysdeps/linux/ChangeLog b/sysdeps/linux/ChangeLog index 86efa045..b5965e85 100644 --- a/sysdeps/linux/ChangeLog +++ b/sysdeps/linux/ChangeLog @@ -1,5 +1,9 @@ 1998-10-26 Martin Baulig <martin@home-of-linux.org> + * netload.c: New file. Currently empty. + +1998-10-26 Martin Baulig <martin@home-of-linux.org> + * procargs.c: New file. Currently empty. 1998-10-25 Martin Baulig <martin@home-of-linux.org> diff --git a/sysdeps/linux/Makefile.am b/sysdeps/linux/Makefile.am index fa236d69..04b2c36d 100644 --- a/sysdeps/linux/Makefile.am +++ b/sysdeps/linux/Makefile.am @@ -9,7 +9,7 @@ libgtop_sysdeps_la_SOURCES = open.c close.c cpu.c mem.c swap.c \ sem_limits.c proclist.c procstate.c procuid.c \ proctime.c procmem.c procsignal.c prockernel.c \ procsegment.c procargs.c procmap.c siglist.c \ - sysinfo.c ppp.c + sysinfo.c netload.c ppp.c libgtop_sysdeps_la_LIBADD = @GLIB_LIBS@ libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO) diff --git a/sysdeps/linux/glibtop_server.h b/sysdeps/linux/glibtop_server.h index 67bd9d38..ed03578e 100644 --- a/sysdeps/linux/glibtop_server.h +++ b/sysdeps/linux/glibtop_server.h @@ -122,7 +122,10 @@ proc_stat_after_cmd (char *p) #define GLIBTOP_SUID_PROC_SIGNAL 0 #define GLIBTOP_SUID_PROC_KERNEL 0 #define GLIBTOP_SUID_PROC_SEGMENT 0 +#define GLIBTOP_SUID_PROC_ARGS 0 #define GLIBTOP_SUID_PROC_MAP 0 +#define GLIBTOP_SUID_NETLOAD 0 +#define GLIBTOP_SUID_PPP 0 __END_DECLS diff --git a/sysdeps/linux/netload.c b/sysdeps/linux/netload.c new file mode 100644 index 00000000..cbaac4f5 --- /dev/null +++ b/sysdeps/linux/netload.c @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the Gnome Top Library. + Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998. + + The Gnome Top Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Gnome Top Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. 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/netload.h> + +static const unsigned long _glibtop_sysdeps_netload = 0; + +/* Init function. */ + +void +glibtop_init_netload_s (glibtop *server) +{ + server->sysdeps.netload = _glibtop_sysdeps_netload; +} + +/* Provides network statistics. */ + +void +glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, + const char *interface) +{ + memset (buf, 0, sizeof (glibtop_netload)); +} diff --git a/sysdeps/names/Makefile.am b/sysdeps/names/Makefile.am index 93969ff4..2039573d 100644 --- a/sysdeps/names/Makefile.am +++ b/sysdeps/names/Makefile.am @@ -9,7 +9,8 @@ libgtop_names_la_SOURCES = cpu.c mem.c swap.c uptime.c loadavg.c \ proclist.c sysdeps.c procstate.c procuid.c \ proctime.c procmem.c procsignal.c \ prockernel.c procsegment.c fsusage.c \ - mountlist.c procargs.c procmap.c ppp.c + mountlist.c procargs.c procmap.c netload.c \ + ppp.c libgtop_names_la_LDFLAGS = $(LT_VERSION_INFO) diff --git a/sysdeps/names/netload.c b/sysdeps/names/netload.c new file mode 100644 index 00000000..4dc75dd4 --- /dev/null +++ b/sysdeps/names/netload.c @@ -0,0 +1,59 @@ +/* $Id$ */ + +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the Gnome Top Library. + Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998. + + The Gnome Top Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Gnome Top Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include <glibtop/netload.h> + +const char *glibtop_names_netload [GLIBTOP_MAX_NETLOAD] = +{ + "mtu", "packets_in", "packets_out", "bytes_in", "bytes_out", + "errors_in", "errors_out", "collisions" +}; + +const unsigned glibtop_types_netload [GLIBTOP_MAX_NETLOAD] = +{ + GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, + GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, + GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG +}; + +const char *glibtop_labels_netload [GLIBTOP_MAX_NETLOAD] = +{ + N_("MTU"), + N_("Packets In"), + N_("Packets Out"), + N_("Bytes In"), + N_("Bytes Out"), + N_("Errors In"), + N_("Errors Out"), + N_("Collisions") +}; + +const char *glibtop_descriptions_netload [GLIBTOP_MAX_NETLOAD] = +{ + N_("Maximum Transfer Unit"), + N_("Packets In"), + N_("Packets Out"), + N_("Bytes In"), + N_("Bytes Out"), + N_("Errors In"), + N_("Errors Out"), + N_("Collisions") +}; diff --git a/sysdeps/stub/ChangeLog b/sysdeps/stub/ChangeLog index b2166344..16470426 100644 --- a/sysdeps/stub/ChangeLog +++ b/sysdeps/stub/ChangeLog @@ -1,5 +1,9 @@ 1998-10-26 Martin Baulig <martin@home-of-linux.org> + * netload.c: New file. + +1998-10-26 Martin Baulig <martin@home-of-linux.org> + * procargs.c: New file. 1998-10-25 Martin Baulig <martin@home-of-linux.org> diff --git a/sysdeps/stub/Makefile.am b/sysdeps/stub/Makefile.am index 549444f0..2f82cd78 100644 --- a/sysdeps/stub/Makefile.am +++ b/sysdeps/stub/Makefile.am @@ -8,7 +8,8 @@ libgtop_sysdeps_la_SOURCES = open.c close.c siglist.c cpu.c mem.c swap.c \ uptime.c loadavg.c shm_limits.c msg_limits.c \ sem_limits.c proclist.c procstate.c procuid.c \ proctime.c procmem.c procsignal.c prockernel.c \ - procsegment.c procargs.c procmap.c ppp.c + procsegment.c procargs.c procmap.c netload.c \ + ppp.c libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO) diff --git a/sysdeps/stub/glibtop_server.h b/sysdeps/stub/glibtop_server.h index 23664c12..48485001 100644 --- a/sysdeps/stub/glibtop_server.h +++ b/sysdeps/stub/glibtop_server.h @@ -40,7 +40,10 @@ __BEGIN_DECLS #define GLIBTOP_SUID_PROC_SIGNAL 0 #define GLIBTOP_SUID_PROC_KERNEL 0 #define GLIBTOP_SUID_PROC_SEGMENT 0 +#define GLIBTOP_SUID_PROC_ARGS 0 #define GLIBTOP_SUID_PROC_MAP 0 +#define GLIBTOP_SUID_NETLOAD 0 +#define GLIBTOP_SUID_PPP 0 __END_DECLS diff --git a/sysdeps/stub/netload.c b/sysdeps/stub/netload.c new file mode 100644 index 00000000..cbaac4f5 --- /dev/null +++ b/sysdeps/stub/netload.c @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the Gnome Top Library. + Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998. + + The Gnome Top Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Gnome Top Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. 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/netload.h> + +static const unsigned long _glibtop_sysdeps_netload = 0; + +/* Init function. */ + +void +glibtop_init_netload_s (glibtop *server) +{ + server->sysdeps.netload = _glibtop_sysdeps_netload; +} + +/* Provides network statistics. */ + +void +glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, + const char *interface) +{ + memset (buf, 0, sizeof (glibtop_netload)); +} diff --git a/sysdeps/stub_suid/ChangeLog b/sysdeps/stub_suid/ChangeLog index e66eacd2..0017acbd 100644 --- a/sysdeps/stub_suid/ChangeLog +++ b/sysdeps/stub_suid/ChangeLog @@ -1,5 +1,9 @@ 1998-10-26 Martin Baulig <martin@home-of-linux.org> + * netload.c: New file. + +1998-10-26 Martin Baulig <martin@home-of-linux.org> + * procargs.c: New file. * procmap.c: New file. diff --git a/sysdeps/stub_suid/Makefile.am b/sysdeps/stub_suid/Makefile.am index 55ef0c2d..eeb9f146 100644 --- a/sysdeps/stub_suid/Makefile.am +++ b/sysdeps/stub_suid/Makefile.am @@ -12,7 +12,8 @@ libgtop_sysdeps_suid_la_SOURCES = open.c close.c siglist.c cpu.c mem.c swap.c \ uptime.c loadavg.c shm_limits.c msg_limits.c \ sem_limits.c proclist.c procstate.c procuid.c \ proctime.c procmem.c procsignal.c prockernel.c \ - procsegment.c procargs.c procmap.c ppp.c + procsegment.c procargs.c procmap.c netload.c \ + ppp.c libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO) diff --git a/sysdeps/stub_suid/glibtop_server.h b/sysdeps/stub_suid/glibtop_server.h index 4b37edfc..ab051092 100644 --- a/sysdeps/stub_suid/glibtop_server.h +++ b/sysdeps/stub_suid/glibtop_server.h @@ -40,6 +40,10 @@ __BEGIN_DECLS #define GLIBTOP_SUID_PROC_SIGNAL (1 << GLIBTOP_SYSDEPS_PROC_SIGNAL) #define GLIBTOP_SUID_PROC_KERNEL (1 << GLIBTOP_SYSDEPS_PROC_KERNEL) #define GLIBTOP_SUID_PROC_SEGMENT (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT) +#define GLIBTOP_SUID_PROC_ARGS (1 << GLIBTOP_SYSDEPS_PROC_ARGS) +#define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP) +#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD) +#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP) __END_DECLS diff --git a/sysdeps/stub_suid/netload.c b/sysdeps/stub_suid/netload.c new file mode 100644 index 00000000..e8ecaa3c --- /dev/null +++ b/sysdeps/stub_suid/netload.c @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the Gnome Top Library. + Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998. + + The Gnome Top Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The Gnome Top Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. 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/netload.h> + +static const unsigned long _glibtop_sysdeps_netload = 0; + +/* Init function. */ + +void +glibtop_init_netload_p (glibtop *server) +{ + server->sysdeps.netload = _glibtop_sysdeps_netload; +} + +/* Provides Network statistics. */ + +void +glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, + const char *interface) +{ + memset (buf, 0, sizeof (glibtop_netload)); +} |