summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/common/sysdeps_suid.c3
-rw-r--r--sysdeps/freebsd/ChangeLog9
-rw-r--r--sysdeps/freebsd/Makefile.am2
-rw-r--r--sysdeps/freebsd/glibtop_server.h1
-rw-r--r--sysdeps/freebsd/ppp.c131
-rw-r--r--sysdeps/kernel/ChangeLog4
-rw-r--r--sysdeps/kernel/Makefile.am2
-rw-r--r--sysdeps/kernel/ppp.c42
-rw-r--r--sysdeps/linux/ChangeLog4
-rw-r--r--sysdeps/linux/Makefile.am3
-rw-r--r--sysdeps/linux/ppp.c42
-rw-r--r--sysdeps/names/Makefile.am2
-rw-r--r--sysdeps/names/ppp.c46
-rw-r--r--sysdeps/osf1/ChangeLog5
-rw-r--r--sysdeps/osf1/Makefile.am2
-rw-r--r--sysdeps/osf1/ppp.c42
-rw-r--r--sysdeps/stub/ChangeLog4
-rw-r--r--sysdeps/stub/Makefile.am2
-rw-r--r--sysdeps/stub/ppp.c42
-rw-r--r--sysdeps/stub_suid/ChangeLog5
-rw-r--r--sysdeps/stub_suid/Makefile.am2
-rw-r--r--sysdeps/stub_suid/ppp.c42
-rw-r--r--sysdeps/sun4/ChangeLog4
-rw-r--r--sysdeps/sun4/Makefile.am2
-rw-r--r--sysdeps/sun4/ppp.c42
25 files changed, 477 insertions, 8 deletions
diff --git a/sysdeps/common/sysdeps_suid.c b/sysdeps/common/sysdeps_suid.c
index 318c9388..05c6224e 100644
--- a/sysdeps/common/sysdeps_suid.c
+++ b/sysdeps/common/sysdeps_suid.c
@@ -74,6 +74,9 @@ glibtop_init_func_t _glibtop_init_hook_p [] = {
#if GLIBTOP_SUID_PROC_MAP
glibtop_init_proc_map_p,
#endif
+#if GLIBTOP_SUID_PPP
+ glibtop_init_ppp_p,
+#endif
NULL
};
diff --git a/sysdeps/freebsd/ChangeLog b/sysdeps/freebsd/ChangeLog
index c50e49f5..d2f847ac 100644
--- a/sysdeps/freebsd/ChangeLog
+++ b/sysdeps/freebsd/ChangeLog
@@ -1,3 +1,12 @@
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ppp.c: New file to get PPP/ISDN statistics. Currently this only
+ get ISDN statistics if you have the I4B package.
+
+ To get the number of bytes transferred in/out you need to read the
+ file `misc/i4b_acct.txt' in the LibGTop source directory to see
+ how to enable this.
+
1998-10-03 Martin Baulig <martin@home-of-linux.org>
* procstate.c (glibtop_get_procstate_s): Use correct values for
diff --git a/sysdeps/freebsd/Makefile.am b/sysdeps/freebsd/Makefile.am
index 945d4292..7d508540 100644
--- a/sysdeps/freebsd/Makefile.am
+++ b/sysdeps/freebsd/Makefile.am
@@ -10,7 +10,7 @@ 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 procmap.c
+ procsegment.c procmap.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 199991ac..8ade7f5f 100644
--- a/sysdeps/freebsd/glibtop_server.h
+++ b/sysdeps/freebsd/glibtop_server.h
@@ -41,6 +41,7 @@ __BEGIN_DECLS
#define GLIBTOP_SUID_PROC_KERNEL (1 << GLIBTOP_SYSDEPS_PROC_KERNEL)
#define GLIBTOP_SUID_PROC_SEGMENT (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT)
#define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP)
+#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
__END_DECLS
diff --git a/sysdeps/freebsd/ppp.c b/sysdeps/freebsd/ppp.c
new file mode 100644
index 00000000..f535e818
--- /dev/null
+++ b/sysdeps/freebsd/ppp.c
@@ -0,0 +1,131 @@
+/* $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/ppp.h>
+
+#include <glibtop_suid.h>
+
+#ifdef HAVE_I4B
+
+#include <net/if.h>
+#include <net/if_types.h>
+#include <net/netisr.h>
+#include <net/route.h>
+
+#ifdef __FreeBSD__
+#include <net/if_sppp.h>
+#else
+#include <i4b/sppp/if_sppp.h>
+#endif
+
+/* Read `misc/i4b_acct.txt' for details ... */
+#ifdef HAVE_I4B_ACCT
+#include <machine/i4b_acct.h>
+#endif
+
+static const unsigned long _glibtop_sysdeps_ppp =
+(1 << GLIBTOP_PPP_STATE);
+
+#ifdef HAVE_I4B_ACCT
+static const unsigned long _glibtop_sysdeps_ppp_acct =
+(1 << GLIBTOP_PPP_BYTES_IN) + (1 << GLIBTOP_PPP_BYTES_OUT);
+#endif
+
+#endif /* HAVE_I4B */
+
+/* nlist structure for kernel access */
+static struct nlist nlst [] = {
+#ifdef HAVE_I4B
+ { "_i4bisppp_softc" },
+#endif
+ { 0 }
+};
+
+/* Init function. */
+
+void
+glibtop_init_ppp_p (glibtop *server)
+{
+#ifdef HAVE_I4B
+#ifdef HAVE_I4B_ACCT
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp |
+ _glibtop_sysdeps_ppp_acct;
+#else
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+#endif
+#endif /* HAVE_I4B */
+
+ if (kvm_nlist (server->machine.kd, nlst) != 0)
+ glibtop_error_io_r (server, "kvm_nlist");
+}
+
+/* Provides information about ppp usage. */
+
+void
+glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+#ifdef HAVE_I4B
+#ifdef HAVE_I4B_ACCT
+ struct i4bisppp_softc data;
+#else
+ struct sppp data;
+#endif
+ int phase;
+
+ glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PPP), 0);
+
+ memset (buf, 0, sizeof (glibtop_ppp));
+
+ if (kvm_read (server->machine.kd, nlst [0].n_value,
+ &data, sizeof (data)) != sizeof (data))
+ glibtop_error_io_r (server, "kvm_read (i4bisppp_softc)");
+
+#ifdef HAVE_I4B_ACCT
+ phase = data.sc_if_un.scu_sp.pp_phase;
+#else
+ phase = data.pp_phase;
+#endif
+
+ switch (phase) {
+ case PHASE_DEAD:
+ case PHASE_TERMINATE:
+ buf->state = GLIBTOP_PPP_STATE_HANGUP;
+ break;
+ case PHASE_ESTABLISH:
+ case PHASE_NETWORK:
+ buf->state = GLIBTOP_PPP_STATE_ONLINE;
+ break;
+ default:
+ buf->state = GLIBTOP_PPP_STATE_UNKNOWN;
+ break;
+ }
+
+ buf->flags = _glibtop_sysdeps_ppp;
+
+#ifdef HAVE_I4B_ACCT
+ buf->bytes_in = data.sc_iinb;
+ buf->bytes_out = data.sc_ioutb;
+ buf->flags |= _glibtop_sysdeps_ppp_acct;
+#endif
+#endif /* HAVE_I4B */
+}
diff --git a/sysdeps/kernel/ChangeLog b/sysdeps/kernel/ChangeLog
index 75705a78..bbb1ec84 100644
--- a/sysdeps/kernel/ChangeLog
+++ b/sysdeps/kernel/ChangeLog
@@ -1,3 +1,7 @@
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ppp.c: New file. Currently empty.
+
1998-06-14 Martin Baulig <martin@home-of-linux.org>
* kernel.s: New file - declaration of the table () function
diff --git a/sysdeps/kernel/Makefile.am b/sysdeps/kernel/Makefile.am
index 9515f644..4be82da9 100644
--- a/sysdeps/kernel/Makefile.am
+++ b/sysdeps/kernel/Makefile.am
@@ -8,7 +8,7 @@ libgtop_sysdeps_la_SOURCES = open.c close.c kernel.s 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 siglist.c procmap.c
+ procsegment.c siglist.c procmap.c ppp.c
libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO)
diff --git a/sysdeps/kernel/ppp.c b/sysdeps/kernel/ppp.c
new file mode 100644
index 00000000..b81dfdb2
--- /dev/null
+++ b/sysdeps/kernel/ppp.c
@@ -0,0 +1,42 @@
+/* $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/ppp.h>
+
+static const unsigned long _glibtop_sysdeps_ppp = 0;
+
+/* Init function. */
+
+void
+glibtop_init_ppp_s (glibtop *server)
+{
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+}
+
+/* Provides PPP/ISDN information. */
+
+void
+glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+ memset (buf, 0, sizeof (glibtop_ppp));
+}
diff --git a/sysdeps/linux/ChangeLog b/sysdeps/linux/ChangeLog
index 0724df2b..789bc8d2 100644
--- a/sysdeps/linux/ChangeLog
+++ b/sysdeps/linux/ChangeLog
@@ -1,3 +1,7 @@
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ppp.c: New file. Currently empty.
+
1998-10-11 Martin Baulig <martin@home-of-linux.org>
* procdata.c: Removed this obsolete file.
diff --git a/sysdeps/linux/Makefile.am b/sysdeps/linux/Makefile.am
index a99f5e86..38b33490 100644
--- a/sysdeps/linux/Makefile.am
+++ b/sysdeps/linux/Makefile.am
@@ -8,7 +8,8 @@ libgtop_sysdeps_la_SOURCES = open.c close.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 procmap.c siglist.c sysinfo.c
+ procsegment.c procmap.c siglist.c sysinfo.c \
+ ppp.c
libgtop_sysdeps_la_LIBADD = @GLIB_LIBS@
libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO)
diff --git a/sysdeps/linux/ppp.c b/sysdeps/linux/ppp.c
new file mode 100644
index 00000000..b81dfdb2
--- /dev/null
+++ b/sysdeps/linux/ppp.c
@@ -0,0 +1,42 @@
+/* $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/ppp.h>
+
+static const unsigned long _glibtop_sysdeps_ppp = 0;
+
+/* Init function. */
+
+void
+glibtop_init_ppp_s (glibtop *server)
+{
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+}
+
+/* Provides PPP/ISDN information. */
+
+void
+glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+ memset (buf, 0, sizeof (glibtop_ppp));
+}
diff --git a/sysdeps/names/Makefile.am b/sysdeps/names/Makefile.am
index d282c559..c034b326 100644
--- a/sysdeps/names/Makefile.am
+++ b/sysdeps/names/Makefile.am
@@ -9,7 +9,7 @@ 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 procmap.c
+ mountlist.c procmap.c ppp.c
libgtop_names_la_LDFLAGS = $(LT_VERSION_INFO)
diff --git a/sysdeps/names/ppp.c b/sysdeps/names/ppp.c
new file mode 100644
index 00000000..5a872589
--- /dev/null
+++ b/sysdeps/names/ppp.c
@@ -0,0 +1,46 @@
+/* $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/ppp.h>
+
+const char *glibtop_names_ppp [GLIBTOP_MAX_PPP] =
+{
+ "state", "bytes_in", "bytes_out"
+};
+
+const unsigned glibtop_types_ppp [GLIBTOP_MAX_PPP] =
+{
+ GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
+};
+
+const char *glibtop_labels_ppp [GLIBTOP_MAX_PPP] =
+{
+ N_("PPP State"),
+ N_("Input bytes"),
+ N_("Output bytes")
+};
+
+const char *glibtop_descriptions_ppp [GLIBTOP_MAX_PPP] =
+{
+ N_("PPP State"),
+ N_("Number of input bytes"),
+ N_("Number of output bytes")
+};
diff --git a/sysdeps/osf1/ChangeLog b/sysdeps/osf1/ChangeLog
new file mode 100644
index 00000000..37833c17
--- /dev/null
+++ b/sysdeps/osf1/ChangeLog
@@ -0,0 +1,5 @@
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ChangeLog: New file.
+ * ppp.c: New file.
+
diff --git a/sysdeps/osf1/Makefile.am b/sysdeps/osf1/Makefile.am
index e981e468..3bd53770 100644
--- a/sysdeps/osf1/Makefile.am
+++ b/sysdeps/osf1/Makefile.am
@@ -6,7 +6,7 @@ lib_LTLIBRARIES = libgtop_sysdeps.la libgtop_sysdeps_suid.la
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
+ sem_limits.c ppp.c
libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO)
libgtop_sysdeps_la_LIBADD = -lmach
diff --git a/sysdeps/osf1/ppp.c b/sysdeps/osf1/ppp.c
new file mode 100644
index 00000000..b81dfdb2
--- /dev/null
+++ b/sysdeps/osf1/ppp.c
@@ -0,0 +1,42 @@
+/* $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/ppp.h>
+
+static const unsigned long _glibtop_sysdeps_ppp = 0;
+
+/* Init function. */
+
+void
+glibtop_init_ppp_s (glibtop *server)
+{
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+}
+
+/* Provides PPP/ISDN information. */
+
+void
+glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+ memset (buf, 0, sizeof (glibtop_ppp));
+}
diff --git a/sysdeps/stub/ChangeLog b/sysdeps/stub/ChangeLog
index 23d83483..68ebbf4d 100644
--- a/sysdeps/stub/ChangeLog
+++ b/sysdeps/stub/ChangeLog
@@ -1,3 +1,7 @@
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ppp.c: New file.
+
1998-08-24 Martin Baulig <martin@home-of-linux.org>
* *.c: Added initialization functions `glibtop_init_<feature>_s'.
diff --git a/sysdeps/stub/Makefile.am b/sysdeps/stub/Makefile.am
index 0266d8fd..e9636df1 100644
--- a/sysdeps/stub/Makefile.am
+++ b/sysdeps/stub/Makefile.am
@@ -8,7 +8,7 @@ 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 procmap.c
+ procsegment.c procmap.c ppp.c
libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO)
diff --git a/sysdeps/stub/ppp.c b/sysdeps/stub/ppp.c
new file mode 100644
index 00000000..b81dfdb2
--- /dev/null
+++ b/sysdeps/stub/ppp.c
@@ -0,0 +1,42 @@
+/* $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/ppp.h>
+
+static const unsigned long _glibtop_sysdeps_ppp = 0;
+
+/* Init function. */
+
+void
+glibtop_init_ppp_s (glibtop *server)
+{
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+}
+
+/* Provides PPP/ISDN information. */
+
+void
+glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+ memset (buf, 0, sizeof (glibtop_ppp));
+}
diff --git a/sysdeps/stub_suid/ChangeLog b/sysdeps/stub_suid/ChangeLog
new file mode 100644
index 00000000..37833c17
--- /dev/null
+++ b/sysdeps/stub_suid/ChangeLog
@@ -0,0 +1,5 @@
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ChangeLog: New file.
+ * ppp.c: New file.
+
diff --git a/sysdeps/stub_suid/Makefile.am b/sysdeps/stub_suid/Makefile.am
index 1d0962dc..78acf9d1 100644
--- a/sysdeps/stub_suid/Makefile.am
+++ b/sysdeps/stub_suid/Makefile.am
@@ -12,7 +12,7 @@ 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
+ procsegment.c ppp.c
libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO)
diff --git a/sysdeps/stub_suid/ppp.c b/sysdeps/stub_suid/ppp.c
new file mode 100644
index 00000000..96b559fe
--- /dev/null
+++ b/sysdeps/stub_suid/ppp.c
@@ -0,0 +1,42 @@
+/* $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/ppp.h>
+
+static const unsigned long _glibtop_sysdeps_ppp = 0;
+
+/* Init function. */
+
+void
+glibtop_init_ppp_p (glibtop *server)
+{
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+}
+
+/* Provides PPP/ISDN information. */
+
+void
+glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+ memset (buf, 0, sizeof (glibtop_ppp));
+}
diff --git a/sysdeps/sun4/ChangeLog b/sysdeps/sun4/ChangeLog
index 3ca0b6df..48a1688a 100644
--- a/sysdeps/sun4/ChangeLog
+++ b/sysdeps/sun4/ChangeLog
@@ -1,3 +1,7 @@
+1998-10-25 Martin Baulig <martin@home-of-linux.org>
+
+ * ppp.c: New file.
+
1998-08-25 Martin Baulig <martin@home-of-linux.org>
* *.c (glibtop_init_p): Using correct `(1 << GLIBTOP_SYSDPES_*)'.
diff --git a/sysdeps/sun4/Makefile.am b/sysdeps/sun4/Makefile.am
index 7135bde7..b4bb1dc2 100644
--- a/sysdeps/sun4/Makefile.am
+++ b/sysdeps/sun4/Makefile.am
@@ -12,7 +12,7 @@ libgtop_sysdeps_suid_la_SOURCES = open.c close.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
+ procsegment.c ppp.c
libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO)
libgtop_sysdeps_suid_la_LIBADD = -lkvm
diff --git a/sysdeps/sun4/ppp.c b/sysdeps/sun4/ppp.c
new file mode 100644
index 00000000..b81dfdb2
--- /dev/null
+++ b/sysdeps/sun4/ppp.c
@@ -0,0 +1,42 @@
+/* $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/ppp.h>
+
+static const unsigned long _glibtop_sysdeps_ppp = 0;
+
+/* Init function. */
+
+void
+glibtop_init_ppp_s (glibtop *server)
+{
+ server->sysdeps.ppp = _glibtop_sysdeps_ppp;
+}
+
+/* Provides PPP/ISDN information. */
+
+void
+glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
+{
+ memset (buf, 0, sizeof (glibtop_ppp));
+}