summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBenoît Dejean <bdejean@src.gnome.org>2004-11-13 00:53:20 +0000
committerBenoît Dejean <bdejean@src.gnome.org>2004-11-13 00:53:20 +0000
commit7e5ccec8bf8df4187c161f1e2dab600a434cf515 (patch)
tree9c382033a8dbae93a52efa937710164d7fefdad9 /include
parentfdf313cdf618ab7ef971b73cecc0fd1162ef162b (diff)
downloadlibgtop-7e5ccec8bf8df4187c161f1e2dab600a434cf515.tar.gz
Bumped to 2.9.0
* configure.in: Bumped to 2.9.0 * configure.in: * examples/.cvsignore: * examples/Makefile.am: * examples/netlist.c: (main): * features.def: * include/glibtop/Makefile.am: * include/glibtop/command.h: * include/glibtop/netlist.h: * include/glibtop/sysdeps.h: * include/glibtop/union.h: * include/glibtop/version.h: * src/daemon/version.c: * sysdeps/linux/Makefile.am: * sysdeps/linux/netlist.c: (glibtop_init_netlist_s), (glibtop_get_netlist_s): * sysdeps/names/Makefile.am: * sysdeps/names/netlist.c: * sysdeps/solaris/Makefile.am: * sysdeps/solaris/netlist.c: (glibtop_init_netlist_s), (glibtop_get_netlist_s): Added new function glibtop_get_netlist(). Implemented for linux and solaris. Doc needed.
Diffstat (limited to 'include')
-rw-r--r--include/glibtop/Makefile.am2
-rw-r--r--include/glibtop/command.h3
-rw-r--r--include/glibtop/netlist.h71
-rw-r--r--include/glibtop/sysdeps.h4
-rw-r--r--include/glibtop/union.h2
-rw-r--r--include/glibtop/version.h3
6 files changed, 79 insertions, 6 deletions
diff --git a/include/glibtop/Makefile.am b/include/glibtop/Makefile.am
index 43735148..ba0b59c6 100644
--- a/include/glibtop/Makefile.am
+++ b/include/glibtop/Makefile.am
@@ -7,4 +7,4 @@ glibtop_HEADERS = close.h loadavg.h prockernel.h procstate.h \
procsegment.h read.h sysdeps.h global.h \
procsignal.h read_data.h union.h types.h gnuserv.h \
parameter.h mountlist.h fsusage.h procmap.h signal.h \
- inodedb.h sysinfo.h ppp.h procargs.h netload.h
+ inodedb.h sysinfo.h ppp.h procargs.h netload.h netlist.h
diff --git a/include/glibtop/command.h b/include/glibtop/command.h
index 87688eb2..aa940ddc 100644
--- a/include/glibtop/command.h
+++ b/include/glibtop/command.h
@@ -57,8 +57,9 @@ G_BEGIN_DECLS
#define GLIBTOP_CMND_FSUSAGE 21
#define GLIBTOP_CMND_NETLOAD 22
#define GLIBTOP_CMND_PPP 23
+#define GLIBTOP_CMND_NETLIST 24
-#define GLIBTOP_MAX_CMND 24
+#define GLIBTOP_MAX_CMND 25
#define _GLIBTOP_PARAM_SIZE 16
diff --git a/include/glibtop/netlist.h b/include/glibtop/netlist.h
new file mode 100644
index 00000000..e296f09f
--- /dev/null
+++ b/include/glibtop/netlist.h
@@ -0,0 +1,71 @@
+/* Copyright (C) 2004 Benoît Dejean
+ This file is part of LibGTop 2.0.
+
+ 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.
+*/
+
+#ifndef __GLIBTOP_NETLIST_H__
+#define __GLIBTOP_NETLIST_H__
+
+#include <glibtop.h>
+#include <glibtop/global.h>
+
+G_BEGIN_DECLS
+
+#define GLIBTOP_NETLIST_NUMBER 0
+
+#define GLIBTOP_MAX_NETLIST 1
+
+typedef struct _glibtop_netlist glibtop_netlist;
+
+struct _glibtop_netlist
+{
+ guint64 flags;
+ guint32 number;
+};
+
+#define glibtop_get_netlist(netlist) glibtop_get_netlist_l(glibtop_global_server, netlist)
+
+#if GLIBTOP_SUID_NETLIST
+#define glibtop_get_netlist_r glibtop_get_netlist_p
+#else
+#define glibtop_get_netlist_r glibtop_get_netlist_s
+#endif
+
+char** glibtop_get_netlist_l (glibtop *server, glibtop_netlist *buf);
+
+#if GLIBTOP_SUID_NETLIST
+void glibtop_init_netlist_p (glibtop *server);
+char** glibtop_get_netlist_p (glibtop *server, glibtop_netlist *buf);
+#else
+void glibtop_init_netlist_s (glibtop *server);
+char** glibtop_get_netlist_s (glibtop *server, glibtop_netlist *buf);
+#endif
+
+#ifdef GLIBTOP_NAMES
+
+/* You need to link with -lgtop_names to get this stuff here. */
+
+extern const char *glibtop_names_netlist [];
+extern const unsigned glibtop_types_netlist [];
+extern const char *glibtop_labels_netlist [];
+extern const char *glibtop_descriptions_netlist [];
+
+#endif
+
+G_END_DECLS
+
+#endif
diff --git a/include/glibtop/sysdeps.h b/include/glibtop/sysdeps.h
index 11d2f9c3..7eb39313 100644
--- a/include/glibtop/sysdeps.h
+++ b/include/glibtop/sysdeps.h
@@ -51,8 +51,9 @@ G_BEGIN_DECLS
#define GLIBTOP_SYSDEPS_FSUSAGE 20
#define GLIBTOP_SYSDEPS_NETLOAD 21
#define GLIBTOP_SYSDEPS_PPP 22
+#define GLIBTOP_SYSDEPS_NETLIST 23
-#define GLIBTOP_MAX_SYSDEPS 23
+#define GLIBTOP_MAX_SYSDEPS 24
#define GLIBTOP_SYSDEPS_ALL ((1 << GLIBTOP_MAX_SYSDEPS) - 1)
@@ -86,6 +87,7 @@ struct _glibtop_sysdeps
proc_map, /* glibtop_proc_map */
mountlist, /* glibtop_mountlist */
fsusage, /* glibtop_fsusage */
+ netlist, /* glibtop_netlist */
netload, /* glibtop_netload */
ppp; /* glibtop_ppp */
};
diff --git a/include/glibtop/union.h b/include/glibtop/union.h
index db1cc203..ed462468 100644
--- a/include/glibtop/union.h
+++ b/include/glibtop/union.h
@@ -48,6 +48,7 @@
#include <glibtop/fsusage.h>
#include <glibtop/netload.h>
+#include <glibtop/netlist.h>
#include <glibtop/ppp.h>
G_BEGIN_DECLS
@@ -76,6 +77,7 @@ union _glibtop_union
glibtop_proc_map proc_map;
glibtop_mountlist mountlist;
glibtop_fsusage fsusage;
+ glibtop_netlist netlist;
glibtop_netload netload;
glibtop_ppp ppp;
};
diff --git a/include/glibtop/version.h b/include/glibtop/version.h
index 67d9ab10..90ba06df 100644
--- a/include/glibtop/version.h
+++ b/include/glibtop/version.h
@@ -23,9 +23,6 @@
#define __GLIBTOP_VERSION_H__
#include <glibtop.h>
-#include <glibtop/union.h>
-#include <glibtop/sysdeps.h>
-#include <glibtop/command.h>
#define LIBGTOP_VERSION_STRING "Libgtop %s server version %s (%u,%u,%u,%u)."