Commit Graph

36 Commits

Author SHA1 Message Date
Benoît Dejean
5bd4c5feeb Added missing include <glibtop/close.h>.
* glibtop.h: Added missing include <glibtop/close.h>.
2004-09-25 19:31:18 +00:00
Benoît Dejean
b55ecd65bc Moved foward declaration of glibtop to break circular #includes
* glibtop.h: Moved foward declaration of glibtop to break circular
	#includes dependencies.
2004-07-03 13:30:31 +00:00
Bastien Nocera
b67e4c7f7d - fixed compilation 2003-10-20 15:20:16 +00:00
Carlos Perelló Marín
bae16b467f libgtop-GNOME-2-0-branch moved to HEAD.
2003-10-19  Carlos Perelló Marín <carlos@gnome.org>

	* libgtop-GNOME-2-0-branch moved to HEAD.
2003-10-19 16:10:39 +00:00
Martin Baulig
530cc00ae7 Use G_BEGIN_DECLS and G_END_DECLS instead of LIBGTOP_BEGIN/END_DECLS.
2001-04-20  Martin Baulig  <baulig@suse.de>

	* include/glibtop/*.h: Use G_BEGIN_DECLS and G_END_DECLS
	instead of LIBGTOP_BEGIN/END_DECLS.
2001-04-20 20:50:01 +00:00
Martin Baulig
3b7c109916 Removed this typedef. (glibtop_server): Made the _priv' field a void *'.
2001-04-20  Martin Baulig  <baulig@suse.de>

	* include/glibtop/glibtop-server.h
	(glibtop_server_private): Removed this typedef.
	(glibtop_server): Made the `_priv' field a `void *'.

	* glibtop-server-private.h: Moved to lib/.

	* lib/glibtop-server-private.h
	(glibtop_server_private): Moved this typedef here.
2001-04-20 17:48:55 +00:00
Martin Baulig
752d5b47d2 Started with the big rewrite for GNOME 2.0:
2000-11-20  Martin Baulig  <baulig@suse.de>

	Started with the big rewrite for GNOME 2.0:

	- split the `glibtop' structure into `glibtop_server' and
	`glibtop_client' and make `glibtop_client' a GObject.
	- cleanly separate the library and the backends.

	This stuff currently does not compile.

	* glibtop.h (glibtop_server_private, glibtop_server_info):
	Removed typedefs.
	(struct _glibtop, struct _glibtop_server_info): Removed.
	(glibtop_global_server, glibtop_server_features): Removed.
	(glibtop_server_ref, glibtop_server_unref): Removed.

	* glibtop.h (glibtop_init_s): First argument is now a
	`glibtop_server *'.

	* include/glibtop/*.h: Removed all #defines with the
	glibtop_global_server.
	(glibtop_get_*_l): First argument is now a `glibtop_client *'.
	(glibtop_get_*_s, glibtop_init_*_s): First argument is now a
	`glibtop_server *'.

	* lib/glibtop-client.c: New file.

	* sysdeps/common/xmalloc.c: Moved to lib/.
	* sysdeps/common/error.c: Moved to lib/.

	* lib/xmalloc.c: Moved here from sysdeps/common/.
	* lib/error.c: Moved here from sysdeps/common/.

	* include/glibtop/backend.h
	(glibtop_backend_open_func_t, glibtop_backend_close_func_t):
	First argument is now a `glibtop_server *'.
	(glibtop_backend_info): Added `glibtop_server *server'.
	(glibtop_open_backend_l): Returns `glibtop_backend *', first
	argument is `glibtop_client *' and added `GError **'.

	* include/glibtop/close.h (glibtop_close_s, glibtop_close_p):
	First argument is now a `glibtop_server *'.

	* include/glibtop/error.h (*):
	First argument is now a `glibtop_server *'.

	* include/glibtop/errors.h: Switched this to use GError.
2000-11-20 22:37:15 +00:00
Martin Baulig
c15ff3f342 New type. (glibtop): Added glibtop_server_info *info', moved ncpu',
2000-11-20  Martin Baulig  <baulig@suse.de>

	* glibtop.h (glibtop_server_info): New type.
	(glibtop): Added `glibtop_server_info *info', moved
	`ncpu', `features', `sysdeps', `required' and `wanted'
	info glibtop_server_info.
2000-11-20 16:52:30 +00:00
Martin Baulig
55ff827b50 Removed method', server_command', server_host', server_user' and
2000-02-06  Martin Baulig  <martin@home-of-linux.org>

	* glibtop.h (glibtop): Removed `method', `server_command',
	`server_host', `server_user' and `server_rsh'.
	Added `glibtop_parameter _param' field and moved `error_method'
	there.

	* include/glibtop/parameter.h (glibtop_parameter): New structure.
	(GLIBTOP_PARAM_METHOD, GLIBTOP_PARAM_COMMAND): Removed.
	(GLIBTOP_PARAM_HOST, GLIBTOP_PARAM_PORT): Removed.
	(GLIBTOP_PARAM_REMOTE_USER, GLIBTOP_PARAM_PATH_RSH): Removed.
	(GLIBTOP_PARAM_NCPU, GLIBTOP_PARAM_OS_VERSION_CODE): Added.
2000-02-06 14:43:55 +00:00
Martin Baulig
f1a6e1ead8 The indentation in LibGTop was done with the following command:
find . -name \*.[ch] | xargs -i emacs -batch {} \
		-l /gnome/compile/libgtop/misc/format.el -f save-buffer

December 26, 1999
Martin
1999-12-26 14:05:32 +00:00
Martin Baulig
567ceac52f Use of `errno' as struct field yields some trouble; better use
`glibtop_errno' instead.
1999-12-22 11:22:29 +00:00
Martin Baulig
47a0ef64d8 Added `errno' field.
1999-12-22  Martin Baulig  <martin@home-of-linux.org>

	* glibtop.h (glibtop): Added `errno' field.

	* include/glibtop/errors.h
	(GLIBTOP_ERROR_SERVER_COMM_FAILURE): New error constant.
	(GLIBTOP_ERROR_NO_SUCH_PROCESS): New error constant.
1999-12-22 11:19:16 +00:00
Martin Baulig
d4b712db86 New file. This is a private header file which defines `struct
1999-12-19  Martin Baulig  <martin@home-of-linux.org>

	* glibtop-server-private.h: New file. This is a private header
	file which defines `struct _glibtop_server_private'.

	* glibtop.h (glibtop): Added `glibtop_server_private *_priv' field
	and moved some private fields there.
1999-12-19 15:07:13 +00:00
Martin Baulig
d2d8d38db4 New file. We define `GLIBTOP_ERROR_*' error constants here.
1999-12-19  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/errors.h: New file. We define `GLIBTOP_ERROR_*'
	error constants here.

	* lib/errors.c: New file.
	(glibtop_error_strings): Array of error messages.
	(glibtop_get_error_string_l): Get error message.

	* include/glibtop/parameter.h: Added `GLIBTOP_PARAM_REMOTE_USER' and
	`GLIBTOP_PARAM_PATH_RSH'.

	* lib/parameter.c (glibtop_get_parameter_l): Changed return value
	from `size_t' to `ssize_t' and let it return an error constant.
	(glibtop_get_parameter_size_l): New function.
	(glibtop_set_parameter_l): Changed return value from `void' to `int'
	and let it return an error constant on error.

	* structures.def (glibtop_sysdeps): Added.
1999-12-19 00:30:18 +00:00
Martin Baulig
c1cae4e9ba Added `refcount' field. New functions to deal with refcounts.
1999-12-05  Martin Baulig  <martin@home-of-linux.org>

	* glibtop.h (glibtop): Added `refcount' field.
	* lib/init.c (glibtop_server_ref, glibtop_server_unref): New
	functions to deal with refcounts.
1999-12-05 13:50:35 +00:00
Martin Baulig
0e9245ba28 Move this here.
1999-05-28  Martin Baulig  <martin@home-of-linux.org>

	* glibtop.h (GLIBTOP_MOUNTENTRY_LEN): Move this
	* include/glibtop/limits.h: here.
1999-05-28 12:01:56 +00:00
Martin Baulig
cfbe553724 This is a new generated file which will be included from <glibtop.h>. We
1999-05-12  Martin Baulig  <martin@home-of-linux.org>

	* glibtop-config.h: This is a new generated file which will be
	included from <glibtop.h>. We define things like `u_int64_t' and
	LIBGTOP_*_VERSION here so we can compile LibGTop applications with
	`libgtop-config --cflags`.

	* configure.in: Create glibtop-config.h.
	(GLIBTOP_*_INCS): Added `-I $(pkglibdir)/include'.

	* libgtop-config.h.in: Added `--cflags', `--libs' and `--extra-libs'
	parameter so you can now use LibGTop even in no-autoconf apps.

	* Makefile.am: Install `glibtop-config.h' in `$(pkglibdir)/include'.
1999-05-12 10:25:33 +00:00
Martin Baulig
eca34c37d9 New file. (GLIBTOP_MAX_CPU): Define this here and increase it to 256.
1999-04-18  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/limits.h: New file.
	(GLIBTOP_MAX_CPU): Define this here and increase it to 256.
1999-04-18 11:36:42 +00:00
Martin Baulig
3d248e9ad2 Added `wanted'. Applications can set the features they are interested in
1999-03-23  Martin Baulig  <martin@home-of-linux.org>

	* glibtop.h (glibtop): Added `wanted'. Applications can set the
	features they are interested in here. This way we don't waste CPU
	getting expensive data that aren't really needed.

	* LIBGTOP-VERSION: This breaks backward compatibility and also
	added new functions; set binary	age and interface age to 0.
1999-03-23 18:31:20 +00:00
Martin Baulig
cf611f9157 Set the copyright of LibGTop to the GNU General Public License.
1999-02-22  Martin Baulig  <martin@home-of-linux.org>

	Set the copyright of LibGTop to the GNU General Public License.

	* copyright.txt: Set the year to 1998-99 and pretty-format it a
	little bit. Same in all C source and header files.
1999-02-23 11:47:35 +00:00
Martin Baulig
1272d38f72 Replace all __BEGIN_DELCS with LIBGTOP_BEGIN_DECLS and all __END_DECLS
1999-02-19  Martin Baulig  <martin@home-of-linux.org>

	* Replace all __BEGIN_DELCS with LIBGTOP_BEGIN_DECLS and all
	__END_DECLS with LIBGTOP_END_DECLS; remove all __P macros and
	use real function prototypes.
1999-02-19 09:54:18 +00:00
Martin Baulig
a331fb8e03 Added `ncpu'. This is zero for single processor systems and the number of
1998-09-09  Martin Baulig <baulig@Stud.Informatik.uni-trier.de>

	* glibtop.h (glibtop): Added `ncpu'. This is zero for single processor
	systems and the number of CPUs otherwise.

	* include/glibtop/cpu.h (glibtop_cpu): Added `xcpu_total', `xcpu_user',
	`xcpu_nice', `xcpu_sys' and `xcpu_idle'.
	(GLIBTOP_NCPU): #define this to 4.
1998-09-09 15:19:24 +00:00
Martin Baulig
561becc92e `make distcheck' cleanups - Hey, it really works, guys ! 1998-08-16 20:14:27 +00:00
Martin Baulig
d9361d388c New file. Added definition of `proc_map'.
1998-08-10  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/procmap.h (glibtop_proc_map): New file.
	* features.def: Added definition of `proc_map'.
1998-08-10 16:57:44 +00:00
Martin Baulig
4b3fcf149a New fields error_method', sysdeps' and `required'. I added an improved
1998-08-07  Martin Baulig  <martin@home-of-linux.org>

	* glibtop.h (_glibtop): New fields `error_method', `sysdeps' and
	`required'. I added an improved error handling: the client can tell
	the libraries which fields are absolutely required for each features
	and if it fails to set one of them, this will create an error which
	is handled depending upon the `error_method'.

	* include/glibtop/open.h: Define some constants for `error_method'.

	* lib/sysdeps.c (glibtop_get_sysdeps_r): No longer actually call any
	sysdeps function, it now simply copies `server->sysdeps'.
	(_glibtop_init_hook_s): Added. List of functions to be called during
	`glibtop_init_s' set to `glibtop_init_<no-suid-feature>_s'.

	* include/glibtop/sysdeps.h (<glibtop/union.h>): Removed.
	(glibtop_init_func_t): New typedef.
	(_glibtop_init_hook_s): Added.

	* sysdeps/linux/*.c (glibtop_init_<feature>_s): New functions.
	(glibtop_get_proc_*): Zero is now a valid pid.

	* sysdeps/kernel/*.c (glibtop_init_<feature>_s): New functions.
	(glibtop_get_proc_*): Zero is now a valid pid.

1998-08-06  Martin Baulig  <martin@home-of-linux.org>
1998-08-07 10:01:55 +00:00
Martin Baulig
0a7bd78704 Using GLIBTOP_GUILE' instead of HAVE_GUILE' so one should be able to use
1998-08-06  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/*.h: Using `GLIBTOP_GUILE' instead of `HAVE_GUILE'
	so one should be able to use libgtop without guile in an application
	even if guile is installed.

	* sysdeps/common/mountlist.c: Fixed some `xstrdup' problems.

	* lib/open.c: Now correctly reading server features for
	`GLIBTOP_METHOD_PIPE'.

	* sysdeps/freebsd: New directory.
1998-08-06 21:57:45 +00:00
Martin Baulig
5e97af535f Summary of this long ChangeLog:
* Splitted `libgtop_sysdeps.la' into `libgtop_sysdeps.la' and
   `libgtop_sysdeps_suid.la'.

   Everything that needs to be suid/sgid is in `libgtop_sysdeps_suid.la'
   and the rest in `libgtop_sysdeps.la'.

   The functions from `libgtop_sysdeps_suid.la' have the `_p' prefix and
   the ones from `libgtop_sysdeps.la' the `_s' prefix.

   The suid library uses `glibtop_open_p' and `glibtop_close_p', the
   normal one `glibtop_init_s' (found in lib/init.c), `glibtop_open_s'
   and `glibtop_close_s'.

 * Added `libgtop_suid_common.la' containing stuff from sysdeps/common
   that is required from the suid server (currently everything from
   error.c and xmalloc.c).

   This means, we can add some more stuff to `libgtop_common.la' without
   the risk that it may be dangerous in the suid server.

 * The ``library order'' is much clearer now:

   -> `libgtop.la' (from lib/) contains user-level stuff;
      all functions except `glibtop_init_r' have the `_l'
      suffix.

   -> `libgtop_common.la' (from sysdeps/common/) contains stuff
      that is common among the sysdeps directories.
      use anything from `libgtop_sysdeps.la' and
      `libgtop_sysdeps_suid.la'.

   -> `libgtop_sysdeps.la' (from sysdeps/<sysdeps_dir>/) contains
      everything from the sysdeps directory that doesn't need to
      be suid/sgid.

   -> `libgtop_suid_common.la' (from sysdeps/common/) is used from
      the suid server instead of `libgtop_common.la'.

   -> `libgtop_sysdeps_suid.la' (from sysdeps/<sysdeps_dir>/) contains
      everything from the sysdeps directory that needs to be in the
      suid server.

 * To summarize: the server is linked only with functions that need
   to be suid and everything else is linked only with functions that
   do not need to be suid.

Martin

1998-07-22  Martin Baulig  <martin@home-of-linux.org>

	* lib/init.c (glibtop_init_s): Added this init function of
	the sysdeps directory `libgtop_sysdeps.la'.

	* lib/open.c (glibtop_open_l): Unconditionally calling
	`glibtop_init_s' after server initialization.

	* lib/lib.awk: Removed references to functions from
	`libgtop_sysdeps_suid.la' to avoid undefined symbols.

	* sysdeps/stub/open.c (glibtop_open_s): Renamed this
	function from `glibtop_open_r'.

	* sysdeps/stub/close.c (glibtop_close_s): Renamed this
	function from `glibtop_close_l'.

	* sysdeps/kernel/open.c (glibtop_open_s): Renamed this
	function from `glibtop_open_r'.

	* sysdeps/kernel/close.c (glibtop_close_s): Renamed this
	function from `glibtop_close_l'.

	* sysdeps/linux/open.c (glibtop_open_s): Renamed this
	function from `glibtop_open_r'.

	* sysdeps/linux/close.c (glibtop_close_s): Renamed this
	function from `glibtop_close_l'.

	* sysdeps/osf1/Makefile.am (lib_LTLIBRARIES): Added
	`libgtop_sysdeps_suid.la' for the suid server.

	* sysdeps/osf1/open_suid.c (glibtop_open_p): New file.
	Contains all stuff that was formerly in `open.c'.

	* sysdeps/osf1/open.c: Moved everything from here into
	the new file `open_suid.c'.

	* sysdeps/osf1/open.c (glibtop_open_s): New function.

	* sysdeps/osf1/close_suid.c (glibtop_close_p): New file.

	* sysdeps/osf1/close.c (glibtop_close_s): New function.

	* sysdeps/osf1/*.c: Using the new init, open and close
	functions.

	* sysdeps/sun4/Makefile.am (lib_LTLIBRARIES): Added
	`libgtop_sysdeps_suid.la' for the suid server.

	* sysdeps/sun4/nosuid.c (glibtop_open_s, glibtop_close_s): New file

	* sysdeps/sun4/*.c: All functions now have the `_p' suffix.

	* sysdeps/common/Makefile.am (lib_LTLIBRARIES): Added
	`libgtop_suid_common.la' which only contains stuff that is
	needed in the suid parts.

	* sysdeps/common/xmalloc.c: Using `glibtop_error_io_r' instead
	of `glibtop_error_r'.

	* sysdeps/{kernel, linux, osf1, sun4, stub}/init.c: Removed.
	`glibtop_init_s' has been moved into `lib/init.c' since it's the
	same in all the sysdeps directories.

	* src/server/main.c: It is now an error to request a feature that
	does not need the suid server.

	* src/proxy: Removed.
1998-07-22 09:26:43 +00:00
Martin Baulig
3477d30dc5 Basically did some work on the new daemon. Things are still unstable.
1998-07-13  Martin Baulig  <martin@home-of-linux.org>

	* glibtop.h: Fixed invocation of `glibtop_close_r'.

	* sysdeps/linux/procstate.c: Added missing `fclose'.

	* include/glibtop/gnuserv.h (UNIX_DOMAIN_SOCKETS): Defining.

	* include/glibtop/open.h (GLIBTOP_METHOD_UNIX): Added.

	* lib/init.c: Added new method `GLIBTOP_METHOD_UNIX'.

	* lib/open.c: Added support for Unix Domain Sockets.

	* lib/close.c: Now closing inet and unix connections.

	* lib/parameter.c (glibtop_set_parameter_l): You can now
	set the `method' and `features' fields.

	* src/daemon/server_config.h: New file.

	* src/daemon/{gnuserv.c, main.c}: More work on the server.
1998-07-13 00:39:46 +00:00
Martin baulig
9532dadc2e No longer use `glibtop_machine.h' for Linux.
1998-07-03  Martin baulig  <martin@home-of-linux.org>

	* macros/gnome-libgtop-sysdeps.m4: No longer use
	`glibtop_machine.h' for Linux.

	* sysdeps/linux/glibtop_machine.h: Removed.

	* sysdeps/guile/guile.awk: Using `scm_append'
	instead of `gh_append'.

	* sysdeps/guile/names/guile-names.awk: dito.

	* sysdeps/linux/*.c: Using code from stable branch again.

	* include/glibtop/parameter.h: New file.

	* lib/parameter.c: New file.

	* lib/{open, init}.c: Done some more work on server
	initialization
1998-07-03 17:19:25 +00:00
Martin Baulig
3fcc477b25 New field `server_port'.
1998-06-18  Martin Baulig  <baulig@taurus.uni-trier.de>

	* glibtop.h (_glibtop): New field `server_port'.
1998-06-18 13:08:40 +00:00
Martin Baulig
2a281d0a53 Added `socket' field.
1998-06-14  Martin Baulig  <martin@home-of-linux.org>

	* glibtop.h (struct _glibtop): Added `socket' field.
1998-06-14 21:30:41 +00:00
Martin Baulig
c84923132a Using single underscore instead of two underscores for function prefixes
1998-06-07  Martin Baulig  <martin@home-of-linux.org>

	* *.[ch]: Using single underscore instead of two underscores
	for function prefixes (regexp: ``s,__([rspl])\b,_$1,g'') to
	avoid ambiguity with mangled C++ names.
1998-06-07 13:57:45 +00:00
Martin Baulig
de5cf356c9 Added `#include <types.h>'.
1998-06-06  Martin Baulig  <martin@home-of-linux.org>

        * glibtop.h: Added `#include <types.h>'.

        * include/glibtop/types.h: New file - numeric constants
        for `glibtop_types_<feature>'.

        * sysdeps/names/*.c (glibtop_types_*): Using numeric
        constants from `types.h' instead of string constants.
1998-06-06 18:19:16 +00:00
Martin Baulig
15e73d9b7d *** empty log message *** 1998-06-01 15:25:11 +00:00
Martin Baulig
68162783dc always use `-I$(top_srcdir)/sysdeps/@sysdeps_dir@'; it's no longer
* configure.in (@machine_incs@): always use
`-I$(top_srcdir)/sysdeps/@sysdeps_dir@'; it's no
longer conditional.

* examples/Makefile.am: removed the '_linux' examples.

* src/server/main.c: we now use the '__p' functions,
but only if the appropriate 'GLIBTOP_SUID_<feature>'
has a non-zero value.
1998-05-28 19:29:29 +00:00
Martin Baulig
33cdc01c1d Initial revision 1998-05-19 18:19:50 +00:00