Compare commits
225 Commits
libgtop_la
...
libgtop-GN
Author | SHA1 | Date | |
---|---|---|---|
|
4e4cf10334 | ||
|
b02653eef9 | ||
|
bfb2d1b25c | ||
|
1042379d6d | ||
|
240d07da28 | ||
|
fb2247a58b | ||
|
c04ee88f00 | ||
|
1b44968284 | ||
|
47bad7fac1 | ||
|
7691d85225 | ||
|
d0863b7406 | ||
|
7afa0e0be7 | ||
|
0c260bfef1 | ||
|
312baf1bc2 | ||
|
1dc0883059 | ||
|
222b93c33f | ||
|
db93479a51 | ||
|
236d2b18e7 | ||
|
08956770d2 | ||
|
7a7c6baf55 | ||
|
5bfb085021 | ||
|
dfb9d6f967 | ||
|
530cc00ae7 | ||
|
a3557112a7 | ||
|
3f34aafc6e | ||
|
d6630b9f7a | ||
|
3b7c109916 | ||
|
c5fcc9aad6 | ||
|
f4fc67f85c | ||
|
bcc4ec968e | ||
|
543b3b9160 | ||
|
aac46b6daf | ||
|
407514e4d7 | ||
|
1491ccc594 | ||
|
14b462fdc5 | ||
|
1c64d5c704 | ||
|
21ecc84514 | ||
|
b7acfa6441 | ||
|
de0391e6a4 | ||
|
56e7068a8b | ||
|
ed9140570e | ||
|
ae5ecfe538 | ||
|
fdd8cb8d27 | ||
|
2c986b988f | ||
|
46cf060788 | ||
|
6ded77b938 | ||
|
b730035db5 | ||
|
38755e23a3 | ||
|
94a24147c7 | ||
|
5e08479a71 | ||
|
bb24644744 | ||
|
eb8fd1d1be | ||
|
f349d3a624 | ||
|
a0b236f4f7 | ||
|
e5e1729baf | ||
|
b035190e66 | ||
|
427504e7ac | ||
|
33c49d7c14 | ||
|
c24b7f3bc4 | ||
|
e76a450779 | ||
|
c0fc0f4cb4 | ||
|
5c597901ad | ||
|
d3145d1b8b | ||
|
1ac0f147b7 | ||
|
fdb4a824fc | ||
|
2449e92804 | ||
|
7846ac218d | ||
|
5b34c23069 | ||
|
b6ee365761 | ||
|
e4f5543f9d | ||
|
a7f8debaa2 | ||
|
34e8918003 | ||
|
478be2d170 | ||
|
8a78a93e0c | ||
|
622eb0ea5b | ||
|
455118131e | ||
|
74ab42d100 | ||
|
d294298c7e | ||
|
4befe086c4 | ||
|
98930be564 | ||
|
16b81f0d91 | ||
|
dfd678599f | ||
|
6e4f80b8e2 | ||
|
f704c4becf | ||
|
9ab1889a3f | ||
|
201e78d00a | ||
|
d8cb698ae4 | ||
|
876b2725c0 | ||
|
c06a084fcf | ||
|
cee38c53bc | ||
|
81b009733e | ||
|
035b387463 | ||
|
158dec2b2a | ||
|
752d5b47d2 | ||
|
c15ff3f342 | ||
|
7a7e7d1bc3 | ||
|
6511ad348b | ||
|
5b1eb2290a | ||
|
00aed22f17 | ||
|
15c1ad1bd9 | ||
|
e1d552d9f7 | ||
|
60749e0bef | ||
|
bd01a45455 | ||
|
54529c2425 | ||
|
cf62a380bf | ||
|
ab2a4e6e6a | ||
|
7a9428a0e5 | ||
|
da80f53deb | ||
|
ae15c4159c | ||
|
eaee97b2bf | ||
|
94882bbc60 | ||
|
1e02e69b4a | ||
|
8277cc4d67 | ||
|
29858d29d8 | ||
|
984baf22f2 | ||
|
cdd3862061 | ||
|
c7cec23cf4 | ||
|
55b6e2e082 | ||
|
7d481fc8e9 | ||
|
50a02de454 | ||
|
1fcdf1af86 | ||
|
c62a74fb5a | ||
|
608ac42afe | ||
|
99a3b1fe82 | ||
|
ec00e62a54 | ||
|
29060eb6ce | ||
|
5301e8a86a | ||
|
dc103ad41d | ||
|
de91c11f87 | ||
|
b6091762ac | ||
|
4719557dae | ||
|
f4a05d8fc9 | ||
|
0ff66c2eaa | ||
|
a40a438ec8 | ||
|
718cd38098 | ||
|
6b88dcd4aa | ||
|
29b428608d | ||
|
e487fc30f4 | ||
|
578e5a5194 | ||
|
fb08ec7144 | ||
|
a51ffb6b73 | ||
|
0ecdde94c2 | ||
|
969260c9a9 | ||
|
fe00191113 | ||
|
60f0ea7dc2 | ||
|
d6c8167076 | ||
|
26b2aaa2db | ||
|
0b45f63e61 | ||
|
a790130414 | ||
|
f36d5e5370 | ||
|
5dbfe42493 | ||
|
76f1fb641c | ||
|
7b30b1ec86 | ||
|
9e2a8f7db8 | ||
|
d6a6d70c75 | ||
|
da16460aad | ||
|
444ede9949 | ||
|
b25b0cf4d4 | ||
|
f282240c0c | ||
|
8d6e26a8d6 | ||
|
62af029665 | ||
|
e43f1a64c5 | ||
|
f92c264826 | ||
|
350e4e799d | ||
|
6c6d8e006e | ||
|
df3901571d | ||
|
a4db88252e | ||
|
48440ac59b | ||
|
c3a55796c2 | ||
|
33a659ab06 | ||
|
5e8644d736 | ||
|
14e7219160 | ||
|
5f0246b07d | ||
|
fa20de8904 | ||
|
00d9dd7065 | ||
|
0a3a0c1a34 | ||
|
a9ed25e7fc | ||
|
e577aa3d08 | ||
|
8bcbf2f86c | ||
|
1e9cb3ea2a | ||
|
7e24f71432 | ||
|
4dad0e5b8c | ||
|
9dc214b3e7 | ||
|
7700a6525e | ||
|
28150c48f7 | ||
|
1f6916b5d0 | ||
|
36c36b9afb | ||
|
6402efe196 | ||
|
00a32c887c | ||
|
c92bf0f9a9 | ||
|
44027f6bd2 | ||
|
3fec7a0946 | ||
|
47d4322965 | ||
|
7ae71b3d8f | ||
|
a73800ae2d | ||
|
b124998639 | ||
|
238d03677a | ||
|
0f3babc8e9 | ||
|
55ff827b50 | ||
|
0daf65ef73 | ||
|
2eab7cfc48 | ||
|
a691993a86 | ||
|
d3e83afb0a | ||
|
129e4bc0ac | ||
|
faec393b8d | ||
|
a7d39be2b5 | ||
|
8892637796 | ||
|
00a9f98ee0 | ||
|
4b8a9ece16 | ||
|
fc8645245a | ||
|
2d4553adf2 | ||
|
5f02295a63 | ||
|
8b1dd440ee | ||
|
77a1a6a43d | ||
|
e9c8125828 | ||
|
3212af2fb4 | ||
|
52dbe1469d | ||
|
837ee6bcc6 | ||
|
8a85be8f00 | ||
|
3455d025a2 | ||
|
d2f4502e74 | ||
|
2144fab671 | ||
|
e8c90833e8 | ||
|
d567c86818 | ||
|
931ba0fa8d |
@@ -20,8 +20,6 @@ libgtop-1.*.*
|
|||||||
libgtop-mirror.sh.swp
|
libgtop-mirror.sh.swp
|
||||||
libgtopConf.sh
|
libgtopConf.sh
|
||||||
libtool
|
libtool
|
||||||
ltconfig
|
|
||||||
ltmain.sh
|
|
||||||
macros
|
macros
|
||||||
stamp-h
|
stamp-h
|
||||||
stamp-h.in
|
stamp-h.in
|
||||||
@@ -43,3 +41,4 @@ glibtop-config.h
|
|||||||
stamp-gc-h
|
stamp-gc-h
|
||||||
build-debstamp
|
build-debstamp
|
||||||
install-debstamp
|
install-debstamp
|
||||||
|
libgtop.pc
|
||||||
|
553
ChangeLog
553
ChangeLog
@@ -1,3 +1,556 @@
|
|||||||
|
2002-01-10 Kevin Vandersloot <kfv101@psu.edu>
|
||||||
|
|
||||||
|
* configure.in: Put in error message telling people
|
||||||
|
not to use HEAD for the time being untill I merger the
|
||||||
|
porting branch
|
||||||
|
|
||||||
|
2002-01-09 Darin Adler <darin@bentspoon.com>
|
||||||
|
|
||||||
|
* Makefile.am: Fix install problem.
|
||||||
|
* ltmain.sh: Don't check this into cvs.
|
||||||
|
|
||||||
|
Mon Nov 26 20:11:31 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* lib/xmalloc.c include/glibtop/xmalloc.h: (glibtop_free_r):
|
||||||
|
Argument to free can't be const!
|
||||||
|
|
||||||
|
* include/glibtop/glibtop-client/backend.h
|
||||||
|
lib/glibtop-backend.c lib/glibtop-client.c: Include
|
||||||
|
glib-object.h, not gobject/gobject.h.
|
||||||
|
|
||||||
|
2001-10-13 Bastien Nocera <hadess@hadess.net>
|
||||||
|
|
||||||
|
* Makefile.am, configure.in, libgtop-2.0.pc.in, libgtop.pc.in:
|
||||||
|
Renamed libgtop.pc to libgtop-2.0.pc
|
||||||
|
|
||||||
|
2001-10-13 Bastien Nocera <hadess@hadess.net>
|
||||||
|
|
||||||
|
* configure.in, include/glibtop/errors.h, include/glibtop/global.h,
|
||||||
|
lib/glibtop-client.c, lib/test-backends.c: Fixes for glib-1.3.9
|
||||||
|
|
||||||
|
2001-09-10 Abel Cheung <maddog@linux.org.hk>
|
||||||
|
|
||||||
|
* configure.in: Added "zh_TW" to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2001-07-23 Kjartan Maraas <kmaraas@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: Added "nn" to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2001-04-21 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
* configure.in: Removed all sysdeps checks.
|
||||||
|
|
||||||
|
* lib/sysdeps-init*.c: Removed.
|
||||||
|
|
||||||
|
* lib/inodedb.c: Moved here from sysdeps/common/inodedb.c.
|
||||||
|
|
||||||
|
* glibtop-config.h: Removed.
|
||||||
|
|
||||||
|
2001-04-20 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
Moved all sysdeps code to the new libgtop-backends module.
|
||||||
|
|
||||||
|
* sysdeps/freesd/*: Removed.
|
||||||
|
* sysdeps/kernel/*: Removed.
|
||||||
|
* sysdeps/linux/*: Removed.
|
||||||
|
* sysdeps/osf1/*: Removed.
|
||||||
|
* sysdeps/solaris/*: Removed.
|
||||||
|
* sysdeps/stub/*: Removed.
|
||||||
|
* sysdeps/stub_suid/*: Removed.
|
||||||
|
* sysdeps/sun4/*: Removed.
|
||||||
|
|
||||||
|
2001-04-20 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
* lib/Makefile.am (libgtop_la_SOURCES): Added xmalloc.c and
|
||||||
|
error.c.
|
||||||
|
|
||||||
|
2001-04-20 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
* include/glibtop/glibtop-server.h (glibtop_init_func_t):
|
||||||
|
Added `glibtop_closure *' argument.
|
||||||
|
|
||||||
|
* include/glibtop/glibtop-backend-info.h
|
||||||
|
(glibtop_backend_close_func_t): Third argument is now
|
||||||
|
`glibtop_closure *'.
|
||||||
|
|
||||||
|
* include/glibtop/call-vector.pl: Reflect latest API changes.
|
||||||
|
|
||||||
|
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 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
* include/glibtop/glibtop-server.h (glibtop_closure):
|
||||||
|
Typedef this as an opaque struct.
|
||||||
|
|
||||||
|
2001-04-20 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
* include/glibtop/*.h (glibtop_get_*_s, glibtop_get_*_pl):
|
||||||
|
Changed `void *closure' to `glibtop_closure *closure'.
|
||||||
|
|
||||||
|
* include/glibtop/*.h
|
||||||
|
(glibtop_init_*_s): Added `glibtop_closure *closure' argument.
|
||||||
|
(glibtop_init_*_p): Changed `glibtop *server' to
|
||||||
|
`glibtop_server *server' and added `glibtop_closure *closure'.
|
||||||
|
|
||||||
|
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 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
* include/glibtop/*.h (glibtop_get_*_s, glibtop_get_*_pl):
|
||||||
|
Added `void *closure' argument to all sysdeps functions.
|
||||||
|
|
||||||
|
* include/glibtop/open.h (glibtop_open_s, glibtop_open_p):
|
||||||
|
Removed the `const char *program_name' argument and added
|
||||||
|
`void *closure'.
|
||||||
|
|
||||||
|
2001-04-20 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
* libgtop.pc.in: Added pkg-config file.
|
||||||
|
|
||||||
|
2001-04-20 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
* acinclude.m4 (GNOME_FILEUTILS_CHECKS): Put this here.
|
||||||
|
|
||||||
|
2001-04-04 John Gotts <jgotts@linuxsavvy.com>
|
||||||
|
|
||||||
|
* libgtop.spec.in: Fixed categories. Also build examples. Improved
|
||||||
|
file lists.
|
||||||
|
|
||||||
|
2001-03-17 Marius Andreiana <mandreiana@yahoo.com>
|
||||||
|
|
||||||
|
* configure.in: Added ro (Romanian) to ALL_LINGUAS
|
||||||
|
|
||||||
|
2001-02-13 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
|
||||||
|
|
||||||
|
* configure.in: Added sk to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2001-01-04 Fatih Demir <kabalak@gmx.net>
|
||||||
|
|
||||||
|
* configure.in: Added tr to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2000-11-27 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* include/glibtop/glibtop-backend-info.h
|
||||||
|
(glibtop_backend_close_func_t): Added `void *closure' argument.
|
||||||
|
|
||||||
|
* include/glibtop/call-vector.h: Changed the second argument
|
||||||
|
of all function in the call vector from `glibtop_backend *' to
|
||||||
|
`void *closure'.
|
||||||
|
|
||||||
|
2000-11-26 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* include/glibtop/glibtop-backend.h (glibtop_backend_open):
|
||||||
|
Renamed to glibtop_backend_get().
|
||||||
|
(glibtop_backend_get_server): New function.
|
||||||
|
|
||||||
|
* include/glibtop/glibtop-backend.h
|
||||||
|
(glibtop_backend_get_call_vector): New function.
|
||||||
|
|
||||||
|
* lib/glibtop-client-private.h: New file.
|
||||||
|
* lib/glibtop-client.h (struct _glibtop_client_private): Moved
|
||||||
|
to glibtop-client-private.h.
|
||||||
|
|
||||||
|
* include/glibtop/glibtop-client.h (glibtop_client_open_backend):
|
||||||
|
Changed return value to void.
|
||||||
|
|
||||||
|
* lib/glibtop-client.c: Implement glibtop_client_add_backend() and
|
||||||
|
glibtop_client_remove_backend().
|
||||||
|
|
||||||
|
* include/glibtop/backend.h: Removed. Split into glibtop-backend.h
|
||||||
|
and glibtop-backend-info.h.
|
||||||
|
|
||||||
|
* include/glibtop/glibtop-backend.h: New file. Switched
|
||||||
|
glibtop_backend to a GObject.
|
||||||
|
|
||||||
|
* include/glibtop/glibtop-backend-info.h: New file.
|
||||||
|
|
||||||
|
* lib/backend.c, lib/init-backends.c, lib/open-backend.c: Removed.
|
||||||
|
|
||||||
|
* lib/glibtop-backend.c: New file.
|
||||||
|
* lib/glibtop-backend-info.c: New file.
|
||||||
|
|
||||||
|
2000-11-26 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* include/glibtop/call-vector.h (glibtop_call_vector): Moved
|
||||||
|
the typedef to backend.h.
|
||||||
|
|
||||||
|
* include/glibtop/backend.h (glibtop_open_backend_l): Renamed
|
||||||
|
to glibtop_open_backend(), removed the `glibtop_client *'
|
||||||
|
argument and made the `GError *' argument non-optional.
|
||||||
|
|
||||||
|
* include/glibtop/glibtop-client.h
|
||||||
|
(glibtop_client_add_backend, glibtop_client_remove_backend): New
|
||||||
|
functions to add/remove a glibtop_backend to a glibtop_client.
|
||||||
|
(glibtop_client_open_backend): New convenient function; calls
|
||||||
|
glibtop_open_backend() and glibtop_client_add_backend().
|
||||||
|
|
||||||
|
2000-11-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* configure.in (INCLUDES): Added -Werror.
|
||||||
|
|
||||||
|
* include/glibtop/open.h (_glibtop_open_sysdeps): The first
|
||||||
|
argument is now a `glibtop_client *', removed the `flags' argument
|
||||||
|
and added `const char **backend_args' and `GError **opt_error'.
|
||||||
|
|
||||||
|
* include/glibtop/backends.h (glibtop_open_backend_l): Allow
|
||||||
|
the `error' argument to be NULL; propagate the error to the
|
||||||
|
glibtop_client in this case.
|
||||||
|
|
||||||
|
2000-11-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* include/glibtop/glibtop-client.h (glibtop_client_class):
|
||||||
|
Added "error" and "warning" signals.
|
||||||
|
|
||||||
|
* lib/glibtop-server.c: New file.
|
||||||
|
|
||||||
|
* lib/test-backends.c: New file.
|
||||||
|
* lib/Makefile.am: Build test-backends test program.
|
||||||
|
|
||||||
|
* lib/init-backends.c: Port this to libxml 2.
|
||||||
|
|
||||||
|
* configure.in: Make this really work.
|
||||||
|
* acinclude.m4: Removed the xml stuff.
|
||||||
|
* Makefile.am (SUBDIRS): Put lib in front of sysdeps and backends.
|
||||||
|
|
||||||
|
2000-11-21 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* configure.in: Removed gnomesupport checks here and started
|
||||||
|
to use pkg-config.
|
||||||
|
|
||||||
|
* acinclude.m4: New file. Put contents of libgtop-sysdeps.m4
|
||||||
|
and xml.m4 and LIBGTOP_CHECK_TYPE here.
|
||||||
|
* libgtop-sysdeps.m4, xml.m4: Removed.
|
||||||
|
|
||||||
|
* Makefile.am (SUBDIRS): Don't compile support and macros.
|
||||||
|
|
||||||
|
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 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 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
* autogen.sh: Use gnome-common.
|
||||||
|
* configure.in: Require glib HEAD.
|
||||||
|
|
||||||
|
2000-08-09 Szabolcs BAN <shooby@gnome.hu>
|
||||||
|
|
||||||
|
* po/hu.po: Adding Hungarian translations.
|
||||||
|
|
||||||
|
2000-04-24 Martin Baulig <baulig@suse.de>
|
||||||
|
|
||||||
|
Added `Process current working directory' feature (proc_cwd).
|
||||||
|
|
||||||
|
* include/glibtop/proc_cwd.h: New file.
|
||||||
|
* features.def: Added `proc_cwd'.
|
||||||
|
|
||||||
|
* include/glibtop/sysdeps.h (glibtop_sysdeps): Added `proc_cwd'.
|
||||||
|
* include/glibtop/union.h (glibtop_union): Added `proc_cwd'.
|
||||||
|
|
||||||
|
* sysdeps/stub/proc_cwd.c: New file.
|
||||||
|
* sysdeps/names/proc_cwd.c: New file.
|
||||||
|
|
||||||
|
2000-04-19 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||||
|
|
||||||
|
* configure.in (ALL_LINGUAS): added Catalan
|
||||||
|
|
||||||
|
2000-04-16 Valek Filippov <frob@df.ru>
|
||||||
|
|
||||||
|
* configure.in: Added russian translation.
|
||||||
|
|
||||||
|
2000-03-08 Alastair McKinstry <mckinstry@computer.org>
|
||||||
|
|
||||||
|
* configure.in (ALL_LINGUAS): Added Irish (ga) translation.
|
||||||
|
|
||||||
|
2000-02-27 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* dtd/libgtop-backends.dtd: Added XML DTD for the `*.backend' files.
|
||||||
|
|
||||||
|
2000-02-27 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* dtd/: New directory.
|
||||||
|
* dtd/libgtop-backend-info.dtd: This is a XML DTD for "backend info"
|
||||||
|
XML files. In future, each backend will have such a xml file which
|
||||||
|
contains information like a short description of the backend, its
|
||||||
|
authors etc.
|
||||||
|
|
||||||
|
* sysdeps/linux/backend-info.xml: New file. First version of such
|
||||||
|
a "backend info" XML file as described above.
|
||||||
|
|
||||||
|
2000-02-27 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* libgtop-sysdeps.m4 (libgtop_have_sysdeps): Set this to "no" for
|
||||||
|
all systems until I made up my mind how this'll work in future.
|
||||||
|
|
||||||
|
2000-02-24 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* include/glibtop/error.h (glibtop_error_r, glibtop_warn_r): Moved
|
||||||
|
to sysdeps/common/error.c.
|
||||||
|
(glibtop_error_io_r, glibtop_warn_io_r): Likewise.
|
||||||
|
(glibtop_error, glibtop_warn): Moved the non-GNU-C version of them
|
||||||
|
to sysdeps/common/error.c.
|
||||||
|
(glibtop_error_io, glibtop_warn_io): Likewise.
|
||||||
|
|
||||||
|
* sysdeps/common/error.c (glibtop_error_r, glibtop_warn_r): Moved
|
||||||
|
here from include/glibtop/error.h.
|
||||||
|
(glibtop_error_io_r, glibtop_warn_io_r): Likewise.
|
||||||
|
(glibtop_error, glibtop_warn): Moved the non-GNU-C version of them
|
||||||
|
here from include/glibtop/error.h.
|
||||||
|
(glibtop_error_io, glibtop_warn_io): Likewise.
|
||||||
|
|
||||||
|
2000-02-23 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* autogen.sh: Call it "GNOME Portable System Access Library".
|
||||||
|
|
||||||
|
* LIBGTOP-VERSION (LIBGTOP_VERSION_SUFFIX): Set this to `-snap' so
|
||||||
|
the tarball will be called `libgtop-1.1.6-snap.tar.gz'.
|
||||||
|
|
||||||
|
2000-02-23 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
Fix some True64 issues which were reported from Aron Griffis.
|
||||||
|
|
||||||
|
* libgtop-sysdeps.m4 (GNOME_LIBGTOP_TYPES_PRIVATE): Check for
|
||||||
|
<sys/bittype.h> and use AC_LIBGTOP_CHECK_TYPE, not AC_CHECK_TYPE.
|
||||||
|
|
||||||
|
* include/glibtop/global.h: #include <sys/bittypes.h>.
|
||||||
|
|
||||||
|
* ltmain.sh: Added this from libtool 1.3.4 (only used on Solaris).
|
||||||
|
|
||||||
|
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* lib/init-backends.c (glibtop_backend_*): Removed external declaration.
|
||||||
|
* lib/open-backends.c (backend_init_table): New static variable. This maps
|
||||||
|
backend names to their `glibtop_backend_info' structure.
|
||||||
|
(glibtop_open_backend_l): Make this working for the non-gmodule case.
|
||||||
|
* lib/close.c (close_backend): Likewise.
|
||||||
|
|
||||||
|
* acconfig.h (LIBGTOP_HAVE_SYSDEPS): Added.
|
||||||
|
(LIBGTOP_NEED_SERVER): Added.
|
||||||
|
|
||||||
|
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* ltconfig: Added this to CVS and hacked it to use `$CC -shared'
|
||||||
|
to create shared libraries on Solaris.
|
||||||
|
|
||||||
|
* automake.sh: Don't run libtoolize on Solaris but use the CVS
|
||||||
|
version instead.
|
||||||
|
|
||||||
|
2000-02-16 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* configure.in (LIBGTOP_LIBS): Add `-lgtop_backend_sysdeps' and
|
||||||
|
`-lgtop_backend_common' if dynamic linking does not work.
|
||||||
|
|
||||||
|
* libgtop-sysdeps.m4 (GNOME_LIBGTOP_DYNLINK): New macro to check
|
||||||
|
whether dynamic linking works.
|
||||||
|
(libgtop_use_gmodule): Set this to `yes' or `no' depending on
|
||||||
|
whether dynamic linking of the backends work on the current system.
|
||||||
|
(LIBGTOP_USE_GMODULE): New automake conditional.
|
||||||
|
|
||||||
|
* acconfig.h (LIBGTOP_USE_GMOUDLE): Define this when dynamic
|
||||||
|
linking of the backends work on the current system.
|
||||||
|
|
||||||
|
2000-02-21 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* include/glibtop/interfaces.h (GLIBTOP_STRATEGY_FLAGS_MASK):
|
||||||
|
New constant.
|
||||||
|
|
||||||
|
2000-02-20 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* LIBGTOP-VERSION: Set version number to 1.1.6, binary age 0,
|
||||||
|
interface age 0.
|
||||||
|
|
||||||
|
2000-02-16 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
Released LibGTop 1.1.5 "Sidney".
|
||||||
|
|
||||||
|
2000-02-16 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* sysdeps/sun4: This is very old and obsolete so we won't
|
||||||
|
include it in the tarballs any longer.
|
||||||
|
|
||||||
|
2000-02-16 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* xml.m4: Check for `xmlDocGetRootElement' to make sure we
|
||||||
|
have a recent enough libxml.
|
||||||
|
|
||||||
|
2000-02-13 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* configure.in (AC_LIBTOOL_DLOPEN): Added.
|
||||||
|
|
||||||
|
* lib/sysdeps-init-linux.c (glibtop_sys_siglist): Added labels.
|
||||||
|
* lib/sysdeps-init-freebsd.c (glibtop_sys_siglist): Provide
|
||||||
|
actual implementation.
|
||||||
|
|
||||||
|
2000-02-06 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* lib/sysdeps-init-*.c (glibtop_sys_siglist): Moved here from
|
||||||
|
the sysdeps directories.
|
||||||
|
|
||||||
|
* sysdeps/*/siglist.c: Removed.
|
||||||
|
|
||||||
|
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 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* include/glibtop/ppp.h (glibtop_get_ppp): Removed the `lockfile'
|
||||||
|
argument; we now use a configure check to determine the modem
|
||||||
|
lockfile.
|
||||||
|
|
||||||
|
* include/glibtop/error.h (GLIBTOP_ERROR_NEED_MODEM_LOCKFILE):
|
||||||
|
Removed this now obsolete error constant again.
|
||||||
|
|
||||||
|
* configure.in (--with-modem-lockfile): New configure parameter
|
||||||
|
to manually specify the modem lockfile.
|
||||||
|
(LIBGTOP_MODEM_LOCKFILE): Define this to be a printf-format string
|
||||||
|
for the modem lockfile; takes the interface number as argument.
|
||||||
|
|
||||||
|
2000-02-05 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* include/glibtop/interfaces.h (glibtop_ipv6_scope): New
|
||||||
|
enum for the IPv6 address scope.
|
||||||
|
|
||||||
|
2000-01-31 Yuan-Chung Cheng <platin@linux.org.tw>
|
||||||
|
|
||||||
|
* configure.in: Added "zh_CN.GB2312" to ALL_LINGUAS.
|
||||||
|
|
||||||
|
2000-01-29 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* structures.def (glibtop_ifaddr): Added.
|
||||||
|
|
||||||
|
2000-01-24 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* include/glibtop/netinfo.h (glibtop_netinfo): `address' and
|
||||||
|
`subnet' are now arrays of GLIBTOP_IFADDR_LEN u_int8_t values.
|
||||||
|
(glibtop_get_netinfo): `transport' is now `u_int64_t' and not
|
||||||
|
`unsigned' to make it work with `GLIBTOP_TRANSPORT_ALL'.
|
||||||
|
|
||||||
|
* include/glibtop/limits.h (GLIBTOP_IFADDR_LEN): New constant.
|
||||||
|
This is the length of a network interface address in bytes.
|
||||||
|
|
||||||
|
2000-01-24 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* libgtop-sysdeps.m4 (GNOME_LIBGTOP_TYPES_PRIVATE): New macro.
|
||||||
|
This is the same than `GNOME_LIBGTOP_TYPES' but also checks for
|
||||||
|
`u_int8_t' and `int8_t' and it doesn't force people to put this
|
||||||
|
in their acconfig.h.
|
||||||
|
|
||||||
|
* configure.in: Use GNOME_LIBGTOP_TYPES_PRIVATE instead of
|
||||||
|
GNOME_LIBGTOP_TYPES.
|
||||||
|
|
||||||
|
2000-01-23 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* lib/sysdeps-init-kernel.c: Load the "glibtop-backend-kernel" before
|
||||||
|
"glibtop-backend-command" and "glibtop-backend-sysdeps".
|
||||||
|
|
||||||
|
* libgtop-sysdeps.m4: "kernel" is now a backend and no longer a
|
||||||
|
sysdeps port; we compile the normal "linux" sysdeps dir when we
|
||||||
|
have it.
|
||||||
|
|
||||||
|
* backends/Makefile.am: Only compile `server' and `sysdeps'
|
||||||
|
directories if appropriate.
|
||||||
|
|
||||||
|
2000-01-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* include/glibtop/backend.h (_glibtop_backend_module): Added
|
||||||
|
`extra_libs'.
|
||||||
|
|
||||||
|
* configure.in (LIBGTOP_LIBS): Removed `-lgtop_sysdeps'. This
|
||||||
|
is gmodule loaded from the backend open function.
|
||||||
|
|
||||||
|
* lib/init.c (glibtop_init_s): Don't call glibtop_open_s () here.
|
||||||
|
|
||||||
|
* init-backend.c: Added support for a "ExtraLibs" section in the
|
||||||
|
backend description file.
|
||||||
|
|
||||||
|
2000-01-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* include/glibtop/ppp.h (glibtop_get_ppp): Added `use_isdn' and
|
||||||
|
`lockfile' arguments. When `use_isdn' is TRUE, we return ISDN
|
||||||
|
statistics, otherwise `lockfile' is expected to be the modem
|
||||||
|
lockfile and we return PPP statistics for that Modem.
|
||||||
|
|
||||||
|
Note that for Modem statistics, you need to set both `device' and
|
||||||
|
`lockfile' for some sysdeps ports; so if you have more than one PPP
|
||||||
|
connection active and want to get statistics on the second one you
|
||||||
|
need to set `device' to 1 and `lockfile' to the correct modem lockfile.
|
||||||
|
|
||||||
|
* include/glibtop/error.h (GLIBTOP_ERROR_NEED_MODEM_LOCKFILE): New
|
||||||
|
error constant; this is returned when you call glibtop_get_ppp ()
|
||||||
|
without a modem lockfile and the current sysdeps port requires it.
|
||||||
|
|
||||||
2000-01-18 Martin Baulig <martin@home-of-linux.org>
|
2000-01-18 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* lib/sysdeps-init-osf1.c: New file. Added sysdeps initialization
|
* lib/sysdeps-init-osf1.c: New file. Added sysdeps initialization
|
||||||
|
@@ -8,11 +8,11 @@
|
|||||||
#
|
#
|
||||||
LIBGTOP_MAJOR_VERSION=1
|
LIBGTOP_MAJOR_VERSION=1
|
||||||
LIBGTOP_MINOR_VERSION=1
|
LIBGTOP_MINOR_VERSION=1
|
||||||
LIBGTOP_MICRO_VERSION=5
|
LIBGTOP_MICRO_VERSION=6
|
||||||
|
|
||||||
# you can set this to `-snap' for instance to create
|
# you can set this to `-snap' for instance to create
|
||||||
# a `libgtop-1.x.y-snap.tar.gz' tarball.
|
# a `libgtop-1.x.y-snap.tar.gz' tarball.
|
||||||
LIBGTOP_VERSION_SUFFIX=
|
LIBGTOP_VERSION_SUFFIX=-snap
|
||||||
|
|
||||||
LIBGTOP_INTERFACE_AGE=0
|
LIBGTOP_INTERFACE_AGE=0
|
||||||
LIBGTOP_BINARY_AGE=0
|
LIBGTOP_BINARY_AGE=0
|
||||||
|
24
Makefile.am
24
Makefile.am
@@ -1,21 +1,14 @@
|
|||||||
## Process this file with automake to produce Makefile.in.
|
## Process this file with automake to produce Makefile.in.
|
||||||
|
|
||||||
if BUILD_GNOME_SUPPORT
|
SUBDIRS = po intl misc include lib sysdeps src doc dtd scripts
|
||||||
support = support
|
|
||||||
endif
|
|
||||||
|
|
||||||
SUBDIRS = po intl $(support) macros misc include sysdeps backends lib \
|
|
||||||
src doc scripts
|
|
||||||
|
|
||||||
include_HEADERS = glibtop.h
|
include_HEADERS = glibtop.h
|
||||||
configincludedir = $(pkglibdir)/include
|
configincludedir = $(pkglibdir)/include
|
||||||
|
|
||||||
noinst_HEADERS = glibtop-server-private.h
|
|
||||||
|
|
||||||
EXTRA_DIST = autogen.sh libgtop.spec.in copyright.txt libgtopConf.sh.in \
|
EXTRA_DIST = autogen.sh libgtop.spec.in copyright.txt libgtopConf.sh.in \
|
||||||
LIBGTOP-VERSION features.def structures.def libgtop-config.in \
|
LIBGTOP-VERSION features.def structures.def libgtop-config.in \
|
||||||
RELNOTES-0.25 RELNOTES-1.0 RELNOTES-1.1.x libgtop-sysdeps.m4 README \
|
RELNOTES-0.25 RELNOTES-1.0 RELNOTES-1.1.x libgtop-sysdeps.m4 README \
|
||||||
libgtop-mirror.sh
|
libgtop-mirror.sh libgtop-2.0.pc.in
|
||||||
|
|
||||||
configinclude_DATA = \
|
configinclude_DATA = \
|
||||||
glibtop-config.h
|
glibtop-config.h
|
||||||
@@ -42,15 +35,7 @@ confexec_DATA = $(top_builddir)/libgtopConf.sh \
|
|||||||
|
|
||||||
CLEANFILES=libgtopConf.sh
|
CLEANFILES=libgtopConf.sh
|
||||||
|
|
||||||
bin_SCRIPTS = $(top_builddir)/libgtop-config
|
bin_SCRIPTS = libgtop-config
|
||||||
|
|
||||||
## to automatically rebuild aclocal.m4 if any of the macros in
|
|
||||||
## `macros/' change
|
|
||||||
@MAINT@ include macros/macros.dep
|
|
||||||
@MAINT@macros/macros.dep: macros/Makefile.am
|
|
||||||
@MAINT@ cd macros && $(MAKE) macros.dep
|
|
||||||
|
|
||||||
@MAINT@$(top_srcdir)/aclocal.m4: libgtop-sysdeps.m4 LIBGTOP-VERSION
|
|
||||||
|
|
||||||
## We create libgtopConf.sh here and not from configure because we want
|
## We create libgtopConf.sh here and not from configure because we want
|
||||||
## to get the paths expanded correctly. Macros like srcdir are given
|
## to get the paths expanded correctly. Macros like srcdir are given
|
||||||
@@ -78,6 +63,7 @@ libgtopConf.sh: libgtopConf.sh.in Makefile
|
|||||||
-e 's#\@LIBGTOP_PACKAGE\@#$(LIBGTOP_PACKAGE)#g' \
|
-e 's#\@LIBGTOP_PACKAGE\@#$(LIBGTOP_PACKAGE)#g' \
|
||||||
-e 's#\@libgtop_sysdeps_dir\@#$(libgtop_sysdeps_dir)#g' \
|
-e 's#\@libgtop_sysdeps_dir\@#$(libgtop_sysdeps_dir)#g' \
|
||||||
-e 's#\@libgtop_need_server\@#$(libgtop_need_server)#g' \
|
-e 's#\@libgtop_need_server\@#$(libgtop_need_server)#g' \
|
||||||
|
-e 's#\@libgtop_have_sysdeps\@#$(libgtop_have_sysdeps)#g' \
|
||||||
-e 's#\@libgtop_use_machine_h\@#$(libgtop_use_machine_h)#g' \
|
-e 's#\@libgtop_use_machine_h\@#$(libgtop_use_machine_h)#g' \
|
||||||
< $(srcdir)/libgtopConf.sh.in > libgtopConf.tmp \
|
< $(srcdir)/libgtopConf.sh.in > libgtopConf.tmp \
|
||||||
&& mv libgtopConf.tmp libgtopConf.sh
|
&& mv libgtopConf.tmp libgtopConf.sh
|
||||||
@@ -94,3 +80,5 @@ libgtop-features.def: features.def
|
|||||||
libgtop-structures.def: structures.def
|
libgtop-structures.def: structures.def
|
||||||
@LN_S@ $< $@
|
@LN_S@ $< $@
|
||||||
|
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = libgtop-2.0.pc
|
||||||
|
11
NEWS
11
NEWS
@@ -1,3 +1,14 @@
|
|||||||
|
February 16, 2000:
|
||||||
|
=================
|
||||||
|
|
||||||
|
* Released LibGTop 1.1.5 "Sidney"
|
||||||
|
|
||||||
|
This is a developer's snapshot for the GUADEC CD-ROM. It
|
||||||
|
should work without problems on most recent GNU/Linux and
|
||||||
|
BSD systems. The Solaris port compiles, but has some dynamic
|
||||||
|
linking issues - please use LibGTop 1.1.2.1 on Solaris for
|
||||||
|
the moment until this is fixed.
|
||||||
|
|
||||||
January 14, 1999:
|
January 14, 1999:
|
||||||
================
|
================
|
||||||
|
|
||||||
|
66
acconfig.h
66
acconfig.h
@@ -1,23 +1,5 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||||
|
|
||||||
|
|
||||||
/* Define if gethostname () must be declared. */
|
|
||||||
#undef NEED_DECLARATION_GETHOSTNAME
|
|
||||||
|
|
||||||
/* Define if setreuid () must be declared. */
|
|
||||||
#undef NEED_DECLARATION_SETREUID
|
|
||||||
|
|
||||||
/* Define if setregid () must be declared. */
|
|
||||||
#undef NEED_DECLARATION_SETREGID
|
|
||||||
|
|
||||||
/* Define if getpagesize () must be declared. */
|
|
||||||
#undef NEED_DECLARATION_GETPAGESIZE
|
|
||||||
|
|
||||||
/* Define if program_invocation_name must be declared. */
|
|
||||||
#undef NEED_DECLARATION_PROGRAM_INVOCATION_NAME
|
|
||||||
|
|
||||||
@TOP@
|
|
||||||
|
|
||||||
#undef ENABLE_NLS
|
#undef ENABLE_NLS
|
||||||
#undef HAVE_CATGETS
|
#undef HAVE_CATGETS
|
||||||
#undef HAVE_GETTEXT
|
#undef HAVE_GETTEXT
|
||||||
@@ -31,8 +13,6 @@
|
|||||||
#undef HAVE_LIBINTL_H
|
#undef HAVE_LIBINTL_H
|
||||||
#undef HAVE_GTK_SIGNAL_HANDLER_PENDING
|
#undef HAVE_GTK_SIGNAL_HANDLER_PENDING
|
||||||
|
|
||||||
/* Do not remove this comments and the empty lines; they are needed */
|
|
||||||
#undef HAVE_PROGRAM_INVOCATION_SHORT_NAME
|
|
||||||
/* Define if you have the Andrew File System. */
|
/* Define if you have the Andrew File System. */
|
||||||
#undef AFS
|
#undef AFS
|
||||||
|
|
||||||
@@ -112,41 +92,19 @@
|
|||||||
SunOS 4.1.1 seems not to be affected.] */
|
SunOS 4.1.1 seems not to be affected.] */
|
||||||
#undef STATFS_TRUNCATES_BLOCK_COUNTS
|
#undef STATFS_TRUNCATES_BLOCK_COUNTS
|
||||||
|
|
||||||
|
|
||||||
/* to fix a bug in autoheader on DEC OSF1. */
|
|
||||||
#undef HAVE_PROGRAM_INVOCATION_NAME
|
|
||||||
|
|
||||||
#undef HAVE_SOCKETS
|
#undef HAVE_SOCKETS
|
||||||
#undef HAVE_SOCKADDR_SUN_LEN
|
#undef HAVE_SOCKADDR_SUN_LEN
|
||||||
|
|
||||||
#undef HAVE_LIBJPEG
|
|
||||||
#undef HAVE_LIBGIF
|
|
||||||
#undef HAVE_LIBTIFF
|
|
||||||
#undef HAVE_LIBZ
|
|
||||||
#undef HAVE_LIBPNG
|
|
||||||
#undef HAVE_GMP2_INCLUDE_DIR
|
|
||||||
|
|
||||||
#undef ssize_t
|
#undef ssize_t
|
||||||
#undef u_int64_t
|
#undef u_int64_t
|
||||||
#undef int64_t
|
#undef int64_t
|
||||||
|
#undef u_int8_t
|
||||||
|
#undef int8_t
|
||||||
|
|
||||||
#undef HAVE_GLIBTOP_MACHINE_H
|
|
||||||
|
|
||||||
#undef GLIBTOP_NAMES
|
|
||||||
#undef GLIBTOP_EXAMPLES
|
|
||||||
#undef GLIBTOP_INODEDB
|
#undef GLIBTOP_INODEDB
|
||||||
|
|
||||||
#undef NEED_LIBGTOP
|
|
||||||
|
|
||||||
#undef HAVE_LINUX_SYSCTL
|
|
||||||
#undef HAVE_LIBGTOP_SMP
|
|
||||||
|
|
||||||
#undef HAVE_XAUTH
|
#undef HAVE_XAUTH
|
||||||
|
|
||||||
/* Define if your have the I4B package. */
|
|
||||||
#undef HAVE_I4B
|
|
||||||
#undef HAVE_I4B_ACCT
|
|
||||||
|
|
||||||
/* Define to enable debugging. */
|
/* Define to enable debugging. */
|
||||||
#undef LIBGTOP_ENABLE_DEBUG
|
#undef LIBGTOP_ENABLE_DEBUG
|
||||||
#undef LIBGTOP_FATAL_WARNINGS
|
#undef LIBGTOP_FATAL_WARNINGS
|
||||||
@@ -154,23 +112,3 @@
|
|||||||
/* Define to use glib's malloc. */
|
/* Define to use glib's malloc. */
|
||||||
#undef LIBGTOP_USE_GLIB_MALLOC
|
#undef LIBGTOP_USE_GLIB_MALLOC
|
||||||
|
|
||||||
/* Same as LINUX_VERSION_CODE either from <linux/version.h> or from
|
|
||||||
* the running kernel (if we don't have configured kernel sources).
|
|
||||||
*/
|
|
||||||
#undef GLIBTOP_LINUX_VERSION_CODE
|
|
||||||
|
|
||||||
/* Solaris release code (eg. 251 for Solaris 2.5.1). */
|
|
||||||
#undef GLIBTOP_SOLARIS_RELEASE
|
|
||||||
|
|
||||||
/* Define if you want to use LibGTop without GNOME. */
|
|
||||||
#undef WITHOUT_GNOME
|
|
||||||
|
|
||||||
/* Define if you have the <procfs.h> header file */
|
|
||||||
#undef HAVE_PROCFS_H
|
|
||||||
|
|
||||||
/* Define if you have the <sys/procfs.h> header file */
|
|
||||||
#undef HAVE_SYS_PROCFS_H
|
|
||||||
|
|
||||||
/* Define if you have the libxml library */
|
|
||||||
#undef HAVE_LIBXML
|
|
||||||
|
|
||||||
|
414
acinclude.m4
Normal file
414
acinclude.m4
Normal file
@@ -0,0 +1,414 @@
|
|||||||
|
dnl
|
||||||
|
dnl GNOME_FILEUTILS_CHECKS
|
||||||
|
dnl
|
||||||
|
dnl checks that are needed for the diskusage applet.
|
||||||
|
dnl
|
||||||
|
|
||||||
|
AC_DEFUN([GNOME_FILEUTILS_CHECKS],
|
||||||
|
[
|
||||||
|
AC_CHECK_HEADERS(fcntl.h sys/param.h sys/statfs.h sys/fstyp.h \
|
||||||
|
mnttab.h mntent.h sys/statvfs.h sys/vfs.h sys/mount.h \
|
||||||
|
sys/filsys.h sys/fs_types.h sys/fs/s5param.h)
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS(bcopy endgrent endpwent fchdir ftime ftruncate \
|
||||||
|
getcwd getmntinfo gettimeofday isascii lchown \
|
||||||
|
listmntent memcpy mkfifo strchr strerror strrchr vprintf)
|
||||||
|
|
||||||
|
dnl Set some defaults when cross-compiling
|
||||||
|
|
||||||
|
if test x$cross_compiling = xyes ; then
|
||||||
|
case "$host_os" in
|
||||||
|
linux*)
|
||||||
|
fu_cv_sys_mounted_getmntent1=yes
|
||||||
|
fu_cv_sys_stat_statfs2_bsize=yes
|
||||||
|
;;
|
||||||
|
sunos*)
|
||||||
|
fu_cv_sys_stat_statfs4=yes
|
||||||
|
;;
|
||||||
|
freebsd*)
|
||||||
|
fu_cv_sys_stat_statfs2_bsize=yes
|
||||||
|
;;
|
||||||
|
osf*)
|
||||||
|
fu_cv_sys_stat_statfs3_osf1=yes
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Determine how to get the list of mounted filesystems.
|
||||||
|
list_mounted_fs=
|
||||||
|
|
||||||
|
# If the getmntent function is available but not in the standard library,
|
||||||
|
# make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX).
|
||||||
|
AC_FUNC_GETMNTENT
|
||||||
|
|
||||||
|
# This test must precede the ones for getmntent because Unicos-9 is
|
||||||
|
# reported to have the getmntent function, but its support is incompatible
|
||||||
|
# with other getmntent implementations.
|
||||||
|
|
||||||
|
# NOTE: Normally, I wouldn't use a check for system type as I've done for
|
||||||
|
# `CRAY' below since that goes against the whole autoconf philosophy. But
|
||||||
|
# I think there is too great a chance that some non-Cray system has a
|
||||||
|
# function named listmntent to risk the false positive.
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# Cray UNICOS 9
|
||||||
|
AC_MSG_CHECKING([for listmntent of Cray/Unicos-9])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_cray_listmntent,
|
||||||
|
[fu_cv_sys_mounted_cray_listmntent=no
|
||||||
|
AC_EGREP_CPP(yes,
|
||||||
|
[#ifdef _CRAY
|
||||||
|
yes
|
||||||
|
#endif
|
||||||
|
], [test $ac_cv_func_listmntent = yes \
|
||||||
|
&& fu_cv_sys_mounted_cray_listmntent=yes]
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_cray_listmntent)
|
||||||
|
if test $fu_cv_sys_mounted_cray_listmntent = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_LISTMNTENT)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $ac_cv_func_getmntent = yes; then
|
||||||
|
|
||||||
|
# This system has the getmntent function.
|
||||||
|
# Determine whether it's the one-argument variant or the two-argument one.
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# 4.3BSD, SunOS, HP-UX, Dynix, Irix
|
||||||
|
AC_MSG_CHECKING([for one-argument getmntent function])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_getmntent1,
|
||||||
|
[test $ac_cv_header_mntent_h = yes \
|
||||||
|
&& fu_cv_sys_mounted_getmntent1=yes \
|
||||||
|
|| fu_cv_sys_mounted_getmntent1=no])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1)
|
||||||
|
if test $fu_cv_sys_mounted_getmntent1 = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_GETMNTENT1)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# SVR4
|
||||||
|
AC_MSG_CHECKING([for two-argument getmntent function])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_getmntent2,
|
||||||
|
[AC_EGREP_HEADER(getmntent, sys/mnttab.h,
|
||||||
|
fu_cv_sys_mounted_getmntent2=yes,
|
||||||
|
fu_cv_sys_mounted_getmntent2=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_getmntent2)
|
||||||
|
if test $fu_cv_sys_mounted_getmntent2 = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_GETMNTENT2)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
AC_MSG_ERROR([could not determine how to read list of mounted filesystems])
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# DEC Alpha running OSF/1.
|
||||||
|
AC_MSG_CHECKING([for getfsstat function])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_getsstat,
|
||||||
|
[AC_TRY_LINK([
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/mount.h>
|
||||||
|
#include <sys/fs_types.h>],
|
||||||
|
[struct statfs *stats;
|
||||||
|
int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); ],
|
||||||
|
fu_cv_sys_mounted_getsstat=yes,
|
||||||
|
fu_cv_sys_mounted_getsstat=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_getsstat)
|
||||||
|
if test $fu_cv_sys_mounted_getsstat = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_GETFSSTAT)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# AIX.
|
||||||
|
AC_MSG_CHECKING([for mntctl function and struct vmount])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_vmount,
|
||||||
|
[AC_TRY_CPP([#include <fshelp.h>],
|
||||||
|
fu_cv_sys_mounted_vmount=yes,
|
||||||
|
fu_cv_sys_mounted_vmount=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_vmount)
|
||||||
|
if test $fu_cv_sys_mounted_vmount = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_VMOUNT)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# SVR3
|
||||||
|
AC_MSG_CHECKING([for FIXME existence of three headers])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_fread_fstyp,
|
||||||
|
[AC_TRY_CPP([
|
||||||
|
#include <sys/statfs.h>
|
||||||
|
#include <sys/fstyp.h>
|
||||||
|
#include <mnttab.h>],
|
||||||
|
fu_cv_sys_mounted_fread_fstyp=yes,
|
||||||
|
fu_cv_sys_mounted_fread_fstyp=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_fread_fstyp)
|
||||||
|
if test $fu_cv_sys_mounted_fread_fstyp = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_FREAD_FSTYP)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# 4.4BSD and DEC OSF/1.
|
||||||
|
AC_MSG_CHECKING([for getmntinfo function])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo,
|
||||||
|
[
|
||||||
|
ok=
|
||||||
|
if test $ac_cv_func_getmntinfo = yes; then
|
||||||
|
AC_EGREP_HEADER(f_type;, sys/mount.h,
|
||||||
|
ok=yes)
|
||||||
|
fi
|
||||||
|
test -n "$ok" \
|
||||||
|
&& fu_cv_sys_mounted_getmntinfo=yes \
|
||||||
|
|| fu_cv_sys_mounted_getmntinfo=no
|
||||||
|
])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo)
|
||||||
|
if test $fu_cv_sys_mounted_getmntinfo = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_GETMNTINFO)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# FIXME: add a test for netbsd-1.1 here
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# Ultrix
|
||||||
|
AC_MSG_CHECKING([for getmnt function])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_getmnt,
|
||||||
|
[AC_TRY_CPP([
|
||||||
|
#include <sys/fs_types.h>
|
||||||
|
#include <sys/mount.h>],
|
||||||
|
fu_cv_sys_mounted_getmnt=yes,
|
||||||
|
fu_cv_sys_mounted_getmnt=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_getmnt)
|
||||||
|
if test $fu_cv_sys_mounted_getmnt = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_GETMNT)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
# SVR2
|
||||||
|
AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_mounted_fread,
|
||||||
|
[AC_TRY_CPP([#include <mnttab.h>],
|
||||||
|
fu_cv_sys_mounted_fread=yes,
|
||||||
|
fu_cv_sys_mounted_fread=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_mounted_fread)
|
||||||
|
if test $fu_cv_sys_mounted_fread = yes; then
|
||||||
|
list_mounted_fs=found
|
||||||
|
AC_DEFINE(MOUNTED_FREAD)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$list_mounted_fs"; then
|
||||||
|
AC_MSG_ERROR([could not determine how to read list of mounted filesystems])
|
||||||
|
# FIXME -- no need to abort building the whole package
|
||||||
|
# Can't build mountlist.c or anything that needs its functions
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_CHECKING(how to get filesystem space usage)
|
||||||
|
space=no
|
||||||
|
|
||||||
|
# Perform only the link test since it seems there are no variants of the
|
||||||
|
# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs)
|
||||||
|
# because that got a false positive on SCO OSR5. Adding the declaration
|
||||||
|
# of a `struct statvfs' causes this test to fail (as it should) on such
|
||||||
|
# systems. That system is reported to work fine with STAT_STATFS4 which
|
||||||
|
# is what it gets when this test fails.
|
||||||
|
if test $space = no; then
|
||||||
|
# SVR4
|
||||||
|
AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
|
||||||
|
[AC_TRY_LINK([#include <sys/types.h>
|
||||||
|
#include <sys/statvfs.h>],
|
||||||
|
[struct statvfs fsd; statvfs (0, &fsd);],
|
||||||
|
fu_cv_sys_stat_statvfs=yes,
|
||||||
|
fu_cv_sys_stat_statvfs=no)])
|
||||||
|
if test $fu_cv_sys_stat_statvfs = yes; then
|
||||||
|
space=yes
|
||||||
|
AC_DEFINE(STAT_STATVFS)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $space = no; then
|
||||||
|
# DEC Alpha running OSF/1
|
||||||
|
AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
|
||||||
|
[AC_TRY_RUN([
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/mount.h>
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
struct statfs fsd;
|
||||||
|
fsd.f_fsize = 0;
|
||||||
|
exit (statfs (".", &fsd, sizeof (struct statfs)));
|
||||||
|
}],
|
||||||
|
fu_cv_sys_stat_statfs3_osf1=yes,
|
||||||
|
fu_cv_sys_stat_statfs3_osf1=no,
|
||||||
|
fu_cv_sys_stat_statfs3_osf1=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
|
||||||
|
if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
|
||||||
|
space=yes
|
||||||
|
AC_DEFINE(STAT_STATFS3_OSF1)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $space = no; then
|
||||||
|
# AIX
|
||||||
|
AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
|
||||||
|
member (AIX, 4.3BSD)])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
|
||||||
|
[AC_TRY_RUN([
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_MOUNT_H
|
||||||
|
#include <sys/mount.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_VFS_H
|
||||||
|
#include <sys/vfs.h>
|
||||||
|
#endif
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
struct statfs fsd;
|
||||||
|
fsd.f_bsize = 0;
|
||||||
|
exit (statfs (".", &fsd));
|
||||||
|
}],
|
||||||
|
fu_cv_sys_stat_statfs2_bsize=yes,
|
||||||
|
fu_cv_sys_stat_statfs2_bsize=no,
|
||||||
|
fu_cv_sys_stat_statfs2_bsize=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
|
||||||
|
if test $fu_cv_sys_stat_statfs2_bsize = yes; then
|
||||||
|
space=yes
|
||||||
|
AC_DEFINE(STAT_STATFS2_BSIZE)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $space = no; then
|
||||||
|
# SVR3
|
||||||
|
AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
|
||||||
|
[AC_TRY_RUN([#include <sys/types.h>
|
||||||
|
#include <sys/statfs.h>
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
struct statfs fsd;
|
||||||
|
exit (statfs (".", &fsd, sizeof fsd, 0));
|
||||||
|
}],
|
||||||
|
fu_cv_sys_stat_statfs4=yes,
|
||||||
|
fu_cv_sys_stat_statfs4=no,
|
||||||
|
fu_cv_sys_stat_statfs4=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
|
||||||
|
if test $fu_cv_sys_stat_statfs4 = yes; then
|
||||||
|
space=yes
|
||||||
|
AC_DEFINE(STAT_STATFS4)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $space = no; then
|
||||||
|
# 4.4BSD and NetBSD
|
||||||
|
AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
|
||||||
|
member (4.4BSD and NetBSD)])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
|
||||||
|
[AC_TRY_RUN([#include <sys/types.h>
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_MOUNT_H
|
||||||
|
#include <sys/mount.h>
|
||||||
|
#endif
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
struct statfs fsd;
|
||||||
|
fsd.f_fsize = 0;
|
||||||
|
exit (statfs (".", &fsd));
|
||||||
|
}],
|
||||||
|
fu_cv_sys_stat_statfs2_fsize=yes,
|
||||||
|
fu_cv_sys_stat_statfs2_fsize=no,
|
||||||
|
fu_cv_sys_stat_statfs2_fsize=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
|
||||||
|
if test $fu_cv_sys_stat_statfs2_fsize = yes; then
|
||||||
|
space=yes
|
||||||
|
AC_DEFINE(STAT_STATFS2_FSIZE)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $space = no; then
|
||||||
|
# Ultrix
|
||||||
|
AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
|
||||||
|
[AC_TRY_RUN([#include <sys/types.h>
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_MOUNT_H
|
||||||
|
#include <sys/mount.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_FS_TYPES_H
|
||||||
|
#include <sys/fs_types.h>
|
||||||
|
#endif
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
struct fs_data fsd;
|
||||||
|
/* Ultrix's statfs returns 1 for success,
|
||||||
|
0 for not mounted, -1 for failure. */
|
||||||
|
exit (statfs (".", &fsd) != 1);
|
||||||
|
}],
|
||||||
|
fu_cv_sys_stat_fs_data=yes,
|
||||||
|
fu_cv_sys_stat_fs_data=no,
|
||||||
|
fu_cv_sys_stat_fs_data=no)])
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
|
||||||
|
if test $fu_cv_sys_stat_fs_data = yes; then
|
||||||
|
space=yes
|
||||||
|
AC_DEFINE(STAT_STATFS2_FS_DATA)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $space = no; then
|
||||||
|
# SVR2
|
||||||
|
AC_TRY_CPP([#include <sys/filsys.h>],
|
||||||
|
AC_DEFINE(STAT_READ_FILSYS) space=yes)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$list_mounted_fs" && test $space != no; then
|
||||||
|
DF_PROG="df"
|
||||||
|
# LIBOBJS="$LIBOBJS fsusage.o"
|
||||||
|
# LIBOBJS="$LIBOBJS mountlist.o"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for SunOS statfs brokenness wrt partitions 2GB and larger.
|
||||||
|
# If <sys/vfs.h> exists and struct statfs has a member named f_spare,
|
||||||
|
# enable the work-around code in fsusage.c.
|
||||||
|
AC_MSG_CHECKING([for statfs that truncates block counts])
|
||||||
|
AC_CACHE_VAL(fu_cv_sys_truncating_statfs,
|
||||||
|
[AC_TRY_COMPILE([
|
||||||
|
#if !defined(sun) && !defined(__sun)
|
||||||
|
choke -- this is a workaround for a Sun-specific problem
|
||||||
|
#endif
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/vfs.h>],
|
||||||
|
[struct statfs t; long c = *(t.f_spare);],
|
||||||
|
fu_cv_sys_truncating_statfs=yes,
|
||||||
|
fu_cv_sys_truncating_statfs=no,
|
||||||
|
)])
|
||||||
|
if test $fu_cv_sys_truncating_statfs = yes; then
|
||||||
|
AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS)
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($fu_cv_sys_truncating_statfs)
|
||||||
|
|
||||||
|
AC_CHECKING(for AFS)
|
||||||
|
test -d /afs && AC_DEFINE(AFS)
|
||||||
|
])
|
@@ -4,7 +4,7 @@
|
|||||||
srcdir=`dirname $0`
|
srcdir=`dirname $0`
|
||||||
test -z "$srcdir" && srcdir=.
|
test -z "$srcdir" && srcdir=.
|
||||||
|
|
||||||
PKG_NAME="Gnome Top Library"
|
PKG_NAME="GNOME Portable System Access Library"
|
||||||
|
|
||||||
(test -f $srcdir/configure.in \
|
(test -f $srcdir/configure.in \
|
||||||
&& test -f $srcdir/copyright.txt \
|
&& test -f $srcdir/copyright.txt \
|
||||||
@@ -14,8 +14,7 @@ PKG_NAME="Gnome Top Library"
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
. $srcdir/macros/autogen.sh
|
USE_GNOME2_MACROS=1 . gnome-autogen.sh
|
||||||
cp -f $srcdir/po/Makefile.in.in.in $srcdir/po/Makefile.in.in
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo " *** IMPORTANT *** "
|
echo " *** IMPORTANT *** "
|
||||||
|
@@ -1 +1,15 @@
|
|||||||
SUBDIRS = server sysdeps common
|
if NEED_LIBGTOP
|
||||||
|
server_dir = server
|
||||||
|
else
|
||||||
|
server_dir =
|
||||||
|
endif
|
||||||
|
|
||||||
|
if HAVE_SYSDEPS
|
||||||
|
sysdeps_dir = sysdeps
|
||||||
|
else
|
||||||
|
sysdeps_dir =
|
||||||
|
endif
|
||||||
|
|
||||||
|
SUBDIRS = $(server_dir) $(sysdeps_dir) common
|
||||||
|
|
||||||
|
DIST_SUBDIRS = server sysdeps common
|
||||||
|
@@ -1,3 +1,28 @@
|
|||||||
|
2000-11-26 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* glibtop-backend-private.h: Removed.
|
||||||
|
|
||||||
|
* backend-common.h: New files.
|
||||||
|
|
||||||
|
* backend-common.c (_open_common): Don't overwrite
|
||||||
|
`backend->_priv'.
|
||||||
|
|
||||||
|
2000-11-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* Makefile.am: Link libgtop_backend_common.la against
|
||||||
|
$(top_builddir)/sysdeps/common/libgtop_common.la and
|
||||||
|
$(top_builddir)/lib/libgtop_server.la.
|
||||||
|
|
||||||
|
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* backend-sysdeps.c (LibGTopBackendInfo): Call this
|
||||||
|
`LibGTopBackendInfo_Common' when we don't use gmodule.
|
||||||
|
|
||||||
|
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* Makefile.am: Only install the libs in $(LIBGTOP_BACKEND_DIR)
|
||||||
|
when we LIBGTOP_USE_GMODULE and in $(libdir) otherwise.
|
||||||
|
|
||||||
2000-01-12 Martin Baulig <martin@home-of-linux.org>
|
2000-01-12 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* Makefile.am: Install everything in $(LIBGTOP_BACKEND_DIR).
|
* Makefile.am: Install everything in $(LIBGTOP_BACKEND_DIR).
|
||||||
|
@@ -4,13 +4,21 @@ INCLUDES = @INCLUDES@
|
|||||||
|
|
||||||
backenddir = @LIBGTOP_BACKEND_DIR@
|
backenddir = @LIBGTOP_BACKEND_DIR@
|
||||||
|
|
||||||
|
if LIBGTOP_USE_GMODULE
|
||||||
|
backendlibdir = $(backenddir)
|
||||||
|
else
|
||||||
|
backendlibdir = $(libdir)
|
||||||
|
endif
|
||||||
|
|
||||||
|
dynamic_ldflags = @libgtop_dynamic_ldflags@
|
||||||
|
|
||||||
backend_DATA = \
|
backend_DATA = \
|
||||||
libgtop-common.backend
|
libgtop-common.backend
|
||||||
|
|
||||||
noinst_HEADERS = \
|
noinst_HEADERS = \
|
||||||
glibtop-backend-private.h
|
backend-common.h
|
||||||
|
|
||||||
backend_LTLIBRARIES = \
|
backendlib_LTLIBRARIES = \
|
||||||
libgtop_backend_common.la
|
libgtop_backend_common.la
|
||||||
|
|
||||||
libgtop_backend_common_la_SOURCES = \
|
libgtop_backend_common_la_SOURCES = \
|
||||||
@@ -18,7 +26,11 @@ libgtop_backend_common_la_SOURCES = \
|
|||||||
marshal.c
|
marshal.c
|
||||||
|
|
||||||
libgtop_backend_common_la_LDFLAGS = \
|
libgtop_backend_common_la_LDFLAGS = \
|
||||||
$(LT_VERSION_INFO) -export-dynamic
|
$(LT_VERSION_INFO) $(dynamic_ldflags)
|
||||||
|
|
||||||
|
libgtop_backend_common_la_LIBADD = \
|
||||||
|
$(top_builddir)/sysdeps/common/libgtop_common.la \
|
||||||
|
$(top_builddir)/lib/libgtop_server.la
|
||||||
|
|
||||||
BUILT_SOURCES = \
|
BUILT_SOURCES = \
|
||||||
marshal.c
|
marshal.c
|
||||||
|
@@ -23,40 +23,39 @@
|
|||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glibtop.h>
|
#include <backend-common.h>
|
||||||
#include <glibtop/global.h>
|
|
||||||
#include <glibtop/xmalloc.h>
|
|
||||||
|
|
||||||
#include <glibtop/open.h>
|
|
||||||
#include <glibtop/backend.h>
|
|
||||||
#include <glibtop-backend-private.h>
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_open_common (glibtop *, glibtop_backend *, u_int64_t, const char **);
|
_open_common (glibtop_server *, glibtop_backend *, u_int64_t, const char **);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_close_common (glibtop *, glibtop_backend *);
|
_close_common (glibtop_server *, glibtop_backend *, void *closure);
|
||||||
|
|
||||||
extern glibtop_call_vector glibtop_backend_common_call_vector;
|
extern glibtop_call_vector glibtop_backend_common_call_vector;
|
||||||
|
|
||||||
|
#ifdef LIBGTOP_USE_GMODULE
|
||||||
glibtop_backend_info LibGTopBackendInfo = {
|
glibtop_backend_info LibGTopBackendInfo = {
|
||||||
"glibtop-backend-common", _open_common, _close_common,
|
"glibtop-backend-common", _open_common, _close_common,
|
||||||
&glibtop_backend_common_call_vector
|
&glibtop_backend_common_call_vector
|
||||||
};
|
};
|
||||||
|
#else
|
||||||
|
glibtop_backend_info LibGTopBackendInfo_Common = {
|
||||||
|
"glibtop-backend-common", _open_common, _close_common,
|
||||||
|
&glibtop_backend_common_call_vector
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_open_common (glibtop *server, glibtop_backend *backend,
|
_open_common (glibtop_server *server, glibtop_backend *backend,
|
||||||
u_int64_t features, const char **backend_args)
|
u_int64_t features, const char **backend_args)
|
||||||
{
|
{
|
||||||
backend->_priv = glibtop_calloc_r
|
|
||||||
(server, 1, sizeof (glibtop_backend_private));
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_close_common (glibtop *server, glibtop_backend *backend)
|
_close_common (glibtop_server *server, glibtop_backend *backend,
|
||||||
|
void *closure)
|
||||||
{
|
{
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -23,15 +23,15 @@
|
|||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __GLIBTOP_BACKEND_COMMON_H__
|
||||||
|
#define __GLIBTOP_BACKEND_COMMON_H__
|
||||||
|
|
||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
#include <glibtop/open.h>
|
#include <glibtop/open.h>
|
||||||
#include <glibtop/close.h>
|
#include <glibtop/xmalloc.h>
|
||||||
|
#include <glibtop/glibtop-backend.h>
|
||||||
|
#include <glibtop/glibtop-backend-info.h>
|
||||||
|
|
||||||
void
|
#endif
|
||||||
glibtop_open_s (glibtop *server, const char *program_name,
|
|
||||||
const unsigned long features, const unsigned flags)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
void
|
|
||||||
glibtop_close_s (glibtop *server)
|
|
||||||
{ }
|
|
@@ -1,4 +1,5 @@
|
|||||||
<?xml version="1.0"?> <!-- -*-xml-*- -->
|
<?xml version="1.0"?> <!-- -*-xml-*- -->
|
||||||
|
<!DOCTYPE libgtop:backends SYSTEM 'libgtop-backends.dtd'>
|
||||||
<libgtop:Backends xmlns:libgtop="http://www.home-of-linux.org/libgtop/1.1">
|
<libgtop:Backends xmlns:libgtop="http://www.home-of-linux.org/libgtop/1.1">
|
||||||
|
|
||||||
<libgtop:Backend>
|
<libgtop:Backend>
|
||||||
|
@@ -24,16 +24,12 @@ print '/* marshal.c */';
|
|||||||
print "/* This is a generated file. Please modify `marshal.pl' */";
|
print "/* This is a generated file. Please modify `marshal.pl' */";
|
||||||
print '';
|
print '';
|
||||||
|
|
||||||
print '#include <glibtop.h>';
|
print '#include <backend-common.h>';
|
||||||
print '#include <glibtop/open.h>';
|
|
||||||
print '#include <glibtop/xmalloc.h>';
|
|
||||||
print '';
|
print '';
|
||||||
print '#include <glibtop/sysdeps.h>';
|
print '#include <glibtop/sysdeps.h>';
|
||||||
print '#include <glibtop/union.h>';
|
print '#include <glibtop/union.h>';
|
||||||
print '';
|
print '';
|
||||||
print '#include <glibtop/backend.h>';
|
print '#include <glibtop/call-vector.h>';
|
||||||
print '';
|
|
||||||
print '#include <glibtop-backend-private.h>';
|
|
||||||
print '';
|
print '';
|
||||||
|
|
||||||
$feature_count = 0;
|
$feature_count = 0;
|
||||||
@@ -141,16 +137,16 @@ sub output {
|
|||||||
|
|
||||||
$func_decl = 'static '.$retval."\n";
|
$func_decl = 'static '.$retval."\n";
|
||||||
if ($line_fields[3] eq '') {
|
if ($line_fields[3] eq '') {
|
||||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend%s)\n",
|
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure%s)\n",
|
||||||
$feature, $param_decl);
|
$feature, $param_decl);
|
||||||
} elsif ($line_fields[3] eq 'array') {
|
} elsif ($line_fields[3] eq 'array') {
|
||||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, glibtop_array *array%s)\n",
|
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, glibtop_array *array%s)\n",
|
||||||
$feature, $param_decl);
|
$feature, $param_decl);
|
||||||
} elsif ($line_fields[3] =~ /^array/) {
|
} elsif ($line_fields[3] =~ /^array/) {
|
||||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, glibtop_array *array, %s *buf%s)\n",
|
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, glibtop_array *array, %s *buf%s)\n",
|
||||||
$feature, 'glibtop_'.$feature, $param_decl);
|
$feature, 'glibtop_'.$feature, $param_decl);
|
||||||
} else {
|
} else {
|
||||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, %s *buf%s)\n",
|
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, %s *buf%s)\n",
|
||||||
$feature, 'glibtop_'.$feature, $param_decl);
|
$feature, 'glibtop_'.$feature, $param_decl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,3 +1,38 @@
|
|||||||
|
2000-11-27 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* backend-server.c (backend_server_quark): New global variable.
|
||||||
|
(_open_server, _close_server): Use the quark.
|
||||||
|
* commands.c: Likewise.
|
||||||
|
|
||||||
|
2000-11-26 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* backend-server.h: New file.
|
||||||
|
(backend_server_private): New struct, formerly known
|
||||||
|
as glibtop_backend_private.
|
||||||
|
|
||||||
|
* glibtop-backend-private.h: Removed.
|
||||||
|
|
||||||
|
* backend-server.c: (_open_server): Use g_object_set_data()
|
||||||
|
to set add the backend_server_private data to the glibtop_backend,
|
||||||
|
don't override `backend->_priv'.
|
||||||
|
(_close_server): Use g_object_get_data() to get the data.
|
||||||
|
[FIXME: Use quarks directly.]
|
||||||
|
|
||||||
|
* read.c: (glibtop_read_i): Replaced the glibtop_server and
|
||||||
|
glibtop_backend arguments with backend_server_private.
|
||||||
|
* read_data.c: (glibtop_read_data_i): Likewise.
|
||||||
|
* write.c: (glibtop_write_i): Likewise.
|
||||||
|
|
||||||
|
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* backend-sysdeps.c (LibGTopBackendInfo): Call this
|
||||||
|
`LibGTopBackendInfo_Server' when we don't use gmodule.
|
||||||
|
|
||||||
|
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* Makefile.am: Only install the libs in $(LIBGTOP_BACKEND_DIR)
|
||||||
|
when we LIBGTOP_USE_GMODULE and in $(libdir) otherwise.
|
||||||
|
|
||||||
2000-01-18 Martin Baulig <martin@home-of-linux.org>
|
2000-01-18 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* demarshal.pl: Only emit code for functions which are
|
* demarshal.pl: Only emit code for functions which are
|
||||||
|
@@ -7,13 +7,21 @@ INCLUDES = @INCLUDES@ -D_BSD \
|
|||||||
|
|
||||||
backenddir = @LIBGTOP_BACKEND_DIR@
|
backenddir = @LIBGTOP_BACKEND_DIR@
|
||||||
|
|
||||||
|
if LIBGTOP_USE_GMODULE
|
||||||
|
backendlibdir = $(backenddir)
|
||||||
|
else
|
||||||
|
backendlibdir = $(libdir)
|
||||||
|
endif
|
||||||
|
|
||||||
|
dynamic_ldflags = @libgtop_dynamic_ldflags@
|
||||||
|
|
||||||
backend_DATA = \
|
backend_DATA = \
|
||||||
libgtop-server.backend
|
libgtop-server.backend
|
||||||
|
|
||||||
noinst_HEADERS = \
|
noinst_HEADERS = \
|
||||||
glibtop-backend-private.h
|
backend-server.h
|
||||||
|
|
||||||
backend_LTLIBRARIES = \
|
backendlib_LTLIBRARIES = \
|
||||||
libgtop_backend_server.la
|
libgtop_backend_server.la
|
||||||
|
|
||||||
bin_PROGRAMS = \
|
bin_PROGRAMS = \
|
||||||
@@ -31,7 +39,7 @@ libgtop_backend_server_la_SOURCES = \
|
|||||||
write.c
|
write.c
|
||||||
|
|
||||||
libgtop_backend_server_la_LDFLAGS = \
|
libgtop_backend_server_la_LDFLAGS = \
|
||||||
$(LT_VERSION_INFO) -export-dynamic
|
$(LT_VERSION_INFO) $(dynamic_ldflags)
|
||||||
|
|
||||||
libgtop_server_SOURCES = \
|
libgtop_server_SOURCES = \
|
||||||
server.c \
|
server.c \
|
||||||
|
@@ -23,78 +23,90 @@
|
|||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glibtop.h>
|
#include <backend-server.h>
|
||||||
#include <glibtop/global.h>
|
|
||||||
#include <glibtop/xmalloc.h>
|
|
||||||
|
|
||||||
#include <glibtop/backend.h>
|
|
||||||
#include <glibtop-backend-private.h>
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_open_server (glibtop *, glibtop_backend *, u_int64_t, const char **);
|
_open_server (glibtop_server *, glibtop_backend *, u_int64_t, const char **);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_close_server (glibtop *, glibtop_backend *);
|
_close_server (glibtop_server *, glibtop_backend *, void *);
|
||||||
|
|
||||||
extern glibtop_call_vector glibtop_backend_server_call_vector;
|
extern glibtop_call_vector glibtop_backend_server_call_vector;
|
||||||
|
|
||||||
|
#ifdef LIBGTOP_USE_GMODULE
|
||||||
glibtop_backend_info LibGTopBackendInfo = {
|
glibtop_backend_info LibGTopBackendInfo = {
|
||||||
"glibtop-backend-server", _open_server, _close_server,
|
"glibtop-backend-server", _open_server, _close_server,
|
||||||
&glibtop_backend_server_call_vector
|
&glibtop_backend_server_call_vector
|
||||||
};
|
};
|
||||||
|
#else
|
||||||
static int
|
glibtop_backend_info LibGTopBackendInfo_Server = {
|
||||||
_open_server (glibtop *server, glibtop_backend *backend,
|
"glibtop-backend-server", _open_server, _close_server,
|
||||||
u_int64_t features, const char **backend_args)
|
&glibtop_backend_server_call_vector
|
||||||
{
|
};
|
||||||
backend->_priv = glibtop_calloc_r
|
|
||||||
(server, 1, sizeof (glibtop_backend_private));
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
fprintf (stderr, "open_server - %p, %p, %p\n", server, backend,
|
|
||||||
backend->_priv);
|
|
||||||
|
|
||||||
fprintf (stderr, "Opening pipe to server (%s).\n",
|
|
||||||
LIBGTOP_SERVER);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (pipe (backend->_priv->input) ||
|
static int
|
||||||
pipe (backend->_priv->output)) {
|
_open_server (glibtop_server *server, glibtop_backend *backend,
|
||||||
|
u_int64_t features, const char **backend_args)
|
||||||
|
{
|
||||||
|
backend_server_private *priv;
|
||||||
|
|
||||||
|
priv = glibtop_calloc_r (server, 1, sizeof (backend_server_private));
|
||||||
|
|
||||||
|
glibtop_backend_set_closure_data (backend, priv);
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf (stderr, "open_server - %p, %p, %p\n", server, backend, priv);
|
||||||
|
|
||||||
|
fprintf (stderr, "Opening pipe to server (%s).\n", LIBGTOP_SERVER);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (pipe (priv->input) || pipe (priv->output)) {
|
||||||
glibtop_warn_io_r (server, "cannot make a pipe");
|
glibtop_warn_io_r (server, "cannot make a pipe");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
backend->_priv->pid = fork ();
|
priv->pid = fork ();
|
||||||
|
|
||||||
if (backend->_priv->pid < 0) {
|
if (priv->pid < 0) {
|
||||||
glibtop_warn_io_r (server, "fork failed");
|
glibtop_warn_io_r (server, "fork failed");
|
||||||
return -1;
|
return -1;
|
||||||
} else if (backend->_priv->pid == 0) {
|
} else if (priv->pid == 0) {
|
||||||
close (0); close (1);
|
close (0); close (1);
|
||||||
close (backend->_priv->input [0]);
|
close (priv->input [0]);
|
||||||
close (backend->_priv->output [1]);
|
close (priv->output [1]);
|
||||||
dup2 (backend->_priv->input [1], 1);
|
dup2 (priv->input [1], 1);
|
||||||
dup2 (backend->_priv->output [0], 0);
|
dup2 (priv->output [0], 0);
|
||||||
execl (LIBGTOP_SERVER, "libgtop-server", NULL);
|
execl (LIBGTOP_SERVER, "libgtop-server", NULL);
|
||||||
glibtop_error_io_r (server, "execl (%s)",
|
glibtop_error_io_r (server, "execl (%s)",
|
||||||
LIBGTOP_SERVER);
|
LIBGTOP_SERVER);
|
||||||
_exit (2);
|
_exit (2);
|
||||||
}
|
}
|
||||||
|
|
||||||
close (backend->_priv->input [1]);
|
close (priv->input [1]);
|
||||||
close (backend->_priv->output [0]);
|
close (priv->output [0]);
|
||||||
|
|
||||||
|
glibtop_server_ref (server);
|
||||||
|
priv->server = server;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_close_server (glibtop *server, glibtop_backend *backend)
|
_close_server (glibtop_server *server, glibtop_backend *backend,
|
||||||
|
void *closure)
|
||||||
{
|
{
|
||||||
kill (backend->_priv->pid, SIGKILL);
|
backend_server_private *priv = closure;
|
||||||
close (backend->_priv->input [0]);
|
|
||||||
close (backend->_priv->output [1]);
|
|
||||||
|
|
||||||
backend->_priv->pid = 0;
|
kill (priv->pid, SIGKILL);
|
||||||
|
close (priv->input [0]);
|
||||||
|
close (priv->output [1]);
|
||||||
|
|
||||||
|
glibtop_server_unref (priv->server);
|
||||||
|
|
||||||
|
priv->pid = 0;
|
||||||
|
|
||||||
|
g_free (priv);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -23,33 +23,44 @@
|
|||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __GLIBTOP_BACKEND_PRIVATE_H__
|
#ifndef __GLIBTOP_BACKEND_COMMON_H__
|
||||||
#define __GLIBTOP_BACKEND_PRIVATE_H__
|
#define __GLIBTOP_BACKEND_COMMON_H__
|
||||||
|
|
||||||
struct _glibtop_backend_private
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
|
#include <glibtop/open.h>
|
||||||
|
#include <glibtop/xmalloc.h>
|
||||||
|
#include <glibtop/glibtop-backend.h>
|
||||||
|
#include <glibtop/glibtop-backend-info.h>
|
||||||
|
|
||||||
|
typedef struct _backend_server_private backend_server_private;
|
||||||
|
|
||||||
|
struct _backend_server_private
|
||||||
{
|
{
|
||||||
u_int64_t flags;
|
u_int64_t flags;
|
||||||
int input [2]; /* Pipe client <- server */
|
int input [2]; /* Pipe client <- server */
|
||||||
int output [2]; /* Pipe client -> server */
|
int output [2]; /* Pipe client -> server */
|
||||||
pid_t pid; /* PID of the server */
|
pid_t pid; /* PID of the server */
|
||||||
|
|
||||||
|
glibtop_server *server;
|
||||||
};
|
};
|
||||||
|
|
||||||
void *
|
void *
|
||||||
glibtop_call_i (glibtop *server, glibtop_backend *backend, unsigned command,
|
glibtop_call_i (glibtop_server *server, backend_server_private *priv,
|
||||||
size_t send_size, const void *send_ptr,
|
unsigned command, size_t send_size, const void *send_ptr,
|
||||||
size_t data_size, const void *data_ptr,
|
size_t data_size, const void *data_ptr,
|
||||||
size_t recv_size, void *recv_ptr,
|
size_t recv_size, void *recv_ptr,
|
||||||
int *retval_ptr);
|
int *retval_ptr);
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_read_i (glibtop *server, glibtop_backend *backend,
|
glibtop_read_i (backend_server_private *priv, size_t size, void *buf);
|
||||||
size_t size, void *buf);
|
|
||||||
|
|
||||||
void *
|
void *
|
||||||
glibtop_read_data_i (glibtop *server, glibtop_backend *backend);
|
glibtop_read_data_i (backend_server_private *priv);
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_write_i (glibtop *server, glibtop_backend *backend,
|
glibtop_write_i (backend_server_private *priv, size_t size, const void *buf);
|
||||||
size_t size, const void *buf);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@@ -23,19 +23,13 @@
|
|||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glibtop/xmalloc.h>
|
#include <backend-server.h>
|
||||||
|
|
||||||
#include <glibtop.h>
|
|
||||||
#include <glibtop/error.h>
|
|
||||||
#include <glibtop/backend.h>
|
|
||||||
|
|
||||||
#include <glibtop-backend-private.h>
|
|
||||||
|
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
|
|
||||||
void *
|
void *
|
||||||
glibtop_call_i (glibtop *server, glibtop_backend *backend, unsigned command,
|
glibtop_call_i (glibtop_server *server, backend_server_private *priv,
|
||||||
size_t send_size, const void *send_buf,
|
unsigned command, size_t send_size, const void *send_buf,
|
||||||
size_t data_size, const void *data_buf,
|
size_t data_size, const void *data_buf,
|
||||||
size_t recv_size, void *recv_ptr,
|
size_t recv_size, void *recv_ptr,
|
||||||
int *retval_ptr)
|
int *retval_ptr)
|
||||||
@@ -46,8 +40,6 @@ glibtop_call_i (glibtop *server, glibtop_backend *backend, unsigned command,
|
|||||||
int retval;
|
int retval;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
glibtop_init_r (&server, 0, 0);
|
|
||||||
|
|
||||||
memset (&cmnd, 0, sizeof (glibtop_command));
|
memset (&cmnd, 0, sizeof (glibtop_command));
|
||||||
memset (&resp, 0, sizeof (glibtop_response));
|
memset (&resp, 0, sizeof (glibtop_response));
|
||||||
|
|
||||||
@@ -66,16 +58,16 @@ glibtop_call_i (glibtop *server, glibtop_backend *backend, unsigned command,
|
|||||||
|
|
||||||
cmnd.data_size = data_size;
|
cmnd.data_size = data_size;
|
||||||
|
|
||||||
glibtop_write_i (server, backend, sizeof (glibtop_command), &cmnd);
|
glibtop_write_i (priv, sizeof (glibtop_command), &cmnd);
|
||||||
|
|
||||||
if (data_size) {
|
if (data_size) {
|
||||||
#ifdef SLAVE_DEBUG
|
#ifdef SLAVE_DEBUG
|
||||||
fprintf (stderr, "SENDING %d bytes of DATA.\n", data_size);
|
fprintf (stderr, "SENDING %d bytes of DATA.\n", data_size);
|
||||||
#endif
|
#endif
|
||||||
glibtop_write_i (server, backend, data_size, data_buf);
|
glibtop_write_i (priv, data_size, data_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
glibtop_read_i (server, backend, sizeof (glibtop_response), &resp);
|
glibtop_read_i (priv, sizeof (glibtop_response), &resp);
|
||||||
|
|
||||||
#ifdef SLAVE_DEBUG
|
#ifdef SLAVE_DEBUG
|
||||||
fprintf (stderr, "RESPONSE: %d - %d - %ld - %ld - %p - %ld\n",
|
fprintf (stderr, "RESPONSE: %d - %d - %ld - %ld - %p - %ld\n",
|
||||||
@@ -94,12 +86,12 @@ glibtop_call_i (glibtop *server, glibtop_backend *backend, unsigned command,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (recv_ptr)
|
if (recv_ptr)
|
||||||
glibtop_read_i (server, backend, recv_size, recv_ptr);
|
glibtop_read_i (priv, recv_size, recv_ptr);
|
||||||
|
|
||||||
if (resp.data_size) {
|
if (resp.data_size) {
|
||||||
void *ptr = glibtop_malloc_r (server, resp.data_size);
|
void *ptr = glibtop_malloc_r (server, resp.data_size);
|
||||||
|
|
||||||
glibtop_read_i (server, backend, resp.data_size, ptr);
|
glibtop_read_i (priv, resp.data_size, ptr);
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
<?xml version="1.0"?> <!-- -*-xml-*- -->
|
<?xml version="1.0"?> <!-- -*-xml-*- -->
|
||||||
|
<!DOCTYPE libgtop:backends SYSTEM 'libgtop-backends.dtd'>
|
||||||
<libgtop:Backends xmlns:libgtop="http://www.home-of-linux.org/libgtop/1.1">
|
<libgtop:Backends xmlns:libgtop="http://www.home-of-linux.org/libgtop/1.1">
|
||||||
|
|
||||||
<libgtop:Backend>
|
<libgtop:Backend>
|
||||||
|
@@ -24,17 +24,13 @@ print '/* marshal.c */';
|
|||||||
print "/* This is a generated file. Please modify `marshal.pl' */";
|
print "/* This is a generated file. Please modify `marshal.pl' */";
|
||||||
print '';
|
print '';
|
||||||
|
|
||||||
print '#include <glibtop.h>';
|
print '#include <backend-server.h>';
|
||||||
print '#include <glibtop/open.h>';
|
|
||||||
print '#include <glibtop/xmalloc.h>';
|
|
||||||
print '';
|
print '';
|
||||||
print '#include <glibtop/sysdeps.h>';
|
print '#include <glibtop/sysdeps.h>';
|
||||||
print '#include <glibtop/union.h>';
|
print '#include <glibtop/union.h>';
|
||||||
print '';
|
print '';
|
||||||
print '#include "command.h"';
|
print '#include "command.h"';
|
||||||
print '#include <glibtop/backend.h>';
|
print '#include <glibtop/call-vector.h>';
|
||||||
print '';
|
|
||||||
print '#include <glibtop-backend-private.h>';
|
|
||||||
print '';
|
print '';
|
||||||
|
|
||||||
$feature_count = 0;
|
$feature_count = 0;
|
||||||
@@ -202,7 +198,7 @@ sub output {
|
|||||||
$send_buf_code .= "\t_LIBGTOP_DATA_ptr = _LIBGTOP_DATA_buf;\n";
|
$send_buf_code .= "\t_LIBGTOP_DATA_ptr = _LIBGTOP_DATA_buf;\n";
|
||||||
|
|
||||||
$call_code = '';
|
$call_code = '';
|
||||||
$call_code .= sprintf ("\t%sglibtop_call_i (server, backend, GLIBTOP_CMND_%s,\n",
|
$call_code .= sprintf ("\t%sglibtop_call_i (server, closure, GLIBTOP_CMND_%s,\n",
|
||||||
$call_prefix, &toupper($feature));
|
$call_prefix, &toupper($feature));
|
||||||
$call_code .= sprintf ("\t\t\t%s%s, %s,\n", $call_prefix_space,
|
$call_code .= sprintf ("\t\t\t%s%s, %s,\n", $call_prefix_space,
|
||||||
"_LIBGTOP_SEND_len", "_LIBGTOP_SEND_buf");
|
"_LIBGTOP_SEND_len", "_LIBGTOP_SEND_buf");
|
||||||
@@ -261,16 +257,16 @@ sub output {
|
|||||||
|
|
||||||
$func_decl = 'static '.$retval."\n";
|
$func_decl = 'static '.$retval."\n";
|
||||||
if ($line_fields[3] eq '') {
|
if ($line_fields[3] eq '') {
|
||||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend%s)\n",
|
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure%s)\n",
|
||||||
$feature, $param_decl);
|
$feature, $param_decl);
|
||||||
} elsif ($line_fields[3] eq 'array') {
|
} elsif ($line_fields[3] eq 'array') {
|
||||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, glibtop_array *array%s)\n",
|
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, glibtop_array *array%s)\n",
|
||||||
$feature, $param_decl);
|
$feature, $param_decl);
|
||||||
} elsif ($line_fields[3] =~ /^array/) {
|
} elsif ($line_fields[3] =~ /^array/) {
|
||||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, glibtop_array *array, %s *buf%s)\n",
|
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, glibtop_array *array, %s *buf%s)\n",
|
||||||
$feature, 'glibtop_'.$feature, $param_decl);
|
$feature, 'glibtop_'.$feature, $param_decl);
|
||||||
} else {
|
} else {
|
||||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, %s *buf%s)\n",
|
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, %s *buf%s)\n",
|
||||||
$feature, 'glibtop_'.$feature, $param_decl);
|
$feature, 'glibtop_'.$feature, $param_decl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -23,31 +23,24 @@
|
|||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glibtop.h>
|
#include <backend-server.h>
|
||||||
#include <glibtop/error.h>
|
|
||||||
#include <glibtop/backend.h>
|
|
||||||
|
|
||||||
#include <glibtop-backend-private.h>
|
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_read_i (glibtop *server, glibtop_backend *backend,
|
glibtop_read_i (backend_server_private *priv, size_t size, void *buf)
|
||||||
size_t size, void *buf)
|
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
glibtop_init_r (&server, 0, 0);
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf (stderr, "LIBRARY: really reading %d bytes from %d.\n",
|
fprintf (stderr, "LIBRARY: really reading %d bytes from %d.\n",
|
||||||
size, backend->_priv->input [0]);
|
size, priv->input [0]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ret = read (backend->_priv->input [0], buf, size);
|
ret = read (priv->input [0], buf, size);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf (stderr, "LIBRARY: read %d bytes.\n", ret);
|
fprintf (stderr, "LIBRARY: read %d bytes.\n", ret);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
glibtop_error_io_r (server, "read %d bytes", size);
|
glibtop_error_io_r (priv->server, "read %d bytes", size);
|
||||||
}
|
}
|
||||||
|
@@ -23,15 +23,10 @@
|
|||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glibtop.h>
|
#include <backend-server.h>
|
||||||
#include <glibtop/error.h>
|
|
||||||
#include <glibtop/xmalloc.h>
|
|
||||||
#include <glibtop/backend.h>
|
|
||||||
|
|
||||||
#include <glibtop-backend-private.h>
|
|
||||||
|
|
||||||
void *
|
void *
|
||||||
glibtop_read_data_i (glibtop *server, glibtop_backend *backend)
|
glibtop_read_data_i (backend_server_private *priv)
|
||||||
{
|
{
|
||||||
size_t size;
|
size_t size;
|
||||||
void *ptr;
|
void *ptr;
|
||||||
@@ -41,11 +36,10 @@ glibtop_read_data_i (glibtop *server, glibtop_backend *backend)
|
|||||||
fprintf (stderr, "LIBRARY: reading %d data bytes.\n", sizeof (size_t));
|
fprintf (stderr, "LIBRARY: reading %d data bytes.\n", sizeof (size_t));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ret = read (backend->_priv->input [0], (void *)&size,
|
ret = read (priv->input [0], (void *)&size, sizeof (size_t));
|
||||||
sizeof (size_t));
|
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
glibtop_error_io_r (server, "read data size");
|
glibtop_error_io_r (priv->server, "read data size");
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf (stderr, "LIBRARY: really reading %d data bytes (ret = %d).\n", size, ret);
|
fprintf (stderr, "LIBRARY: really reading %d data bytes (ret = %d).\n", size, ret);
|
||||||
@@ -53,12 +47,12 @@ glibtop_read_data_i (glibtop *server, glibtop_backend *backend)
|
|||||||
|
|
||||||
if (!size) return NULL;
|
if (!size) return NULL;
|
||||||
|
|
||||||
ptr = glibtop_malloc_r (server, size);
|
ptr = glibtop_malloc_r (priv->server, size);
|
||||||
|
|
||||||
ret = read (backend->_priv->input [0], ptr, size);
|
ret = read (priv->input [0], ptr, size);
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
glibtop_error_io_r (server, "read data %d bytes");
|
glibtop_error_io_r (priv->server, "read data %d bytes");
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
@@ -23,15 +23,10 @@
|
|||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glibtop.h>
|
#include <backend-server.h>
|
||||||
#include <glibtop/error.h>
|
|
||||||
#include <glibtop/backend.h>
|
|
||||||
|
|
||||||
#include <glibtop-backend-private.h>
|
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_write_i (glibtop *server, glibtop_backend *backend,
|
glibtop_write_i (backend_server_private *priv, size_t size, const void *buf)
|
||||||
size_t size, const void *buf)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@@ -41,8 +36,8 @@ glibtop_write_i (glibtop *server, glibtop_backend *backend,
|
|||||||
fprintf (stderr, "LIBRARY: really writing %d bytes.\n", size);
|
fprintf (stderr, "LIBRARY: really writing %d bytes.\n", size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ret = write (backend->_priv->output [1], buf, size);
|
ret = write (priv->output [1], buf, size);
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
glibtop_error_io_r (server, "write %d bytes", size);
|
glibtop_error_io_r (priv->server, "write %d bytes", size);
|
||||||
}
|
}
|
||||||
|
@@ -1,3 +1,35 @@
|
|||||||
|
2000-11-26 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* glibtop-backend-private.h: Removed.
|
||||||
|
|
||||||
|
* backend-sysdeps.h: New files.
|
||||||
|
|
||||||
|
* backend-sysdeps.c (_open_sysdeps): Don't overwrite
|
||||||
|
`backend->_priv'.
|
||||||
|
|
||||||
|
2000-11-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* Makefile.am: Link libgtop_backend_sysdeps.la against
|
||||||
|
$(top_builddir)/sysdeps/$(sysdeps_dir)/libgtop_sysdeps.la and
|
||||||
|
$(top_builddir)/lib/libgtop_server.la.
|
||||||
|
|
||||||
|
* libgtop-sysdeps.backend: Removed the ExtraLibs section.
|
||||||
|
|
||||||
|
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* backend-sysdeps.c (LibGTopBackendInfo): Call this
|
||||||
|
`LibGTopBackendInfo_Sysdeps' when we don't use gmodule.
|
||||||
|
|
||||||
|
2000-02-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* Makefile.am: Only install the libs in $(LIBGTOP_BACKEND_DIR)
|
||||||
|
when we LIBGTOP_USE_GMODULE and in $(libdir) otherwise.
|
||||||
|
|
||||||
|
2000-01-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* libgtop-sysdeps.backend: Added "ExtraLibs" section to
|
||||||
|
load `-lgtop_sysdeps'.
|
||||||
|
|
||||||
2000-01-12 Martin Baulig <martin@home-of-linux.org>
|
2000-01-12 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* Makefile.am: Install everything in $(LIBGTOP_BACKEND_DIR).
|
* Makefile.am: Install everything in $(LIBGTOP_BACKEND_DIR).
|
||||||
|
@@ -4,13 +4,21 @@ INCLUDES = @INCLUDES@
|
|||||||
|
|
||||||
backenddir = @LIBGTOP_BACKEND_DIR@
|
backenddir = @LIBGTOP_BACKEND_DIR@
|
||||||
|
|
||||||
|
if LIBGTOP_USE_GMODULE
|
||||||
|
backendlibdir = $(backenddir)
|
||||||
|
else
|
||||||
|
backendlibdir = $(libdir)
|
||||||
|
endif
|
||||||
|
|
||||||
|
dynamic_ldflags = @libgtop_dynamic_ldflags@
|
||||||
|
|
||||||
backend_DATA = \
|
backend_DATA = \
|
||||||
libgtop-sysdeps.backend
|
libgtop-sysdeps.backend
|
||||||
|
|
||||||
noinst_HEADERS = \
|
noinst_HEADERS = \
|
||||||
glibtop-backend-private.h
|
backend-sysdeps.h
|
||||||
|
|
||||||
backend_LTLIBRARIES = \
|
backendlib_LTLIBRARIES = \
|
||||||
libgtop_backend_sysdeps.la
|
libgtop_backend_sysdeps.la
|
||||||
|
|
||||||
libgtop_backend_sysdeps_la_SOURCES = \
|
libgtop_backend_sysdeps_la_SOURCES = \
|
||||||
@@ -18,7 +26,11 @@ libgtop_backend_sysdeps_la_SOURCES = \
|
|||||||
marshal.c
|
marshal.c
|
||||||
|
|
||||||
libgtop_backend_sysdeps_la_LDFLAGS = \
|
libgtop_backend_sysdeps_la_LDFLAGS = \
|
||||||
$(LT_VERSION_INFO) -export-dynamic
|
$(LT_VERSION_INFO) $(dynamic_ldflags)
|
||||||
|
|
||||||
|
libgtop_backend_sysdeps_la_LIBADD = \
|
||||||
|
$(top_builddir)/sysdeps/$(sysdeps_dir)/libgtop_sysdeps.la
|
||||||
|
$(top_builddir)/lib/libgtop_server.la
|
||||||
|
|
||||||
BUILT_SOURCES = \
|
BUILT_SOURCES = \
|
||||||
marshal.c
|
marshal.c
|
||||||
|
@@ -23,36 +23,34 @@
|
|||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glibtop.h>
|
#include <backend-sysdeps.h>
|
||||||
#include <glibtop/global.h>
|
|
||||||
#include <glibtop/xmalloc.h>
|
|
||||||
|
|
||||||
#include <glibtop/open.h>
|
|
||||||
#include <glibtop/backend.h>
|
|
||||||
#include <glibtop-backend-private.h>
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_open_sysdeps (glibtop *, glibtop_backend *, u_int64_t, const char **);
|
_open_sysdeps (glibtop_server *, glibtop_backend *, u_int64_t, const char **);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_close_sysdeps (glibtop *, glibtop_backend *);
|
_close_sysdeps (glibtop_server *, glibtop_backend *, void *);
|
||||||
|
|
||||||
extern glibtop_call_vector glibtop_backend_sysdeps_call_vector;
|
extern glibtop_call_vector glibtop_backend_sysdeps_call_vector;
|
||||||
|
|
||||||
|
#ifdef LIBGTOP_USE_GMODULE
|
||||||
glibtop_backend_info LibGTopBackendInfo = {
|
glibtop_backend_info LibGTopBackendInfo = {
|
||||||
"glibtop-backend-sysdeps", _open_sysdeps, _close_sysdeps,
|
"glibtop-backend-sysdeps", _open_sysdeps, _close_sysdeps,
|
||||||
&glibtop_backend_sysdeps_call_vector
|
&glibtop_backend_sysdeps_call_vector
|
||||||
};
|
};
|
||||||
|
#else
|
||||||
|
glibtop_backend_info LibGTopBackendInfo_Sysdeps = {
|
||||||
|
"glibtop-backend-sysdeps", _open_sysdeps, _close_sysdeps,
|
||||||
|
&glibtop_backend_sysdeps_call_vector
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_open_sysdeps (glibtop *server, glibtop_backend *backend,
|
_open_sysdeps (glibtop_server *server, glibtop_backend *backend,
|
||||||
u_int64_t features, const char **backend_args)
|
u_int64_t features, const char **backend_args)
|
||||||
{
|
{
|
||||||
glibtop_init_func_t *init_fkt;
|
glibtop_init_func_t *init_fkt;
|
||||||
|
|
||||||
backend->_priv = glibtop_calloc_r
|
|
||||||
(server, 1, sizeof (glibtop_backend_private));
|
|
||||||
|
|
||||||
/* Do the initialization, but only if not already initialized. */
|
/* Do the initialization, but only if not already initialized. */
|
||||||
|
|
||||||
if ((server->flags & _GLIBTOP_INIT_STATE_SYSDEPS) == 0) {
|
if ((server->flags & _GLIBTOP_INIT_STATE_SYSDEPS) == 0) {
|
||||||
@@ -61,7 +59,7 @@ _open_sysdeps (glibtop *server, glibtop_backend *backend,
|
|||||||
for (init_fkt = _glibtop_init_hook_s; *init_fkt; init_fkt++)
|
for (init_fkt = _glibtop_init_hook_s; *init_fkt; init_fkt++)
|
||||||
(*init_fkt) (server);
|
(*init_fkt) (server);
|
||||||
|
|
||||||
server->sysdeps.pointer_size = sizeof (void*)*8;
|
server->info->sysdeps.pointer_size = sizeof (void*)*8;
|
||||||
|
|
||||||
server->flags |= _GLIBTOP_INIT_STATE_SYSDEPS;
|
server->flags |= _GLIBTOP_INIT_STATE_SYSDEPS;
|
||||||
}
|
}
|
||||||
@@ -70,8 +68,9 @@ _open_sysdeps (glibtop *server, glibtop_backend *backend,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_close_sysdeps (glibtop *server, glibtop_backend *backend)
|
_close_sysdeps (glibtop_server *server, glibtop_backend *backend,
|
||||||
|
void *closure)
|
||||||
{
|
{
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -23,17 +23,15 @@
|
|||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __GLIBTOP_BACKEND_SYSDEPS_H__
|
||||||
|
#define __GLIBTOP_BACKEND_SYSDEPS_H__
|
||||||
|
|
||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
#include <glibtop/open.h>
|
#include <glibtop/open.h>
|
||||||
#include <glibtop/close.h>
|
#include <glibtop/xmalloc.h>
|
||||||
|
#include <glibtop/glibtop-backend.h>
|
||||||
|
#include <glibtop/glibtop-backend-info.h>
|
||||||
|
|
||||||
void
|
#endif
|
||||||
glibtop_open_s (glibtop *server,
|
|
||||||
const char *program_name,
|
|
||||||
const unsigned long features,
|
|
||||||
const unsigned flags)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
void
|
|
||||||
glibtop_close_s (glibtop *server)
|
|
||||||
{ }
|
|
@@ -1,34 +0,0 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
|
||||||
This file is part of LibGTop 1.0.
|
|
||||||
|
|
||||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GLIBTOP_BACKEND_PRIVATE_H__
|
|
||||||
#define __GLIBTOP_BACKEND_PRIVATE_H__
|
|
||||||
|
|
||||||
struct _glibtop_backend_private
|
|
||||||
{
|
|
||||||
u_int64_t flags;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,4 +1,5 @@
|
|||||||
<?xml version="1.0"?> <!-- -*-xml-*- -->
|
<?xml version="1.0"?> <!-- -*-xml-*- -->
|
||||||
|
<!DOCTYPE libgtop:backends SYSTEM 'libgtop-backends.dtd'>
|
||||||
<libgtop:Backends xmlns:libgtop="http://www.home-of-linux.org/libgtop/1.1">
|
<libgtop:Backends xmlns:libgtop="http://www.home-of-linux.org/libgtop/1.1">
|
||||||
|
|
||||||
<libgtop:Backend>
|
<libgtop:Backend>
|
||||||
|
@@ -24,16 +24,12 @@ print '/* marshal.c */';
|
|||||||
print "/* This is a generated file. Please modify `marshal.pl' */";
|
print "/* This is a generated file. Please modify `marshal.pl' */";
|
||||||
print '';
|
print '';
|
||||||
|
|
||||||
print '#include <glibtop.h>';
|
print '#include <backend-sysdeps.h>';
|
||||||
print '#include <glibtop/open.h>';
|
|
||||||
print '#include <glibtop/xmalloc.h>';
|
|
||||||
print '';
|
print '';
|
||||||
print '#include <glibtop/sysdeps.h>';
|
print '#include <glibtop/sysdeps.h>';
|
||||||
print '#include <glibtop/union.h>';
|
print '#include <glibtop/union.h>';
|
||||||
print '';
|
print '';
|
||||||
print '#include <glibtop/backend.h>';
|
print '#include <glibtop/call-vector.h>';
|
||||||
print '';
|
|
||||||
print '#include <glibtop-backend-private.h>';
|
|
||||||
print '';
|
print '';
|
||||||
|
|
||||||
$feature_count = 0;
|
$feature_count = 0;
|
||||||
@@ -141,16 +137,16 @@ sub output {
|
|||||||
|
|
||||||
$func_decl = 'static '.$retval."\n";
|
$func_decl = 'static '.$retval."\n";
|
||||||
if ($line_fields[3] eq '') {
|
if ($line_fields[3] eq '') {
|
||||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend%s)\n",
|
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure%s)\n",
|
||||||
$feature, $param_decl);
|
$feature, $param_decl);
|
||||||
} elsif ($line_fields[3] eq 'array') {
|
} elsif ($line_fields[3] eq 'array') {
|
||||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, glibtop_array *array%s)\n",
|
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, glibtop_array *array%s)\n",
|
||||||
$feature, $param_decl);
|
$feature, $param_decl);
|
||||||
} elsif ($line_fields[3] =~ /^array/) {
|
} elsif ($line_fields[3] =~ /^array/) {
|
||||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, glibtop_array *array, %s *buf%s)\n",
|
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, glibtop_array *array, %s *buf%s)\n",
|
||||||
$feature, 'glibtop_'.$feature, $param_decl);
|
$feature, 'glibtop_'.$feature, $param_decl);
|
||||||
} else {
|
} else {
|
||||||
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, %s *buf%s)\n",
|
$func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, void *closure, %s *buf%s)\n",
|
||||||
$feature, 'glibtop_'.$feature, $param_decl);
|
$feature, 'glibtop_'.$feature, $param_decl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
348
configure.in
348
configure.in
@@ -6,6 +6,19 @@ AC_INIT(copyright.txt)
|
|||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
|
||||||
|
if test -z "$I_LIKE_PAIN"; then
|
||||||
|
AC_MSG_ERROR([
|
||||||
|
*** You don't want this version of libgtop!
|
||||||
|
*** If you want the GNOME 2.0 port then check out
|
||||||
|
*** the libgtop-GNOME-2-0-port branch of libgtop
|
||||||
|
*** You can do this by typing
|
||||||
|
*** cvs update -r libgtop-GNOME-2-0-port libgtop/
|
||||||
|
*** in the directory above this one.
|
||||||
|
*** If you are looking for the stable branch then
|
||||||
|
*** check out the LIBGTOP_STABLE_1_0 branch
|
||||||
|
***])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl This is required at several places
|
dnl This is required at several places
|
||||||
AC_CHECK_PROG(ac_dc_found, dc, yes, no)
|
AC_CHECK_PROG(ac_dc_found, dc, yes, no)
|
||||||
if test x$ac_dc_found != xyes ; then
|
if test x$ac_dc_found != xyes ; then
|
||||||
@@ -30,7 +43,6 @@ AC_SUBST(LIBGTOP_MINOR_VERSION)
|
|||||||
AC_SUBST(LIBGTOP_MICRO_VERSION)
|
AC_SUBST(LIBGTOP_MICRO_VERSION)
|
||||||
AC_SUBST(LIBGTOP_INTERFACE_AGE)
|
AC_SUBST(LIBGTOP_INTERFACE_AGE)
|
||||||
AC_SUBST(LIBGTOP_BINARY_AGE)
|
AC_SUBST(LIBGTOP_BINARY_AGE)
|
||||||
AC_SUBST(LIBGTOP_SERVER_VERSION)
|
|
||||||
AC_SUBST(LIBGTOP_VERSION)
|
AC_SUBST(LIBGTOP_VERSION)
|
||||||
AC_SUBST(LIBGTOP_VERSION_CODE)
|
AC_SUBST(LIBGTOP_VERSION_CODE)
|
||||||
AC_SUBST(LIBGTOP_VERSION_SUFFIX)
|
AC_SUBST(LIBGTOP_VERSION_SUFFIX)
|
||||||
@@ -50,7 +62,8 @@ AC_SUBST(LT_CURRENT)
|
|||||||
AC_SUBST(LT_REVISION)
|
AC_SUBST(LT_REVISION)
|
||||||
AC_SUBST(LT_AGE)
|
AC_SUBST(LT_AGE)
|
||||||
|
|
||||||
AM_ACLOCAL_INCLUDE(. macros)
|
GNOME_COMMON_INIT
|
||||||
|
GNOME_PLATFORM_GNOME_2(yes, force)
|
||||||
|
|
||||||
AC_ISC_POSIX
|
AC_ISC_POSIX
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
@@ -85,49 +98,21 @@ AC_PROG_MAKE_SET
|
|||||||
|
|
||||||
export cross_compiling
|
export cross_compiling
|
||||||
|
|
||||||
|
AC_LIBTOOL_DLOPEN
|
||||||
AM_PROG_LIBTOOL
|
AM_PROG_LIBTOOL
|
||||||
|
|
||||||
dnl Let the user enable compiler warnings
|
dnl Let the user enable compiler warnings
|
||||||
GNOME_COMPILE_WARNINGS
|
GNOME_COMPILE_WARNINGS
|
||||||
|
|
||||||
GNOME_INIT_HOOK(gnome_found=yes)
|
dnl PKGCONFIG_CHECK_MODULES(GNOMESUPPORT, libgnomesupport-2.0:1.96.0)
|
||||||
|
dnl AC_SUBST(GNOMESUPPORT_CFLAGS)
|
||||||
if test "x$gnome_found" != xyes; then
|
dnl AC_SUBST(GNOMESUPPORT_LIBS)
|
||||||
if test "x$want_gnome" != xno ; then
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** GNOME was not found on this system. ***
|
|
||||||
|
|
||||||
*** If you want to use LibGTop without GNOME, you need
|
|
||||||
*** to give configure the --without-gnome parameter.
|
|
||||||
])
|
|
||||||
else
|
|
||||||
AC_DEFINE(WITHOUT_GNOME)
|
|
||||||
fi
|
|
||||||
GNOME_SUPPORT_CHECKS
|
|
||||||
else
|
|
||||||
if test "x$want_gnome" != xno ; then
|
|
||||||
AM_CONDITIONAL(BUILD_GNOME_SUPPORT, false)
|
|
||||||
else
|
|
||||||
GNOME_SUPPORT_CHECKS
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
|
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
|
||||||
|
|
||||||
GNOME_LIBGTOP_SYSDEPS
|
PKG_CHECK_MODULES(XML, libxml-2.0 >= 2.2.8)
|
||||||
GNOME_LIBGTOP_TYPES
|
AC_SUBST(XML_CFLAGS)
|
||||||
|
AC_SUBST(XML_LIBS)
|
||||||
sysdeps_dir="$libgtop_sysdeps_dir"
|
|
||||||
sysdeps_name="$libgtop_sysdeps_name"
|
|
||||||
AC_SUBST(sysdeps_dir)
|
|
||||||
AC_SUBST(sysdeps_name)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(for sysdeps_init_file)
|
|
||||||
sysdeps_init_file='sysdeps-init-'"$libgtop_sysdeps_name"'.c'
|
|
||||||
AC_SUBST(sysdeps_init_file)
|
|
||||||
AC_MSG_RESULT($sysdeps_init_file)
|
|
||||||
|
|
||||||
LIBGTOP_XML_CHECK
|
|
||||||
|
|
||||||
AC_ARG_WITH(libgtop-inodedb,
|
AC_ARG_WITH(libgtop-inodedb,
|
||||||
[ --with-libgtop-inodedb Build the inodedb stuff (default=no)],
|
[ --with-libgtop-inodedb Build the inodedb stuff (default=no)],
|
||||||
@@ -144,19 +129,15 @@ if test x$build_inodedb = xyes ; then
|
|||||||
AC_DEFINE(GLIBTOP_INODEDB)
|
AC_DEFINE(GLIBTOP_INODEDB)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_DEFINE(GLIBTOP_NAMES)
|
|
||||||
|
|
||||||
AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
|
AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
|
||||||
AM_CONDITIONAL(ENABLE_SHARED, test x$enable_static = xyes)
|
AM_CONDITIONAL(ENABLE_SHARED, test x$enable_static = xyes)
|
||||||
|
|
||||||
AM_PROG_LIBTOOL
|
AM_PROG_LIBTOOL
|
||||||
|
|
||||||
AM_PATH_GLIB(1.2.0,,AC_MSG_ERROR(GLIB >= 1.2.0 is required for LibGTop),
|
dnl Check for glib
|
||||||
[gmodule])
|
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 1.3.1 gmodule-2.0 >= 1.3.1 gobject-2.0 >= 1.3.1)
|
||||||
|
AC_SUBST(GLIB_CFLAGS)
|
||||||
dnl You need to uncomment the following line if you want to use
|
AC_SUBST(GLIB_LIBS)
|
||||||
dnl libGTop without Gnome.
|
|
||||||
dnl GNOME_SUPPORT_CHECKS
|
|
||||||
|
|
||||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
@@ -169,65 +150,6 @@ AC_HEADER_TIME
|
|||||||
AC_STRUCT_TM
|
AC_STRUCT_TM
|
||||||
AC_TYPE_UID_T
|
AC_TYPE_UID_T
|
||||||
|
|
||||||
dnl For SunOS
|
|
||||||
AC_CHECK_TYPE(ssize_t, int)
|
|
||||||
AC_CHECK_HEADERS(memory.h)
|
|
||||||
AC_CHECK_HEADERS(string.h strings.h, break)
|
|
||||||
AC_REPLACE_FUNCS(strerror)
|
|
||||||
|
|
||||||
dnl dlopen() and dlsym()
|
|
||||||
DL_LIB=
|
|
||||||
AC_CHECK_FUNCS(dlopen,,[
|
|
||||||
AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl", [
|
|
||||||
AC_CHECK_LIB(dld, shl_load, DL_LIB="-ldld", [
|
|
||||||
AC_CHECK_FUNCS(dlopen, DL_LIB="", DL_LIB="")
|
|
||||||
])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
oLIBS="$LIBS"
|
|
||||||
LIBS="$LIBS $DL_LIB"
|
|
||||||
AC_CHECK_FUNCS(dlerror,,)
|
|
||||||
LIBS="$oLIBS"
|
|
||||||
AC_SUBST(DL_LIB)
|
|
||||||
|
|
||||||
dnl Solaris
|
|
||||||
AC_CHECK_LIB(kstat, kstat_open)
|
|
||||||
AC_CHECK_FUNCS(getloadavg swapctl)
|
|
||||||
AC_CHECK_HEADERS(procfs.h sys/procfs.h, break)
|
|
||||||
|
|
||||||
dnl Some versions of Solaris require -lelf for -lkvm
|
|
||||||
AC_CHECK_LIB(kvm, kvm_open,[
|
|
||||||
LIBS="-lkvm $LIBS"
|
|
||||||
],[AC_MSG_CHECKING(for kvm_open in -lkvm with -lelf)
|
|
||||||
AC_CACHE_VAL(ac_cv_lib_kvm_with_elf,
|
|
||||||
[ac_save_LIBS="$LIBS"
|
|
||||||
LIBS="-lkvm -lelf $LIBS"
|
|
||||||
AC_TRY_LINK([char kvm_open();], [kvm_open()],
|
|
||||||
ac_cv_lib_kvm_with_elf=yes, ac_cv_lib_kvm_with_elf=no)
|
|
||||||
LIBS="$ac_save_LIBS"
|
|
||||||
])
|
|
||||||
if test "$ac_cv_lib_kvm_with_elf" = "yes"; then
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
LIBS="-lkvm -lelf $LIBS"
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl For DEC OSF1
|
|
||||||
AC_CHECK_LIB(mach, vm_statistics)
|
|
||||||
|
|
||||||
dnl For some broken libc5 systems (Debian 1.3)
|
|
||||||
saved_CFLAGS=$CFLAGS
|
|
||||||
CFLAGS="$CFLAGS -D_GNU_SOURCE"
|
|
||||||
GCC_NEED_DECLARATION(program_invocation_name, [
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
])
|
|
||||||
CFLAGS=$saved_CFLAGS
|
|
||||||
|
|
||||||
dnl Check for Internet sockets.
|
dnl Check for Internet sockets.
|
||||||
AC_CHECK_FUNC(socket,
|
AC_CHECK_FUNC(socket,
|
||||||
[AC_CHECK_HEADER(netinet/in.h,
|
[AC_CHECK_HEADER(netinet/in.h,
|
||||||
@@ -251,26 +173,11 @@ AC_FUNC_STRFTIME
|
|||||||
AC_CHECK_FUNCS(getcwd gettimeofday getwd putenv strdup strtoul uname)
|
AC_CHECK_FUNCS(getcwd gettimeofday getwd putenv strdup strtoul uname)
|
||||||
|
|
||||||
dnl ## all 'es_??' are only needed for format numbers different of 'es'
|
dnl ## all 'es_??' are only needed for format numbers different of 'es'
|
||||||
ALL_LINGUAS="da de es es_DO es_GT es_HN es_MX es_PA es_PE es_SV fi fr gl ja ko nl no pl pt_BR sv uk"
|
ALL_LINGUAS="az ca da de el es es_DO es_GT es_HN es_MX es_PA es_PE es_SV fi fr ga gl hu ja ko nl nn no pl pt_BR ro ru sk sl sv tr uk zh_CN.GB2312 zh_TW"
|
||||||
AM_GNOME_GETTEXT
|
AM_GNOME2_GETTEXT
|
||||||
|
|
||||||
AC_PATH_XTRA
|
AC_PATH_XTRA
|
||||||
|
|
||||||
dnl For Solaris
|
|
||||||
dnl Please don't move this before AC_PATH_XTRA
|
|
||||||
AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
|
|
||||||
AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect)])
|
|
||||||
AC_CHECK_FUNC(inet_aton,,[AC_CHECK_LIB(resolv,inet_aton)])
|
|
||||||
|
|
||||||
dnl The construct foo=`echo $w1 $w2 $w3` fails on some systems if $w1 = -e or -n
|
|
||||||
dnl So we use the following instead.
|
|
||||||
dnl XE_SPACE(var, words)
|
|
||||||
define([XE_SPACE],[
|
|
||||||
T=""
|
|
||||||
for W in $2; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
|
|
||||||
$1="$T"
|
|
||||||
])dnl
|
|
||||||
|
|
||||||
dnl For diskusage stuff
|
dnl For diskusage stuff
|
||||||
GNOME_FILEUTILS_CHECKS
|
GNOME_FILEUTILS_CHECKS
|
||||||
|
|
||||||
@@ -295,52 +202,19 @@ if test "x$libgtop_enable_debug" = xyes ; then
|
|||||||
AC_DEFINE(LIBGTOP_ENABLE_DEBUG)
|
AC_DEFINE(LIBGTOP_ENABLE_DEBUG)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$gnome_found" = xyes ; then
|
|
||||||
LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport"
|
|
||||||
SUPPORTINCS="$GNOME_INCLUDEDIR"
|
|
||||||
else
|
|
||||||
LIBSUPPORT='$(top_builddir)/support/libgnomesupport.la'
|
|
||||||
SUPPORTINCS='-DNEED_GNOMESUPPORT_H -I$(top_builddir)/support -I$(top_srcdir)/support'
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Some ugly hack; if '-lgnomesupport' is part of $GNOME_LIBS,
|
|
||||||
dnl we include it here.
|
|
||||||
case "$GNOME_LIBS" in
|
|
||||||
'*-lgnomesupport*' )
|
|
||||||
LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport"
|
|
||||||
SUPPORTINCS="$GNOME_INCLUDEDIR" ;;
|
|
||||||
esac
|
|
||||||
AC_SUBST(LIBSUPPORT)
|
|
||||||
AC_SUBST(SUPPORTINCS)
|
|
||||||
|
|
||||||
dnl These definitions are expanded in make.
|
dnl These definitions are expanded in make.
|
||||||
LIBGTOP_LIBS='-L$(libdir)'
|
LIBGTOP_LIBS='-L$(libdir)'
|
||||||
LIBGTOP_INCS='-I$(includedir) -I$(pkglibdir)/include'
|
LIBGTOP_INCS='-I$(includedir) -I$(pkglibdir)/include'
|
||||||
|
|
||||||
if test x$libgtop_use_machine_h = xyes ; then
|
|
||||||
LIBGTOP_INCS="$LIBGTOP_INCS -DHAVE_GLIBTOP_MACHINE_H"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test x$build_inodedb = xyes ; then
|
if test x$build_inodedb = xyes ; then
|
||||||
LIBGTOP_INCS="$LIBGTOP_INCS -DGLIBTOP_INODEDB"
|
LIBGTOP_INCS="$LIBGTOP_INCS -DGLIBTOP_INODEDB"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$libgtop_smp = xyes ; then
|
LIBGTOP_INCS="$LIBGTOP_INCS $GNOMESUPPORT_CFLAGS $GLIB_CFLAGS $XML_CFLAGS"
|
||||||
LIBGTOP_INCS="$LIBGTOP_INCS -DHAVE_LIBGTOP_SMP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test x$libgtop_have_sysinfo = xyes ; then
|
LIBGTOP_EXTRA_LIBS="$LIBGTOP_EXTRA_LIBS $GLIB_LIBS $XML_LIBS"
|
||||||
LIBGTOP_INCS="$LIBGTOP_INCS -DHAVE_LIBGTOP_SYSINFO"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LIBGTOP_INCS="$LIBGTOP_INCS $SUPPORTINCS $GLIB_CFLAGS"
|
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop_common -lgtop"
|
||||||
|
|
||||||
LIBGTOP_BINDIR='$(bindir)'
|
|
||||||
LIBGTOP_SERVER='$(bindir)/libgtop_server'
|
|
||||||
|
|
||||||
LIBGTOP_EXTRA_LIBS="$LIBGTOP_EXTRA_LIBS $GLIB_LIBS $LIBGTOP_XML_LIB"
|
|
||||||
|
|
||||||
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop_sysdeps -lgtop_common -lgtop"
|
|
||||||
|
|
||||||
LIBGTOP_NAMES_LIBS="$LIBGTOP_LIBS -lgtop_names"
|
LIBGTOP_NAMES_LIBS="$LIBGTOP_LIBS -lgtop_names"
|
||||||
|
|
||||||
@@ -355,7 +229,7 @@ AC_SUBST(machine_incs)
|
|||||||
|
|
||||||
LIBGTOP_BACKEND_DIR="\$(datadir)/libgtop/backends"
|
LIBGTOP_BACKEND_DIR="\$(datadir)/libgtop/backends"
|
||||||
|
|
||||||
INCLUDES="-D_IN_LIBGTOP -D_GNU_SOURCE -DGLIBTOP_NAMES -I\$(top_builddir) -I\$(top_srcdir) -I\$(top_srcdir)/sysdeps/$sysdeps_dir -I\$(top_srcdir)/include -I\$(top_builddir)/include -I\$(top_srcdir)/intl $SUPPORTINCS $GLIB_CFLAGS $CFLAGS $X_CFLAGS "'-DGTOPLOCALEDIR=\"$(datadir)/locale\" -DLIBGTOP_VERSION=\"'"$LIBGTOP_VERSION"'\" -DLIBGTOP_SERVER_VERSION=\"'"$LIBGTOP_SERVER_VERSION"'\" -DLIBGTOP_VERSION_CODE='$LIBGTOP_VERSION_CODE' -DLIBGTOP_SERVER=\"'"$LIBGTOP_SERVER"'\" -DLIBGTOP_BACKEND_DIR=\"'"$LIBGTOP_BACKEND_DIR"'\"'
|
INCLUDES="-D_IN_LIBGTOP -D_GNU_SOURCE -DGLIBTOP_NAMES -Werror -I\$(top_builddir) -I\$(top_srcdir) -I\$(top_srcdir)/sysdeps/$sysdeps_dir -I\$(top_srcdir)/include -I\$(top_builddir)/include -I\$(top_srcdir)/intl $GNOMESUPPORT_CFLAGS $GLIB_CFLAGS $XML_CFLAGS $CFLAGS $X_CFLAGS "'-DGTOPLOCALEDIR=\"$(datadir)/locale\" -DLIBGTOP_VERSION=\"'"$LIBGTOP_VERSION"'\" -DLIBGTOP_VERSION_CODE='$LIBGTOP_VERSION_CODE' -DLIBGTOP_BACKEND_DIR=\"'"$LIBGTOP_BACKEND_DIR"'\"'
|
||||||
|
|
||||||
AC_SUBST(INCLUDES)
|
AC_SUBST(INCLUDES)
|
||||||
|
|
||||||
@@ -366,155 +240,9 @@ AC_SUBST(LIBGTOP_LIBS)
|
|||||||
AC_SUBST(LIBGTOP_INCS)
|
AC_SUBST(LIBGTOP_INCS)
|
||||||
AC_SUBST(LIBGTOP_NAMES_LIBS)
|
AC_SUBST(LIBGTOP_NAMES_LIBS)
|
||||||
AC_SUBST(LIBGTOP_NAMES_INCS)
|
AC_SUBST(LIBGTOP_NAMES_INCS)
|
||||||
AC_SUBST(LIBGTOP_BINDIR)
|
|
||||||
AC_SUBST(LIBGTOP_SERVER)
|
|
||||||
|
|
||||||
if test x$libgtop_need_server = xyes ; then
|
|
||||||
sysdeps_suid_lib="\$(top_builddir)/sysdeps/\$(sysdeps_dir)/libgtop_sysdeps_suid.la"
|
|
||||||
server_programs='libgtop_server'
|
|
||||||
else
|
|
||||||
sysdeps_suid_lib=
|
|
||||||
server_programs=
|
|
||||||
fi
|
|
||||||
AC_SUBST(sysdeps_suid_lib)
|
|
||||||
AC_SUBST(server_programs)
|
|
||||||
|
|
||||||
|
|
||||||
dnl The following one is copied from glib/configure.in
|
|
||||||
|
|
||||||
AC_OUTPUT_COMMANDS([
|
|
||||||
|
|
||||||
## Generate `glibconfig.h' in two cases
|
|
||||||
## 1. `config.status' is run either explicitly, or via configure.
|
|
||||||
## Esp. not when it is run in `Makefile' to generate makefiles and
|
|
||||||
## config.h
|
|
||||||
## 2. CONFIG_OTHER is set explicitly
|
|
||||||
##
|
|
||||||
## Case 1 is difficult. We know that `automake' sets one of
|
|
||||||
## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
|
|
||||||
## only when AM_CONFIG_HEADER is set, however.
|
|
||||||
|
|
||||||
if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
|
|
||||||
# Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
|
|
||||||
CONFIG_OTHER=${CONFIG_OTHER:-glibtop-config.h}
|
|
||||||
fi
|
|
||||||
case "$CONFIG_OTHER" in
|
|
||||||
*glibtop-config.h*)
|
|
||||||
echo creating glibtop-config.h
|
|
||||||
outfile=glibtop-config.h-tmp
|
|
||||||
cat > $outfile <<\_______EOF
|
|
||||||
/* glibtop-config.h
|
|
||||||
*
|
|
||||||
* This is a generated file. Please modify `configure.in'
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef GLIBTOP_CONFIG_H
|
|
||||||
#define GLIBTOP_CONFIG_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
_______EOF
|
|
||||||
|
|
||||||
did_typedefs=no
|
|
||||||
|
|
||||||
if test x$glibtop_uint64_t != xyes ; then
|
|
||||||
did_typedefs=yes
|
|
||||||
cat >> $outfile <<\_______EOF
|
|
||||||
|
|
||||||
#ifndef u_int64_t
|
|
||||||
typedef unsigned long long int u_int64_t;
|
|
||||||
#endif
|
|
||||||
_______EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test x$glibtop_int64_t != xyes ; then
|
|
||||||
did_typedefs=yes
|
|
||||||
cat >> $outfile <<\_______EOF
|
|
||||||
|
|
||||||
#ifndef int64_t
|
|
||||||
typedef signed long long int int64_t;
|
|
||||||
#endif
|
|
||||||
_______EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test x$did_typedefs = xyes ; then
|
|
||||||
cat >>$outfile <<_______EOF
|
|
||||||
|
|
||||||
/*
|
|
||||||
* NOTE: If your application checks for "u_int64_t" or "int64_t" in its own
|
|
||||||
* config.h, you must not include it after any of the LibGTop headers.
|
|
||||||
*/
|
|
||||||
_______EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >>$outfile <<_______EOF
|
|
||||||
|
|
||||||
/* Define if we need the LibGTop server. */
|
|
||||||
_______EOF
|
|
||||||
|
|
||||||
if test x$glibtop_need_libgtop = xyes ; then
|
|
||||||
echo '#define NEED_LIBGTOP 1' >> $outfile
|
|
||||||
else
|
|
||||||
echo '#undef NEED_LIBGTOP' >> $outfile
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >>$outfile <<_______EOF
|
|
||||||
|
|
||||||
/* Define if LibGTop has support for multiple processors. */
|
|
||||||
_______EOF
|
|
||||||
|
|
||||||
if test x$glibtop_have_smp = xyes ; then
|
|
||||||
echo '#define HAVE_LIBGTOP_SMP 1' >> $outfile
|
|
||||||
else
|
|
||||||
echo '#undef HAVE_LIBGTOP_SMP' >> $outfile
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >>$outfile <<_______EOF
|
|
||||||
|
|
||||||
/* LibGTop major, minor and micro version. */
|
|
||||||
#define LIBGTOP_MAJOR_VERSION $libgtop_major_version
|
|
||||||
#define LIBGTOP_MINOR_VERSION $libgtop_minor_version
|
|
||||||
#define LIBGTOP_MICRO_VERSION $libgtop_micro_version
|
|
||||||
|
|
||||||
/* LibGTop version and numerical version code ("1.234.567" -> 1234567). */
|
|
||||||
#define LIBGTOP_VERSION "$libgtop_version"
|
|
||||||
#define LIBGTOP_VERSION_CODE $libgtop_version_code
|
|
||||||
|
|
||||||
/* LibGTop server version, increased each time the protocol changes. */
|
|
||||||
#define LIBGTOP_SERVER_VERSION $libgtop_server_version
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
#endif /* GLIBCONFIG_H */
|
|
||||||
_______EOF
|
|
||||||
|
|
||||||
if cmp -s $outfile glibtop-config.h; then
|
|
||||||
echo glibtop-config.h is unchanged
|
|
||||||
rm -f $outfile
|
|
||||||
else
|
|
||||||
mv $outfile glibtop-config.h
|
|
||||||
fi ;;
|
|
||||||
esac
|
|
||||||
],[
|
|
||||||
glibtop_uint64_t=$ac_cv_type_u_int64_t
|
|
||||||
glibtop_int64_t=$ac_cv_type_int64_t
|
|
||||||
libgtop_major_version=$LIBGTOP_MAJOR_VERSION
|
|
||||||
libgtop_minor_version=$LIBGTOP_MINOR_VERSION
|
|
||||||
libgtop_micro_version=$LIBGTOP_MICRO_VERSION
|
|
||||||
libgtop_version_code=$LIBGTOP_VERSION_CODE
|
|
||||||
libgtop_server_version=$LIBGTOP_SERVER_VERSION
|
|
||||||
libgtop_version=$LIBGTOP_VERSION
|
|
||||||
glibtop_need_libgtop=$libgtop_need_server
|
|
||||||
glibtop_have_smp=$libgtop_smp
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
AC_OUTPUT([
|
AC_OUTPUT([
|
||||||
Makefile
|
Makefile
|
||||||
libgtop.spec
|
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
intl/Makefile
|
intl/Makefile
|
||||||
misc/Makefile
|
misc/Makefile
|
||||||
@@ -523,14 +251,6 @@ include/glibtop/Makefile
|
|||||||
sysdeps/Makefile
|
sysdeps/Makefile
|
||||||
sysdeps/common/Makefile
|
sysdeps/common/Makefile
|
||||||
sysdeps/names/Makefile
|
sysdeps/names/Makefile
|
||||||
sysdeps/stub/Makefile
|
|
||||||
sysdeps/stub_suid/Makefile
|
|
||||||
sysdeps/sun4/Makefile
|
|
||||||
sysdeps/osf1/Makefile
|
|
||||||
sysdeps/linux/Makefile
|
|
||||||
sysdeps/kernel/Makefile
|
|
||||||
sysdeps/freebsd/Makefile
|
|
||||||
sysdeps/solaris/Makefile
|
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/inodedb/Makefile
|
src/inodedb/Makefile
|
||||||
scripts/Makefile
|
scripts/Makefile
|
||||||
@@ -540,5 +260,5 @@ backends/sysdeps/Makefile
|
|||||||
backends/common/Makefile
|
backends/common/Makefile
|
||||||
lib/Makefile
|
lib/Makefile
|
||||||
doc/Makefile
|
doc/Makefile
|
||||||
support/Makefile
|
dtd/Makefile
|
||||||
macros/Makefile])
|
libgtop-2.0.pc])
|
||||||
|
@@ -8,3 +8,4 @@ auto-macros.texi
|
|||||||
version.texi
|
version.texi
|
||||||
stamp-vti
|
stamp-vti
|
||||||
*.html *.pdf
|
*.html *.pdf
|
||||||
|
*.info-*
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
2002-01-09 Darin Adler <darin@bentspoon.com>
|
||||||
|
|
||||||
|
* Makefile.am: Fix build breakage caused by bad MAKEINFO change.
|
||||||
|
|
||||||
|
2000-02-05 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* reference.texi: Started to update documentation.
|
||||||
|
|
||||||
1999-10-18 Martin Baulig <martin@home-of-linux.org>
|
1999-10-18 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* about.texi: Added a note about LibGTop and GNOME.
|
* about.texi: Added a note about LibGTop and GNOME.
|
||||||
|
@@ -4,7 +4,7 @@ libgtop_TEXINFOS = libgtop.texi about.texi reference.texi \
|
|||||||
auto-macros.texi version.texi main.texi \
|
auto-macros.texi version.texi main.texi \
|
||||||
white-paper.texi internals.texi
|
white-paper.texi internals.texi
|
||||||
|
|
||||||
MAKEINFO += -I @libgtop_top_builddir@/doc
|
MAKEINFO = @MAKEINFO@ -I @libgtop_top_builddir@/doc
|
||||||
|
|
||||||
EXTRA_DIST = auto-macros.texi.in
|
EXTRA_DIST = auto-macros.texi.in
|
||||||
|
|
||||||
|
@@ -6,7 +6,21 @@
|
|||||||
* Reference Manual:: LibGTop Reference Manual
|
* Reference Manual:: LibGTop Reference Manual
|
||||||
* LibGTop Internals:: LibGTop Internals
|
* LibGTop Internals:: LibGTop Internals
|
||||||
|
|
||||||
--- The Detailed Node Listing ---
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@detailmenu --- The Detailed Node Listing ---
|
||||||
|
|
||||||
About LibGTop
|
About LibGTop
|
||||||
|
|
||||||
@@ -31,6 +45,8 @@ LibGTop Reference Manual
|
|||||||
* System Dependent:: System Dependent Functions.
|
* System Dependent:: System Dependent Functions.
|
||||||
* Common Functions:: Common Functions.
|
* Common Functions:: Common Functions.
|
||||||
* Library Functions:: Library Functions.
|
* Library Functions:: Library Functions.
|
||||||
|
* Generic Structures:: Generic Structures.
|
||||||
|
* Enums and Typedefs:: Enums and Typedefs.
|
||||||
|
|
||||||
System Dependent Functions
|
System Dependent Functions
|
||||||
|
|
||||||
@@ -49,6 +65,7 @@ System Dependent Functions
|
|||||||
* glibtop_proc_segment:: Process Segment Information.
|
* glibtop_proc_segment:: Process Segment Information.
|
||||||
* glibtop_proc_args:: Process Arguments.
|
* glibtop_proc_args:: Process Arguments.
|
||||||
* glibtop_proc_map:: Process Memory Maps.
|
* glibtop_proc_map:: Process Memory Maps.
|
||||||
|
* glibtop_netinfo:: Network Information.
|
||||||
* glibtop_netload:: Network Load.
|
* glibtop_netload:: Network Load.
|
||||||
* glibtop_ppp:: PPP Usage.
|
* glibtop_ppp:: PPP Usage.
|
||||||
|
|
||||||
@@ -63,6 +80,20 @@ Library Functions
|
|||||||
* glibtop_sysdeps:: Server Sysdeps.
|
* glibtop_sysdeps:: Server Sysdeps.
|
||||||
* Library Parameters:: Library Parameters.
|
* Library Parameters:: Library Parameters.
|
||||||
|
|
||||||
|
Generic Structures
|
||||||
|
|
||||||
|
* glibtop_ifaddr:: Interface Address.
|
||||||
|
|
||||||
|
Enums and Typedefs
|
||||||
|
|
||||||
|
* Network Interfaces:: Network Interfaces.
|
||||||
|
* Address Scope:: Address Scope (IPv6).
|
||||||
|
|
||||||
|
Network Interfaces
|
||||||
|
|
||||||
|
* Transport Methods:: Transport Methods.
|
||||||
|
* Interface Flags:: Interface Flags.
|
||||||
|
|
||||||
LibGTop Internals
|
LibGTop Internals
|
||||||
|
|
||||||
* General Internals:: General Internals
|
* General Internals:: General Internals
|
||||||
@@ -76,6 +107,8 @@ Sysdeps Internals
|
|||||||
|
|
||||||
* glibtop_open_s:: Non-privileged initializations
|
* glibtop_open_s:: Non-privileged initializations
|
||||||
* glibtop_close_s:: Non-privileged cleanups
|
* glibtop_close_s:: Non-privileged cleanups
|
||||||
|
|
||||||
|
@end detailmenu
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@include about.texi
|
@include about.texi
|
||||||
|
@@ -5,6 +5,8 @@
|
|||||||
* System Dependent:: System Dependent Functions.
|
* System Dependent:: System Dependent Functions.
|
||||||
* Common Functions:: Common Functions.
|
* Common Functions:: Common Functions.
|
||||||
* Library Functions:: Library Functions.
|
* Library Functions:: Library Functions.
|
||||||
|
* Generic Structures:: Generic Structures.
|
||||||
|
* Enums and Typedefs:: Enums and Typedefs.
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node System Dependent, Common Functions, Reference Manual, Reference Manual
|
@node System Dependent, Common Functions, Reference Manual, Reference Manual
|
||||||
@@ -26,6 +28,7 @@
|
|||||||
* glibtop_proc_segment:: Process Segment Information.
|
* glibtop_proc_segment:: Process Segment Information.
|
||||||
* glibtop_proc_args:: Process Arguments.
|
* glibtop_proc_args:: Process Arguments.
|
||||||
* glibtop_proc_map:: Process Memory Maps.
|
* glibtop_proc_map:: Process Memory Maps.
|
||||||
|
* glibtop_netinfo:: Network Information.
|
||||||
* glibtop_netload:: Network Load.
|
* glibtop_netload:: Network Load.
|
||||||
* glibtop_ppp:: PPP Usage.
|
* glibtop_ppp:: PPP Usage.
|
||||||
@end menu
|
@end menu
|
||||||
@@ -1111,7 +1114,7 @@ the lenght of this string is returned in the @code{size} field.
|
|||||||
Remember to @code{glibtop_free} the returned string to avoid a memory leak.
|
Remember to @code{glibtop_free} the returned string to avoid a memory leak.
|
||||||
|
|
||||||
@page
|
@page
|
||||||
@node glibtop_proc_map, glibtop_netload, glibtop_proc_args, System Dependent
|
@node glibtop_proc_map, glibtop_netinfo, glibtop_proc_args, System Dependent
|
||||||
@subsection Process Memory Maps
|
@subsection Process Memory Maps
|
||||||
|
|
||||||
Library function @code{glibtop_get_proc_map}:
|
Library function @code{glibtop_get_proc_map}:
|
||||||
@@ -1198,7 +1201,87 @@ Constants for the @code{perm} member:
|
|||||||
@end example
|
@end example
|
||||||
|
|
||||||
@page
|
@page
|
||||||
@node glibtop_netload, glibtop_ppp, glibtop_proc_map, System Dependent
|
@node glibtop_netinfo, glibtop_netload, glibtop_proc_map, System Dependent
|
||||||
|
@subsection Network Information
|
||||||
|
|
||||||
|
Library function @code{glibtop_get_netinfo}:
|
||||||
|
|
||||||
|
@example
|
||||||
|
@cartouche
|
||||||
|
glibtop_ifaddr *
|
||||||
|
glibtop_get_netinfo (glibtop_array *array, glibtop_netinfo *buf,
|
||||||
|
const char *interface, u_int64_t transport);
|
||||||
|
|
||||||
|
glibtop_ifaddr *
|
||||||
|
glibtop_get_netinfo_l (glibtop *server, glibtop_array *array,
|
||||||
|
glibtop_netinfo *buf, const char *interface,
|
||||||
|
u_int64_t transport);
|
||||||
|
@end cartouche
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Declaration of @code{glibtop_ifaddr} in @file{<glibtop/interfaces.h>}:
|
||||||
|
|
||||||
|
@example
|
||||||
|
@cartouche
|
||||||
|
typedef struct _glibtop_ifaddr glibtop_ifaddr;
|
||||||
|
|
||||||
|
struct _glibtop_ifaddr
|
||||||
|
@{
|
||||||
|
u_int64_t flags,
|
||||||
|
transport;
|
||||||
|
u_int8_t addr_len,
|
||||||
|
address [GLIBTOP_IFADDR_LEN];
|
||||||
|
u_int64_t subnet,
|
||||||
|
scope;
|
||||||
|
@};
|
||||||
|
@end cartouche
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Declaration of @code{glibtop_netinfo} in @file{<glibtop/netinfo.h>}:
|
||||||
|
|
||||||
|
@example
|
||||||
|
@cartouche
|
||||||
|
typedef struct _glibtop_netinfo glibtop_netinfo;
|
||||||
|
|
||||||
|
struct _glibtop_netinfo
|
||||||
|
@{
|
||||||
|
u_int64_t flags,
|
||||||
|
if_flags,
|
||||||
|
transport,
|
||||||
|
mtu;
|
||||||
|
@};
|
||||||
|
@end cartouche
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Returns information about network interface @code{interface}.
|
||||||
|
|
||||||
|
@table @code
|
||||||
|
@item interface
|
||||||
|
The network interface you want to get information about (for instance
|
||||||
|
@samp{eth0}).
|
||||||
|
@item transport
|
||||||
|
Bitmask specifying about which transport methods you want to get information
|
||||||
|
or @code{GLIBTOP_TRANSPORT_ALL} if you want information about all possible
|
||||||
|
transport methods (@pxref{Transport Methods}).
|
||||||
|
@end table
|
||||||
|
|
||||||
|
On success, the following fields in @code{glibtop_netinfo} are set:
|
||||||
|
|
||||||
|
@table @code
|
||||||
|
@item if_flags
|
||||||
|
Interface flags (@pxref{Interface Flags}).
|
||||||
|
@item transport
|
||||||
|
Bitmask of all transport methods which are currently supported on the
|
||||||
|
selected interface (@pxref{Transport Methods}).
|
||||||
|
@item mtu
|
||||||
|
Maximum Transfer Unit (MTU)
|
||||||
|
@end table
|
||||||
|
|
||||||
|
Additionally, an array of @code{glibtop_ifaddr} structures is returned
|
||||||
|
(@pxref{glibtop_ifaddr}).
|
||||||
|
|
||||||
|
@page
|
||||||
|
@node glibtop_netload, glibtop_ppp, glibtop_netinfo, System Dependent
|
||||||
@subsection Network Load
|
@subsection Network Load
|
||||||
|
|
||||||
Library function @code{glibtop_get_netload}:
|
Library function @code{glibtop_get_netload}:
|
||||||
@@ -1514,7 +1597,7 @@ Free file nodes.
|
|||||||
Blocks are usually 512 bytes.
|
Blocks are usually 512 bytes.
|
||||||
|
|
||||||
@page
|
@page
|
||||||
@node Library Functions, , Common Functions, Reference Manual
|
@node Library Functions, Generic Structures, Common Functions, Reference Manual
|
||||||
@section Library Functions
|
@section Library Functions
|
||||||
|
|
||||||
This are general library functions which can be used to get information
|
This are general library functions which can be used to get information
|
||||||
@@ -1805,3 +1888,159 @@ Abort if the library fails to get some of the required features. This
|
|||||||
should not be used by applications.
|
should not be used by applications.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@node Generic Structures, Enums and Typedefs, Library Functions, Reference Manual
|
||||||
|
@section Generic Structures
|
||||||
|
|
||||||
|
@menu
|
||||||
|
* glibtop_ifaddr:: Interface Address.
|
||||||
|
@end menu
|
||||||
|
|
||||||
|
@node glibtop_ifaddr, , Generic Structures, Generic Structures
|
||||||
|
@subsection Interface Addresses
|
||||||
|
|
||||||
|
The @code{glibtop_ifaddr} structure contains information about a network
|
||||||
|
interface.
|
||||||
|
|
||||||
|
It is declared in @file{<glibtop/interfaces.h>}:
|
||||||
|
|
||||||
|
@example
|
||||||
|
@cartouche
|
||||||
|
typedef struct _glibtop_ifaddr glibtop_ifaddr;
|
||||||
|
|
||||||
|
struct _glibtop_ifaddr
|
||||||
|
@{
|
||||||
|
u_int64_t flags,
|
||||||
|
transport;
|
||||||
|
u_int8_t addr_len,
|
||||||
|
address [GLIBTOP_IFADDR_LEN];
|
||||||
|
u_int64_t subnet,
|
||||||
|
scope;
|
||||||
|
@};
|
||||||
|
@end cartouche
|
||||||
|
@end example
|
||||||
|
|
||||||
|
The contents of this structure depends on the @code{transport} field -
|
||||||
|
for instance a single network interface can have both an IPv4 address
|
||||||
|
and several IPv6 ones. This is why functions like @code{glibtop_get_netinfo}
|
||||||
|
return an array of @code{glibtop_ifaddr} structures.
|
||||||
|
|
||||||
|
In general, the fields of the @code{glibtop_ifaddr} structure have the
|
||||||
|
following meaning:
|
||||||
|
|
||||||
|
@table @code
|
||||||
|
@item transport
|
||||||
|
The "interface address" from the @code{address} field is only valid for
|
||||||
|
this transport method (@pxref{Transport Methods}).
|
||||||
|
@item addr_len
|
||||||
|
Length of the interface address in the @code{address} field in bytes.
|
||||||
|
@item address
|
||||||
|
This is one of the "interface address" for the selected network interface
|
||||||
|
which is used with the transport method from the @code{transport} field.
|
||||||
|
@item subnet
|
||||||
|
The meaning of this field depends on the transport method and is currently
|
||||||
|
only used for IPv4 (where it contains the current subnet mask) and for IPv6
|
||||||
|
(where it contains the address length in bits).
|
||||||
|
@item scope
|
||||||
|
This is only used for IPv6 and contains the address scope
|
||||||
|
(@pxref{Address Scope}).
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@node Enums and Typedefs, , Generic Structures, Reference Manual
|
||||||
|
@section Enums and Typedefs
|
||||||
|
|
||||||
|
@menu
|
||||||
|
* Network Interfaces:: Network Interfaces.
|
||||||
|
* Address Scope:: Address Scope (IPv6).
|
||||||
|
@end menu
|
||||||
|
|
||||||
|
@node Network Interfaces, Address Scope, Enums and Typedefs, Enums and Typedefs
|
||||||
|
@subsection Network Interfaces
|
||||||
|
|
||||||
|
@menu
|
||||||
|
* Transport Methods:: Transport Methods.
|
||||||
|
* Interface Flags:: Interface Flags.
|
||||||
|
@end menu
|
||||||
|
|
||||||
|
@node Transport Methods, Interface Flags, Network Interfaces, Network Interfaces
|
||||||
|
@subsubsection Transport Methods
|
||||||
|
|
||||||
|
The following transport methods are defined in @file{<glibtop/interfaces.h>}:
|
||||||
|
|
||||||
|
@example
|
||||||
|
@cartouche
|
||||||
|
enum _glibtop_transport @{
|
||||||
|
GLIBTOP_TRANSPORT_DEFAULT = 0,
|
||||||
|
GLIBTOP_TRANSPORT_IPV4 = 1 << 0,
|
||||||
|
GLIBTOP_TRANSPORT_IPV6 = 1 << 1,
|
||||||
|
GLIBTOP_TRANSPORT_IPX = 1 << 2,
|
||||||
|
GLIBTOP_TRANSPORT_X25 = 1 << 3,
|
||||||
|
GLIBTOP_TRANSPORT_DECNET = 1 << 4,
|
||||||
|
GLIBTOP_TRANSPORT_APPLETALK = 1 << 5,
|
||||||
|
GLIBTOP_TRANSPORT_NETBEUI = 1 << 6,
|
||||||
|
@};
|
||||||
|
@end cartouche
|
||||||
|
@end example
|
||||||
|
|
||||||
|
There is a @code{GLIBTOP_TRANSPORT_ALL} constant which can be used
|
||||||
|
when you want information about all possible transport methods:
|
||||||
|
|
||||||
|
@example
|
||||||
|
@cartouche
|
||||||
|
#define GLIBTOP_TRANSPORT_ALL GLIBTOP_UNLIMITED
|
||||||
|
@end cartouche
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@node Interface Flags, , Transport Methods, Network Interfaces
|
||||||
|
@subsubsection Interface Flags
|
||||||
|
|
||||||
|
This is defined in @file{<glibtop/interfaces.h>}:
|
||||||
|
|
||||||
|
@example
|
||||||
|
@cartouche
|
||||||
|
enum _glibtop_interface_flags @{
|
||||||
|
GLIBTOP_IF_FLAGS_UP = 1,
|
||||||
|
GLIBTOP_IF_FLAGS_BROADCAST,
|
||||||
|
GLIBTOP_IF_FLAGS_DEBUG,
|
||||||
|
GLIBTOP_IF_FLAGS_LOOPBACK,
|
||||||
|
GLIBTOP_IF_FLAGS_POINTOPOINT,
|
||||||
|
GLIBTOP_IF_FLAGS_RUNNING,
|
||||||
|
GLIBTOP_IF_FLAGS_NOARP,
|
||||||
|
GLIBTOP_IF_FLAGS_PROMISC,
|
||||||
|
GLIBTOP_IF_FLAGS_ALLMULTI,
|
||||||
|
GLIBTOP_IF_FLAGS_OACTIVE,
|
||||||
|
GLIBTOP_IF_FLAGS_SIMPLEX,
|
||||||
|
GLIBTOP_IF_FLAGS_LINK0,
|
||||||
|
GLIBTOP_IF_FLAGS_LINK1,
|
||||||
|
GLIBTOP_IF_FLAGS_LINK2,
|
||||||
|
GLIBTOP_IF_FLAGS_ALTPHYS,
|
||||||
|
GLIBTOP_IF_FLAGS_MULTICAST
|
||||||
|
@};
|
||||||
|
@end cartouche
|
||||||
|
@end example
|
||||||
|
|
||||||
|
They are used as a bit mask like this:
|
||||||
|
|
||||||
|
@example
|
||||||
|
u_int64_t if_flags;
|
||||||
|
|
||||||
|
if_flags = (1L << GLIBTOP_IF_FLAGS_UP) | (1L << GLIBTOP_IF_FLAGS_RUNNING);
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@node Address Scope, , Network Interfaces, Enums and Typedefs
|
||||||
|
@subsection Address Scope
|
||||||
|
|
||||||
|
This is defined in @file{<glibtop/interfaces.h>} for the IPv6 address scope:
|
||||||
|
|
||||||
|
@example
|
||||||
|
@cartouche
|
||||||
|
enum _glibtop_ipv6_scope @{
|
||||||
|
GLIBTOP_IPV6_SCOPE_GLOBAL = 0,
|
||||||
|
GLIBTOP_IPV6_SCOPE_LOOPBACK = 1 << 1,
|
||||||
|
GLIBTOP_IPV6_SCOPE_LINKLOCAL = 1 << 2,
|
||||||
|
GLIBTOP_IPV6_SCOPE_SITELOCAL = 1 << 3,
|
||||||
|
GLIBTOP_IPV6_SCOPE_COMPATv4 = 1 << 4,
|
||||||
|
GLIBTOP_IPV6_SCOPE_UNKNOWN = 1 << 5
|
||||||
|
@};
|
||||||
|
@end cartouche
|
||||||
|
@end example
|
||||||
|
|
||||||
|
2
dtd/.cvsignore
Normal file
2
dtd/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Makefile.in
|
||||||
|
Makefile
|
9
dtd/Makefile.am
Normal file
9
dtd/Makefile.am
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
backenddir = @LIBGTOP_BACKEND_DIR@
|
||||||
|
|
||||||
|
backend_DATA = \
|
||||||
|
libgtop-backends.dtd \
|
||||||
|
libgtop-backend-info.dtd
|
||||||
|
|
||||||
|
EXTRA_DIST = |
|
||||||
|
$(backend_DATA)
|
||||||
|
|
23
dtd/libgtop-backend-info.dtd
Normal file
23
dtd/libgtop-backend-info.dtd
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<!ELEMENT BackendInfo (name,description?,comments?,authors,legalnotice)>
|
||||||
|
<!ELEMENT name (short_name,long_name?)>
|
||||||
|
<!ELEMENT short_name (#PCDATA)>
|
||||||
|
<!ELEMENT long_name (#PCDATA)>
|
||||||
|
|
||||||
|
<!ELEMENT description (#PCDATA)>
|
||||||
|
|
||||||
|
<!ELEMENT authors (author)+>
|
||||||
|
<!ELEMENT author (author_name,author_email?)>
|
||||||
|
<!ELEMENT author_name (#PCDATA)>
|
||||||
|
<!ELEMENT author_email (#PCDATA)>
|
||||||
|
|
||||||
|
<!ELEMENT legalnotice (license,copyright?)>
|
||||||
|
<!ELEMENT license (#PCDATA)>
|
||||||
|
|
||||||
|
<!ELEMENT copyright (holder)+>
|
||||||
|
<!ELEMENT holder (holder_year?,holder_name,holder_email?)>
|
||||||
|
<!ELEMENT holder_year (#PCDATA)>
|
||||||
|
<!ELEMENT holder_name (#PCDATA)>
|
||||||
|
<!ELEMENT holder_email (#PCDATA)>
|
||||||
|
|
||||||
|
<!ELEMENT comments (comment)+>
|
||||||
|
<!ELEMENT comment (#PCDATA)>
|
11
dtd/libgtop-backends.dtd
Normal file
11
dtd/libgtop-backends.dtd
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<!ELEMENT Backends (Backend)+>
|
||||||
|
|
||||||
|
<!ELEMENT Backend (Name,Location)>
|
||||||
|
<!ELEMENT Name (#PCDATA)>
|
||||||
|
|
||||||
|
<!ELEMENT Location (LibtoolName?,ShlibName,ExtraLibs?)>
|
||||||
|
<!ELEMENT LibtoolName (#PCDATA)>
|
||||||
|
<!ELEMENT ShlibName (#PCDATA)>
|
||||||
|
|
||||||
|
<!ELEMENT ExtraLibs (ExtraLib)+>
|
||||||
|
<!ELEMENT ExtraLib (LibtoolName?,ShlibName)>
|
@@ -14,11 +14,12 @@ retval|proc_time|long(start_time,rtime,utime,stime,cutime,cstime,timeout,it_real
|
|||||||
retval|proc_signal|ulong(signal[2],blocked[2],sigignore[2],sigcatch[2])|pid_t(pid)
|
retval|proc_signal|ulong(signal[2],blocked[2],sigignore[2],sigcatch[2])|pid_t(pid)
|
||||||
retval|proc_kernel|ulong(k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt,kstk_esp,kstk_eip,nwchan):string(wchan)|pid_t(pid)
|
retval|proc_kernel|ulong(k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt,kstk_esp,kstk_eip,nwchan):string(wchan)|pid_t(pid)
|
||||||
retval|proc_segment|ulong(text_rss,shlib_rss,data_rss,stack_rss,dirty_size,start_code,end_code,start_data,end_data,start_brk,end_brk,start_stack,start_mmap,arg_start,arg_end,env_start,env_end)|pid_t(pid)
|
retval|proc_segment|ulong(text_rss,shlib_rss,data_rss,stack_rss,dirty_size,start_code,end_code,start_data,end_data,start_brk,end_brk,start_stack,start_mmap,arg_start,arg_end,env_start,env_end)|pid_t(pid)
|
||||||
|
char *|proc_cwd|ulong(size,device,inode)|pid_t(pid)
|
||||||
pointer(string)|proc_args|array|pid_t(pid)
|
pointer(string)|proc_args|array|pid_t(pid)
|
||||||
array(glibtop_map_entry)|proc_map|array|pid_t(pid)
|
array(glibtop_map_entry)|proc_map|array|pid_t(pid)
|
||||||
array(glibtop_mountentry)|@mountlist|array|int(all_fs)
|
array(glibtop_mountentry)|@mountlist|array|int(all_fs)
|
||||||
retval|@fsusage|ulong(blocks,bfree,bavail,files,ffree)|string(mount_dir)
|
retval|@fsusage|ulong(blocks,bfree,bavail,files,ffree)|string(mount_dir)
|
||||||
array(glibtop_interface)|interface_names|array|ulong(interface,number,instance,strategy)
|
array(glibtop_interface)|interface_names|array|ulong(interface,number,instance,strategy)
|
||||||
retval|netinfo|ulong(if_flags,transport,mtu,subnet,address)|string(interface):unsigned(transport)
|
array(glibtop_ifaddr)|netinfo|array:ulong(if_flags,transport,mtu)|string(interface):ulong(transport)
|
||||||
retval|netload|ulong(packets_in,packets_out,packets_total,bytes_in,bytes_out,bytes_total,errors_in,errors_out,errors_total,collisions)|string(interface):unsigned(transport,protocol)
|
retval|netload|ulong(packets_in,packets_out,packets_total,bytes_in,bytes_out,bytes_total,errors_in,errors_out,errors_total,collisions)|string(interface):unsigned(transport,protocol)
|
||||||
retval|ppp|ulong(state,bytes_in,bytes_out)|ushort(device)
|
retval|ppp|ulong(state,bytes_in,bytes_out)|ushort(device,use_isdn)
|
||||||
|
55
glibtop.h
55
glibtop.h
@@ -32,68 +32,29 @@
|
|||||||
|
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
#include <glibtop/limits.h>
|
#include <glibtop/limits.h>
|
||||||
|
|
||||||
#include <glibtop_server.h>
|
|
||||||
#include <glibtop/types.h>
|
#include <glibtop/types.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
#include <glibtop/glibtop-client.h>
|
||||||
|
|
||||||
typedef struct _glibtop glibtop;
|
G_BEGIN_DECLS
|
||||||
typedef struct _glibtop_server_private glibtop_server_private;
|
|
||||||
|
typedef struct _glibtop glibtop;
|
||||||
|
|
||||||
#include <glibtop/sysdeps.h>
|
#include <glibtop/sysdeps.h>
|
||||||
#include <glibtop/errors.h>
|
#include <glibtop/errors.h>
|
||||||
|
|
||||||
#ifdef _IN_LIBGTOP
|
#include <glibtop/glibtop-server.h>
|
||||||
#include <glibtop-server-private.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct _glibtop
|
|
||||||
{
|
|
||||||
int refcount; /* Reference count */
|
|
||||||
unsigned flags;
|
|
||||||
unsigned method; /* Server Method */
|
|
||||||
unsigned error_method; /* Error Method */
|
|
||||||
int ncpu; /* Number of CPUs, zero if single-processor */
|
|
||||||
unsigned long os_version_code; /* Version code of the operating system */
|
|
||||||
const char *name; /* Program name for error messages */
|
|
||||||
const char *server_command; /* Command used to invoke server */
|
|
||||||
const char *server_host; /* Host the server should run on */
|
|
||||||
const char *server_user; /* Name of the user on the target host */
|
|
||||||
const char *server_rsh; /* Command used to connect to the target host */
|
|
||||||
unsigned long features; /* Server is required for this features */
|
|
||||||
unsigned long server_port; /* Port on which daemon is listening */
|
|
||||||
glibtop_sysdeps sysdeps; /* Detailed feature list */
|
|
||||||
glibtop_sysdeps required; /* Required feature list */
|
|
||||||
glibtop_sysdeps wanted; /* We only want this features */
|
|
||||||
glibtop_server_private *_priv; /* Private data */
|
|
||||||
unsigned glibtop_errno;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern glibtop *glibtop_global_server;
|
|
||||||
|
|
||||||
extern const unsigned long glibtop_server_features;
|
|
||||||
|
|
||||||
#define glibtop_init() glibtop_init_r(&glibtop_global_server, 0, 0);
|
|
||||||
|
|
||||||
#define glibtop_close() glibtop_close_r(glibtop_global_server);
|
|
||||||
|
|
||||||
glibtop *
|
glibtop *
|
||||||
glibtop_init_r (glibtop **server_ptr,
|
glibtop_init_r (glibtop **server_ptr,
|
||||||
unsigned long features,
|
unsigned long features,
|
||||||
unsigned flags);
|
unsigned flags);
|
||||||
|
|
||||||
glibtop *
|
void
|
||||||
glibtop_init_s (glibtop **server_ptr,
|
glibtop_init_s (glibtop_server *server_ptr,
|
||||||
unsigned long features,
|
unsigned long features,
|
||||||
unsigned flags);
|
unsigned flags);
|
||||||
|
|
||||||
void
|
G_END_DECLS
|
||||||
glibtop_server_ref (glibtop *server);
|
|
||||||
|
|
||||||
void
|
|
||||||
glibtop_server_unref (glibtop *server);
|
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -5,11 +5,13 @@ glibtop_HEADERS = close.h loadavg.h prockernel.h procstate.h \
|
|||||||
proctime.h shm_limits.h cpu.h msg_limits.h \
|
proctime.h shm_limits.h cpu.h msg_limits.h \
|
||||||
procmem.h procuid.h swap.h error.h open.h \
|
procmem.h procuid.h swap.h error.h open.h \
|
||||||
procsegment.h sysdeps.h xmalloc.h global.h \
|
procsegment.h sysdeps.h xmalloc.h global.h \
|
||||||
procsignal.h union.h types.h \
|
procsignal.h union.h types.h proccwd.h \
|
||||||
parameter.h mountlist.h fsusage.h procmap.h signal.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 \
|
||||||
netinfo.h interfaces.h limits.h array.h compat_10.h \
|
netinfo.h interfaces.h limits.h array.h compat_10.h \
|
||||||
errors.h glib-arrays.h backend.h call-vector.h
|
glib-arrays.h call-vector.h \
|
||||||
|
glibtop-client.h glibtop-server.h glibtop-backend.h \
|
||||||
|
glibtop-backend-info.h errors.h
|
||||||
|
|
||||||
BUILT_SOURCES = call-vector.h
|
BUILT_SOURCES = call-vector.h
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_ARRAY_NUMBER 0
|
#define GLIBTOP_ARRAY_NUMBER 0
|
||||||
#define GLIBTOP_ARRAY_SIZE 1
|
#define GLIBTOP_ARRAY_SIZE 1
|
||||||
|
@@ -31,15 +31,13 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/union.h>
|
#include <glibtop/union.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef struct _glibtop_call_vector glibtop_call_vector;
|
|
||||||
|
|
||||||
struct _glibtop_call_vector
|
struct _glibtop_call_vector
|
||||||
{
|
{
|
||||||
@@GLIBTOP_CALL_VECTOR@@
|
@@GLIBTOP_CALL_VECTOR@@
|
||||||
};
|
};
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -82,16 +82,16 @@ sub parse_features_def {
|
|||||||
|
|
||||||
if ($line_fields[3] eq '') {
|
if ($line_fields[3] eq '') {
|
||||||
$func_decl_code .= sprintf
|
$func_decl_code .= sprintf
|
||||||
(qq[\t%s (*%s) (glibtop *, glibtop_backend *%s);\n], $retval, $feature, $param_decl);
|
(qq[\t%s (*%s) (glibtop_server *, glibtop_closure *%s);\n], $retval, $feature, $param_decl);
|
||||||
} elsif ($line_fields[3] eq 'array') {
|
} elsif ($line_fields[3] eq 'array') {
|
||||||
$func_decl_code .= sprintf
|
$func_decl_code .= sprintf
|
||||||
(qq[\t%s (*%s) (glibtop *, glibtop_backend *, glibtop_array *%s);\n], $retval, $feature, $param_decl);
|
(qq[\t%s (*%s) (glibtop_server *, glibtop_closure *, glibtop_array *%s);\n], $retval, $feature, $param_decl);
|
||||||
} elsif ($line_fields[3] =~ /^array/) {
|
} elsif ($line_fields[3] =~ /^array/) {
|
||||||
$func_decl_code .= sprintf
|
$func_decl_code .= sprintf
|
||||||
(qq[\t%s (*%s) (glibtop *, glibtop_backend *, glibtop_array *, %s *%s);\n], $retval, $feature, 'glibtop_'.$feature, $param_decl);
|
(qq[\t%s (*%s) (glibtop_server *, glibtop_closure *, glibtop_array *, %s *%s);\n], $retval, $feature, 'glibtop_'.$feature, $param_decl);
|
||||||
} else {
|
} else {
|
||||||
$func_decl_code .= sprintf
|
$func_decl_code .= sprintf
|
||||||
(qq[\t%s (*%s) (glibtop *, glibtop_backend *, %s *%s);\n], $retval, $feature, 'glibtop_'.$feature, $param_decl);
|
(qq[\t%s (*%s) (glibtop_server *, glibtop_closure *, %s *%s);\n], $retval, $feature, 'glibtop_'.$feature, $param_decl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,13 +28,13 @@
|
|||||||
|
|
||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
void glibtop_close_r (glibtop *server);
|
void glibtop_close_r (glibtop *server);
|
||||||
|
|
||||||
void glibtop_close_s (glibtop *server);
|
void glibtop_close_s (glibtop_server *server);
|
||||||
void glibtop_close_p (glibtop *server);
|
void glibtop_close_p (glibtop_server *server);
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
/* glibtop_cpu */
|
/* glibtop_cpu */
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_CPU_TOTAL 0
|
#define GLIBTOP_CPU_TOTAL 0
|
||||||
#define GLIBTOP_CPU_USER 1
|
#define GLIBTOP_CPU_USER 1
|
||||||
@@ -66,22 +66,20 @@ struct _glibtop_cpu
|
|||||||
xcpu_flags; /* GLIBTOP_CPU_XCPU_FLAGS */
|
xcpu_flags; /* GLIBTOP_CPU_XCPU_FLAGS */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_cpu(cpu) glibtop_get_cpu_l(glibtop_global_server, cpu)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_CPU
|
#if GLIBTOP_SUID_CPU
|
||||||
#define glibtop_get_cpu_r glibtop_get_cpu_p
|
#define glibtop_get_cpu_r glibtop_get_cpu_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_cpu_r glibtop_get_cpu_s
|
#define glibtop_get_cpu_r glibtop_get_cpu_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_cpu_l (glibtop *server, glibtop_cpu *buf);
|
int glibtop_get_cpu_l (glibtop_client *client, glibtop_cpu *buf);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_CPU
|
#if GLIBTOP_SUID_CPU
|
||||||
int glibtop_init_cpu_p (glibtop *server);
|
int glibtop_init_cpu_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf);
|
int glibtop_get_cpu_p (glibtop_server *server, glibtop_closure *closure, glibtop_cpu *buf);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_cpu_s (glibtop *server);
|
int glibtop_init_cpu_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf);
|
int glibtop_get_cpu_s (glibtop_server *server, glibtop_closure *closure, glibtop_cpu *buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -95,6 +93,6 @@ extern const char *glibtop_descriptions_cpu [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -28,111 +28,19 @@
|
|||||||
|
|
||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#ifndef G_GNUC_UNUSED
|
void glibtop_error_vr (glibtop_server *server, char *format, va_list args);
|
||||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
|
void glibtop_warn_vr (glibtop_server *server, char *format, va_list args);
|
||||||
#define G_GNUC_UNUSED \
|
|
||||||
__attribute__((unused))
|
|
||||||
#else /* !__GNUC__ */
|
|
||||||
#define G_GNUC_UNUSED
|
|
||||||
#endif /* !__GNUC__ */
|
|
||||||
#endif /* defined G_GNUC_UNUSED */
|
|
||||||
|
|
||||||
void glibtop_error_vr (glibtop *server, char *format, va_list args);
|
void glibtop_error_io_vr (glibtop_server *server, char *format, int, va_list args);
|
||||||
void glibtop_warn_vr (glibtop *server, char *format, va_list args);
|
void glibtop_warn_io_vr (glibtop_server *server, char *format, int, va_list args);
|
||||||
|
|
||||||
void glibtop_error_io_vr (glibtop *server, char *format, int, va_list args);
|
void glibtop_error_r (glibtop_server *server, char *format, ...);
|
||||||
void glibtop_warn_io_vr (glibtop *server, char *format, int, va_list args);
|
void glibtop_warn_r (glibtop_server *server, char *format, ...);
|
||||||
|
void glibtop_error_io_r (glibtop_server *server, char *format, ...);
|
||||||
|
void glibtop_warn_io_r (glibtop_server *server, char *format, ...);
|
||||||
|
|
||||||
static void G_GNUC_UNUSED
|
G_END_DECLS
|
||||||
glibtop_error_r (glibtop *server, char *format, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
va_start (args, format);
|
|
||||||
glibtop_error_vr (server, format, args);
|
|
||||||
va_end (args);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void G_GNUC_UNUSED
|
|
||||||
glibtop_warn_r (glibtop *server, char *format, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
va_start (args, format);
|
|
||||||
glibtop_warn_vr (server, format, args);
|
|
||||||
va_end (args);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void G_GNUC_UNUSED
|
|
||||||
glibtop_error_io_r (glibtop *server, char *format, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
va_start (args, format);
|
|
||||||
glibtop_error_io_vr (server, format, errno, args);
|
|
||||||
va_end (args);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void G_GNUC_UNUSED
|
|
||||||
glibtop_warn_io_r (glibtop *server, char *format, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
va_start (args, format);
|
|
||||||
glibtop_warn_io_vr (server, format, errno, args);
|
|
||||||
va_end (args);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
|
|
||||||
#define glibtop_error(p1, args...) glibtop_error_r(glibtop_global_server , p1 , ## args)
|
|
||||||
#define glibtop_warn(p1, args...) glibtop_warn_r(glibtop_global_server , p1 , ## args)
|
|
||||||
|
|
||||||
#define glibtop_error_io(p1, args...) glibtop_error_io_r(glibtop_global_server , p1 , ## args)
|
|
||||||
#define glibtop_warn_io(p1, args...) glibtop_warn_io_r(glibtop_global_server , p1 , ## args)
|
|
||||||
|
|
||||||
#else /* no __GNUC__ */
|
|
||||||
|
|
||||||
static void
|
|
||||||
glibtop_error (char *format, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
va_start (args, format);
|
|
||||||
glibtop_error_vr (glibtop_global_server, format, args);
|
|
||||||
va_end (args);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
glibtop_warn (char *format, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
va_start (args, format);
|
|
||||||
glibtop_warn_vr (glibtop_global_server, format, args);
|
|
||||||
va_end (args);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
glibtop_error_io (char *format, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
va_start (args, format);
|
|
||||||
glibtop_error_io_vr (glibtop_global_server, format, errno, args);
|
|
||||||
va_end (args);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
glibtop_warn_io (char *format, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
va_start (args, format);
|
|
||||||
glibtop_warn_io_vr (glibtop_global_server, format, errno, args);
|
|
||||||
va_end (args);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* no __GNUC__ */
|
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -28,39 +28,68 @@
|
|||||||
|
|
||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
#include <glib/gerror.h>
|
||||||
|
|
||||||
#define GLIBTOP_ERROR_NO_ERROR 0
|
G_BEGIN_DECLS
|
||||||
#define GLIBTOP_ERROR_UNKNOWN 1
|
|
||||||
#define GLIBTOP_ERROR_INVALID_ARGUMENT 2
|
|
||||||
#define GLIBTOP_ERROR_NO_SUCH_PARAMETER 3
|
|
||||||
#define GLIBTOP_ERROR_READONLY_VALUE 4
|
|
||||||
#define GLIBTOP_ERROR_SIZE_MISMATCH 5
|
|
||||||
|
|
||||||
#define GLIBTOP_ERROR_SERVER_COMM_FAILURE 6
|
#define GLIBTOP_ERROR glibtop_error_quark ()
|
||||||
|
|
||||||
#define GLIBTOP_ERROR_NO_SUCH_PROCESS 7
|
GQuark glibtop_error_quark (void) G_GNUC_CONST;
|
||||||
|
|
||||||
#define GLIBTOP_ERROR_NO_KERNEL_SUPPORT 8
|
typedef enum {
|
||||||
#define GLIBTOP_ERROR_INCOMPATIBLE_KERNEL 9
|
GLIBTOP_ERROR_NO_ERROR = 0,
|
||||||
|
GLIBTOP_ERROR_UNKNOWN,
|
||||||
|
GLIBTOP_ERROR_INVALID_ARGUMENT,
|
||||||
|
GLIBTOP_ERROR_NO_SUCH_PARAMETER,
|
||||||
|
GLIBTOP_ERROR_READONLY_VALUE,
|
||||||
|
GLIBTOP_ERROR_SIZE_MISMATCH,
|
||||||
|
|
||||||
#define GLIBTOP_ERROR_NO_SUCH_BACKEND 10
|
GLIBTOP_ERROR_SERVER_COMM_FAILURE,
|
||||||
#define GLIBTOP_ERROR_NOT_IMPLEMENTED 11
|
|
||||||
#define GLIBTOP_ERROR_NO_BACKEND_OPENED 12
|
|
||||||
|
|
||||||
#define GLIBTOP_ERROR_DEMARSHAL_ERROR 13
|
GLIBTOP_ERROR_NO_SUCH_PROCESS,
|
||||||
|
|
||||||
#define GLIBTOP_MAX_ERROR 14
|
GLIBTOP_ERROR_NO_KERNEL_SUPPORT,
|
||||||
|
GLIBTOP_ERROR_INCOMPATIBLE_KERNEL,
|
||||||
|
|
||||||
char *
|
GLIBTOP_ERROR_NO_SUCH_BACKEND,
|
||||||
glibtop_get_error_string_l (glibtop *server, unsigned error_number);
|
GLIBTOP_ERROR_NOT_IMPLEMENTED,
|
||||||
|
GLIBTOP_ERROR_NO_BACKEND_OPENED,
|
||||||
|
|
||||||
unsigned
|
GLIBTOP_ERROR_DEMARSHAL_ERROR
|
||||||
glibtop_get_errno_l (glibtop *server);
|
} glibtop_error;
|
||||||
|
|
||||||
unsigned
|
void
|
||||||
glibtop_clear_errno_l (glibtop *server);
|
glibtop_error_vl (glibtop_client *client, glibtop_error code,
|
||||||
|
const char *format, va_list args);
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
void
|
||||||
|
glibtop_error_io_vl (glibtop_client *client, glibtop_error code,
|
||||||
|
int io_errno, const char *format, va_list args);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_warn_vl (glibtop_client *client, glibtop_error code,
|
||||||
|
const char *format, va_list args);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_warn_io_vl (glibtop_client *client, glibtop_error code,
|
||||||
|
int io_errno, const char *format, va_list args);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_error_l (glibtop_client *client, glibtop_error code,
|
||||||
|
char *format, ...);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_warn_l (glibtop_client *client, glibtop_error code,
|
||||||
|
char *format, ...);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_error_io_l (glibtop_client *client, glibtop_error code,
|
||||||
|
char *format, ...);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_warn_io_l (glibtop_client *client, glibtop_error code,
|
||||||
|
char *format, ...);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_FSUSAGE_BLOCKS 0
|
#define GLIBTOP_FSUSAGE_BLOCKS 0
|
||||||
#define GLIBTOP_FSUSAGE_BFREE 1
|
#define GLIBTOP_FSUSAGE_BFREE 1
|
||||||
@@ -51,12 +51,8 @@ struct _glibtop_fsusage
|
|||||||
ffree; /* Free file nodes. */
|
ffree; /* Free file nodes. */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_fsusage(fsusage,disk) glibtop_get_fsusage_l(glibtop_global_server, fsusage, disk)
|
int glibtop_get_fsusage_l (glibtop_client *client, glibtop_fsusage *buf, const char *mount_dir);
|
||||||
|
int glibtop_get_fsusage_s (glibtop_server *server, glibtop_closure *closure, glibtop_fsusage *buf, const char *mount_dir);
|
||||||
#define glibtop_get_fsusage_r glibtop_get_fsusage_s
|
|
||||||
|
|
||||||
int glibtop_get_fsusage_l (glibtop *server, glibtop_fsusage *buf, const char *mount_dir);
|
|
||||||
int glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf, const char *mount_dir);
|
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
|
|
||||||
@@ -69,6 +65,6 @@ extern const char *glibtop_descriptions_fsusage [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,31 +29,22 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/array.h>
|
#include <glibtop/array.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
#include <glibtop/xmalloc.h>
|
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define glibtop_get_proc_args_as_array(pid) glibtop_get_proc_args_as_array_l(glibtop_global_server, pid)
|
|
||||||
|
|
||||||
GPtrArray *
|
GPtrArray *
|
||||||
glibtop_get_proc_args_as_array_l (glibtop *server, pid_t pid);
|
glibtop_get_proc_args_as_array_l (glibtop_client *client, pid_t pid);
|
||||||
|
|
||||||
#define glibtop_get_proclist_as_array(which,arg) glibtop_get_proclist_as_array_l(glibtop_global_server, which, arg)
|
|
||||||
|
|
||||||
GArray *
|
GArray *
|
||||||
glibtop_get_proclist_as_array_l (glibtop *server, int64_t which, int64_t arg);
|
glibtop_get_proclist_as_array_l (glibtop_client *client, int64_t which, int64_t arg);
|
||||||
|
|
||||||
#define glibtop_get_proc_map_as_array(pid) glibtop_get_proc_map_as_array_l(glibtop_global_server, pid)
|
|
||||||
|
|
||||||
GPtrArray *
|
GPtrArray *
|
||||||
glibtop_get_proc_map_as_array_l (glibtop *server, pid_t pid);
|
glibtop_get_proc_map_as_array_l (glibtop_client *client, pid_t pid);
|
||||||
|
|
||||||
#define glibtop_get_mountlist_as_array(all_fs) glibtop_get_mountlist_as_array_l(glibtop_global_server, all_fs)
|
|
||||||
|
|
||||||
GPtrArray *
|
GPtrArray *
|
||||||
glibtop_get_mountlist_as_array_l (glibtop *server, int all_fs);
|
glibtop_get_mountlist_as_array_l (glibtop_client *client, int all_fs);
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
#endif
|
#endif
|
||||||
|
@@ -23,28 +23,26 @@
|
|||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __GLIBTOP_BACKEND_H__
|
#ifndef __GLIBTOP_BACKEND_INFO_H__
|
||||||
#define __GLIBTOP_BACKEND_H__
|
#define __GLIBTOP_BACKEND_INFO_H__
|
||||||
|
|
||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glibtop/glibtop-server.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef struct _glibtop_backend_info glibtop_backend_info;
|
typedef struct _glibtop_backend_info glibtop_backend_info;
|
||||||
typedef struct _glibtop_backend_entry glibtop_backend_entry;
|
typedef struct _glibtop_backend_entry glibtop_backend_entry;
|
||||||
typedef struct _glibtop_backend_module glibtop_backend_module;
|
typedef struct _glibtop_backend_module glibtop_backend_module;
|
||||||
typedef struct _glibtop_backend_private glibtop_backend_private;
|
|
||||||
|
|
||||||
typedef struct _glibtop_backend glibtop_backend;
|
typedef struct _glibtop_call_vector glibtop_call_vector;
|
||||||
|
|
||||||
#include <glibtop/call-vector.h>
|
typedef int (*glibtop_backend_open_func_t) (glibtop_server *, glibtop_backend *,
|
||||||
|
u_int64_t, const char **);
|
||||||
typedef int (*glibtop_backend_open_func_t) (glibtop *, glibtop_backend *,
|
typedef int (*glibtop_backend_close_func_t) (glibtop_server *, glibtop_backend *,
|
||||||
u_int64_t, const char **);
|
glibtop_closure *);
|
||||||
typedef int (*glibtop_backend_close_func_t) (glibtop *, glibtop_backend *);
|
|
||||||
|
|
||||||
struct _glibtop_backend_info
|
struct _glibtop_backend_info
|
||||||
{
|
{
|
||||||
@@ -63,16 +61,17 @@ struct _glibtop_backend_module
|
|||||||
{
|
{
|
||||||
int refcount;
|
int refcount;
|
||||||
GModule *module;
|
GModule *module;
|
||||||
|
GSList *extra_modules;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _IN_LIBGTOP */
|
|
||||||
|
|
||||||
struct _glibtop_backend_entry
|
struct _glibtop_backend_entry
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
char *libtool_name;
|
char *libtool_name;
|
||||||
char *shlib_name;
|
char *shlib_name;
|
||||||
|
|
||||||
|
GSList *extra_libs;
|
||||||
|
|
||||||
/* This is const since you must not attempt to
|
/* This is const since you must not attempt to
|
||||||
* write into gmodule loaded memory. */
|
* write into gmodule loaded memory. */
|
||||||
const glibtop_backend_info *info;
|
const glibtop_backend_info *info;
|
||||||
@@ -81,14 +80,7 @@ struct _glibtop_backend_entry
|
|||||||
glibtop_backend_module *_priv;
|
glibtop_backend_module *_priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _glibtop_backend
|
#endif /* _IN_LIBGTOP */
|
||||||
{
|
|
||||||
const glibtop_backend_info *info;
|
|
||||||
|
|
||||||
/* private pointers */
|
|
||||||
glibtop_backend_private *_priv;
|
|
||||||
glibtop_backend_module *_priv_module;
|
|
||||||
};
|
|
||||||
|
|
||||||
long
|
long
|
||||||
glibtop_register_backend (glibtop_backend_entry *entry);
|
glibtop_register_backend (glibtop_backend_entry *entry);
|
||||||
@@ -105,10 +97,6 @@ glibtop_backend_by_name (const char *backend_name);
|
|||||||
void
|
void
|
||||||
glibtop_init_backends (void);
|
glibtop_init_backends (void);
|
||||||
|
|
||||||
int
|
G_END_DECLS
|
||||||
glibtop_open_backend_l (glibtop *server, const char *backend_name,
|
|
||||||
u_int64_t features, const char **backend_args);
|
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
|
||||||
|
|
||||||
#endif
|
#endif
|
85
include/glibtop/glibtop-backend.h
Normal file
85
include/glibtop/glibtop-backend.h
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 2.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GLIBTOP_BACKEND_H__
|
||||||
|
#define __GLIBTOP_BACKEND_H__
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define GLIBTOP_TYPE_BACKEND (glibtop_backend_get_type ())
|
||||||
|
#define GLIBTOP_BACKEND(backend) (G_TYPE_CHECK_INSTANCE_CAST ((backend), GLIBTOP_TYPE_BACKEND, glibtop_backend))
|
||||||
|
#define GLIBTOP_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLIBTOP_TYPE_BACKEND, glibtop_backend_class))
|
||||||
|
#define GLIBTOP_IS_BACKEND(backend) (G_TYPE_CHECK_INSTANCE_TYPE ((backend), GLIBTOP_TYPE_BACKEND))
|
||||||
|
#define GLIBTOP_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLIBTOP_TYPE_BACKEND))
|
||||||
|
#define GLIBTOP_BACKEND_GET_CLASS(backend)(G_TYPE_INSTANCE_GET_CLASS ((backend), GLIBTOP_TYPE_BACKEND, glibtop_backend_class))
|
||||||
|
|
||||||
|
#define GLIBTOP_BACKEND_TYPE(backend) (G_TYPE_FROM_INSTANCE (backend))
|
||||||
|
#define GLIBTOP_BACKEND_TYPE_NAME(backend)(g_type_name (GLIBTOP_BACKEND_TYPE (backend)))
|
||||||
|
|
||||||
|
/* --- typedefs & structures --- */
|
||||||
|
typedef struct _glibtop_backend glibtop_backend;
|
||||||
|
typedef struct _glibtop_backend_class glibtop_backend_class;
|
||||||
|
typedef struct _glibtop_backend_private glibtop_backend_private;
|
||||||
|
|
||||||
|
#include <glibtop/glibtop-backend-info.h>
|
||||||
|
|
||||||
|
struct _glibtop_backend
|
||||||
|
{
|
||||||
|
GObject object;
|
||||||
|
|
||||||
|
/* <private> */
|
||||||
|
glibtop_backend_private *_priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _glibtop_backend_class
|
||||||
|
{
|
||||||
|
GObjectClass parent_class;;
|
||||||
|
};
|
||||||
|
|
||||||
|
GType
|
||||||
|
glibtop_backend_get_type (void);
|
||||||
|
|
||||||
|
glibtop_backend *
|
||||||
|
glibtop_backend_get (const char *backend_name, u_int64_t features,
|
||||||
|
const char **backend_args, GError **error);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_backend_set_closure_data (glibtop_backend *backend, glibtop_closure *closure);
|
||||||
|
|
||||||
|
glibtop_closure *
|
||||||
|
glibtop_backend_get_closure_data (glibtop_backend *backend);
|
||||||
|
|
||||||
|
glibtop_call_vector *
|
||||||
|
glibtop_backend_get_call_vector (glibtop_backend *backend);
|
||||||
|
|
||||||
|
glibtop_server *
|
||||||
|
glibtop_backend_get_server (glibtop_backend *backend);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif
|
97
include/glibtop/glibtop-client.h
Normal file
97
include/glibtop/glibtop-client.h
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 2.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GLIBTOP_CLIENT_H__
|
||||||
|
#define __GLIBTOP_CLIENT_H__
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
|
||||||
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
#include <glibtop/glibtop-backend.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define GLIBTOP_TYPE_CLIENT (glibtop_client_get_type ())
|
||||||
|
#define GLIBTOP_CLIENT(client) (G_TYPE_CHECK_INSTANCE_CAST ((client), GLIBTOP_TYPE_CLIENT, glibtop_client))
|
||||||
|
#define GLIBTOP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLIBTOP_TYPE_CLIENT, glibtop_client_class))
|
||||||
|
#define GLIBTOP_IS_CLIENT(client) (G_TYPE_CHECK_INSTANCE_TYPE ((client), GLIBTOP_TYPE_CLIENT))
|
||||||
|
#define GLIBTOP_IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLIBTOP_TYPE_CLIENT))
|
||||||
|
#define GLIBTOP_CLIENT_GET_CLASS(client)(G_TYPE_INSTANCE_GET_CLASS ((client), GLIBTOP_TYPE_CLIENT, glibtop_client_class))
|
||||||
|
|
||||||
|
#define GLIBTOP_CLIENT_TYPE(client) (G_TYPE_FROM_INSTANCE (client))
|
||||||
|
#define GLIBTOP_CLIENT_TYPE_NAME(client)(g_type_name (GLIBTOP_CLIENT_TYPE (client)))
|
||||||
|
|
||||||
|
/* --- typedefs & structures --- */
|
||||||
|
typedef struct _glibtop_client glibtop_client;
|
||||||
|
typedef struct _glibtop_client_class glibtop_client_class;
|
||||||
|
typedef struct _glibtop_client_private glibtop_client_private;
|
||||||
|
|
||||||
|
struct _glibtop_client
|
||||||
|
{
|
||||||
|
GObject object;
|
||||||
|
|
||||||
|
/* <public> */
|
||||||
|
GError *error;
|
||||||
|
|
||||||
|
/* <private> */
|
||||||
|
glibtop_client_private *_priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _glibtop_client_class
|
||||||
|
{
|
||||||
|
GObjectClass parent_class;;
|
||||||
|
|
||||||
|
void (*error) (glibtop_client *client, GError *error);
|
||||||
|
void (*warning) (glibtop_client *client, GError *error);
|
||||||
|
};
|
||||||
|
|
||||||
|
GType
|
||||||
|
glibtop_client_get_type (void);
|
||||||
|
|
||||||
|
glibtop_client *
|
||||||
|
glibtop_client_new (void);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_client_propagate_error (glibtop_client *client, GError *error);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_client_propagate_warning (glibtop_client *client, GError *error);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_client_open_backend (glibtop_client *client, const char *backend_name,
|
||||||
|
u_int64_t features, const char **backend_args);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_client_add_backend (glibtop_client *client,
|
||||||
|
glibtop_backend *backend);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_client_remove_backend (glibtop_client *client,
|
||||||
|
glibtop_backend *backend);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif
|
75
include/glibtop/glibtop-server.h
Normal file
75
include/glibtop/glibtop-server.h
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 2.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GLIBTOP_SERVER_H__
|
||||||
|
#define __GLIBTOP_SERVER_H__
|
||||||
|
|
||||||
|
#include <glibtop/global.h>
|
||||||
|
#include <glibtop/sysdeps.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
typedef struct _glibtop_server glibtop_server;
|
||||||
|
typedef struct _glibtop_server_info glibtop_server_info;
|
||||||
|
|
||||||
|
typedef struct _glibtop_closure glibtop_closure;
|
||||||
|
|
||||||
|
typedef int (*glibtop_init_func_t) (glibtop_server *, glibtop_closure *);
|
||||||
|
|
||||||
|
extern glibtop_init_func_t _glibtop_init_hook_s [];
|
||||||
|
extern glibtop_init_func_t _glibtop_init_hook_p [];
|
||||||
|
|
||||||
|
struct _glibtop_server_info
|
||||||
|
{
|
||||||
|
int ncpu; /* Number of CPUs, zero if single-processor */
|
||||||
|
unsigned long features; /* Server is required for this features */
|
||||||
|
glibtop_sysdeps sysdeps; /* Detailed feature list */
|
||||||
|
glibtop_sysdeps required; /* Required feature list */
|
||||||
|
glibtop_sysdeps wanted; /* We only want this features */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _glibtop_server
|
||||||
|
{
|
||||||
|
glibtop_server_info *info;
|
||||||
|
|
||||||
|
int refcount;
|
||||||
|
unsigned flags;
|
||||||
|
const char *name;
|
||||||
|
|
||||||
|
void *_priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
glibtop_server *
|
||||||
|
glibtop_server_new (void);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_server_ref (glibtop_server *server);
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_server_unref (glibtop_server *server);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif
|
@@ -30,40 +30,24 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
#include <stdio.h>
|
||||||
* All declarations are enclosed in BEGIN_LIBGTOP_DECLS and
|
#include <stdlib.h>
|
||||||
* END_LIBGTOP_DECLS so that C++ compilers don't mangle their names.
|
#include <sys/param.h>
|
||||||
*
|
|
||||||
*/
|
#include <stdarg.h>
|
||||||
|
|
||||||
#undef BEGIN_LIBGTOP_DECLS
|
#ifdef HAVE_UNISTD_H
|
||||||
#undef END_LIBGTOP_DECLS
|
#include <unistd.h>
|
||||||
#ifdef __cplusplus
|
|
||||||
# define BEGIN_LIBGTOP_DECLS extern "C" {
|
|
||||||
# define END_LIBGTOP_DECLS }
|
|
||||||
#else
|
|
||||||
# define BEGIN_LIBGTOP_DECLS /* empty */
|
|
||||||
# define END_LIBGTOP_DECLS /* empty */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _IN_LIBGTOP
|
#ifdef HAVE_MEMORY_H
|
||||||
|
#include <memory.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Provide macros to feature the GCC function attribute.
|
#include <string.h>
|
||||||
*/
|
#include <sys/types.h>
|
||||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
|
|
||||||
#define G_GNUC_NORETURN \
|
|
||||||
__attribute__((noreturn))
|
|
||||||
#define G_GNUC_CONST \
|
|
||||||
__attribute__((const))
|
|
||||||
#define G_GNUC_UNUSED \
|
|
||||||
__attribute__((unused))
|
|
||||||
#else /* !__GNUC__ */
|
|
||||||
#define G_GNUC_NORETURN
|
|
||||||
#define G_GNUC_CONST
|
|
||||||
#define G_GNUC_UNUSED
|
|
||||||
#endif /* !__GNUC__ */
|
|
||||||
|
|
||||||
#endif /* _IN_LIBGTOP */
|
#include <glib/gmacros.h>
|
||||||
|
|
||||||
#if TIME_WITH_SYS_TIME
|
#if TIME_WITH_SYS_TIME
|
||||||
# include <sys/time.h>
|
# include <sys/time.h>
|
||||||
@@ -76,6 +60,11 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* For Tru64 UNIX */
|
||||||
|
#ifdef HAVE_SYS_BITYPES_H
|
||||||
|
#include <sys/bitypes.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef NEED_GNOMESUPPORT_H
|
#ifdef NEED_GNOMESUPPORT_H
|
||||||
#include <gnomesupport.h>
|
#include <gnomesupport.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -97,25 +86,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_MEMORY_H
|
|
||||||
#include <memory.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#ifdef _IN_LIBGTOP
|
#ifdef _IN_LIBGTOP
|
||||||
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
@@ -126,7 +98,7 @@
|
|||||||
|
|
||||||
#ifdef _IN_LIBGTOP
|
#ifdef _IN_LIBGTOP
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#ifndef _
|
#ifndef _
|
||||||
#define _(String) dgettext (LIBGTOP_PACKAGE, String)
|
#define _(String) dgettext (LIBGTOP_PACKAGE, String)
|
||||||
@@ -137,7 +109,7 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
char *strerror (int errno);
|
char *strerror (int errno);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* _IN_LIBGTOP */
|
#endif /* _IN_LIBGTOP */
|
||||||
|
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#define GLIBTOP_INODEDB_ALL 7
|
#define GLIBTOP_INODEDB_ALL 7
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef struct _glibtop_inodedb glibtop_inodedb;
|
typedef struct _glibtop_inodedb glibtop_inodedb;
|
||||||
|
|
||||||
@@ -49,21 +49,17 @@ struct _glibtop_inodedb
|
|||||||
GDBM_FILE system_dbf, user_dbf;
|
GDBM_FILE system_dbf, user_dbf;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_inodedb_open(p1,p2) glibtop_inodedb_open_s(glibtop_global_server, p1, p2)
|
|
||||||
#define glibtop_inodedb_lookup(p1,p2,p3) glibtop_inodedb_lookup_s(glibtop_global_server, p1, p2, p3)
|
|
||||||
#define glibtop_inodedb_close(p1) glibtop_inodedb_close_s(glibtop_global_server)
|
|
||||||
|
|
||||||
glibtop_inodedb *
|
glibtop_inodedb *
|
||||||
glibtop_inodedb_open_s (glibtop *server, unsigned databases, unsigned long cache_size);
|
glibtop_inodedb_open_s (glibtop_server *server, unsigned databases, unsigned long cache_size);
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
glibtop_inodedb_lookup_s (glibtop *server,
|
glibtop_inodedb_lookup_s (glibtop_server *server,
|
||||||
glibtop_inodedb *inodedb,
|
glibtop_inodedb *inodedb,
|
||||||
u_int64_t device, u_int64_t inode);
|
u_int64_t device, u_int64_t inode);
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_inodedb_close_s (glibtop *server, glibtop_inodedb *inodedb);
|
glibtop_inodedb_close_s (glibtop_server *server, glibtop_closure *closure, glibtop_inodedb *inodedb);
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#include <glibtop/compat_10.h>
|
#include <glibtop/compat_10.h>
|
||||||
#include <glibtop/array.h>
|
#include <glibtop/array.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_INTERFACE_IF_FLAGS 0
|
#define GLIBTOP_INTERFACE_IF_FLAGS 0
|
||||||
#define GLIBTOP_INTERFACE_TRANSPORT 1
|
#define GLIBTOP_INTERFACE_TRANSPORT 1
|
||||||
@@ -44,12 +44,23 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
|
|
||||||
#define GLIBTOP_MAX_INTERFACE 7
|
#define GLIBTOP_MAX_INTERFACE 7
|
||||||
|
|
||||||
|
#define GLIBTOP_IFADDR_TRANSPORT 0
|
||||||
|
#define GLIBTOP_IFADDR_ADDR_LEN 1
|
||||||
|
#define GLIBTOP_IFADDR_ADDRESS 2
|
||||||
|
#define GLIBTOP_IFADDR_SUBNET 3
|
||||||
|
#define GLIBTOP_IFADDR_SCOPE 4
|
||||||
|
|
||||||
|
#define GLIBTOP_MAX_IFADDR 5
|
||||||
|
|
||||||
typedef struct _glibtop_interface glibtop_interface;
|
typedef struct _glibtop_interface glibtop_interface;
|
||||||
|
typedef struct _glibtop_ifaddr glibtop_ifaddr;
|
||||||
|
|
||||||
typedef enum _glibtop_interface_type glibtop_interface_type;
|
typedef enum _glibtop_interface_type glibtop_interface_type;
|
||||||
typedef enum _glibtop_transport glibtop_transport;
|
typedef enum _glibtop_transport glibtop_transport;
|
||||||
typedef enum _glibtop_protocol glibtop_protocol;
|
typedef enum _glibtop_protocol glibtop_protocol;
|
||||||
|
|
||||||
|
typedef enum _glibtop_ipv6_scope glibtop_ipv6_scope;
|
||||||
|
|
||||||
typedef enum _glibtop_strategy glibtop_strategy;
|
typedef enum _glibtop_strategy glibtop_strategy;
|
||||||
typedef enum _glibtop_interface_flags glibtop_interface_flags;
|
typedef enum _glibtop_interface_flags glibtop_interface_flags;
|
||||||
|
|
||||||
@@ -75,7 +86,7 @@ enum _glibtop_transport {
|
|||||||
GLIBTOP_TRANSPORT_X25 = 1 << 3,
|
GLIBTOP_TRANSPORT_X25 = 1 << 3,
|
||||||
GLIBTOP_TRANSPORT_DECNET = 1 << 4,
|
GLIBTOP_TRANSPORT_DECNET = 1 << 4,
|
||||||
GLIBTOP_TRANSPORT_APPLETALK = 1 << 5,
|
GLIBTOP_TRANSPORT_APPLETALK = 1 << 5,
|
||||||
GLIBTOP_TRANSPORT_NETBEUI = 1 << 6,
|
GLIBTOP_TRANSPORT_NETBEUI = 1 << 6
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GLIBTOP_TRANSPORT_ALL GLIBTOP_UNLIMITED
|
#define GLIBTOP_TRANSPORT_ALL GLIBTOP_UNLIMITED
|
||||||
@@ -101,13 +112,24 @@ enum _glibtop_interface_type {
|
|||||||
GLIBTOP_INTERFACE_ISDN
|
GLIBTOP_INTERFACE_ISDN
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum _glibtop_ipv6_scope {
|
||||||
|
GLIBTOP_IPV6_SCOPE_GLOBAL = 0,
|
||||||
|
GLIBTOP_IPV6_SCOPE_LOOPBACK = 1 << 1,
|
||||||
|
GLIBTOP_IPV6_SCOPE_LINKLOCAL = 1 << 2,
|
||||||
|
GLIBTOP_IPV6_SCOPE_SITELOCAL = 1 << 3,
|
||||||
|
GLIBTOP_IPV6_SCOPE_COMPATv4 = 1 << 4,
|
||||||
|
GLIBTOP_IPV6_SCOPE_UNKNOWN = 1 << 5
|
||||||
|
};
|
||||||
|
|
||||||
enum _glibtop_strategy {
|
enum _glibtop_strategy {
|
||||||
GLIBTOP_INTERFACES_ALL = 0,
|
GLIBTOP_INTERFACES_ALL = 0,
|
||||||
GLIBTOP_INTERFACES_BEST_MATCHING,
|
GLIBTOP_INTERFACES_BEST_MATCHING,
|
||||||
GLIBTOP_INTERFACES_ONLY_THIS_ONE,
|
GLIBTOP_INTERFACES_ONLY_THIS_ONE,
|
||||||
GLIBTOP_INTERFACES_INCLUDE_LOGICAL = 1 << 7,
|
GLIBTOP_INTERFACES_INCLUDE_LOGICAL = 1 << 7
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define GLIBTOP_STRATEGY_FLAGS_MASK (1 << 7)
|
||||||
|
|
||||||
enum _glibtop_interface_flags {
|
enum _glibtop_interface_flags {
|
||||||
GLIBTOP_IF_FLAGS_UP = 1,
|
GLIBTOP_IF_FLAGS_UP = 1,
|
||||||
GLIBTOP_IF_FLAGS_BROADCAST,
|
GLIBTOP_IF_FLAGS_BROADCAST,
|
||||||
@@ -127,6 +149,16 @@ enum _glibtop_interface_flags {
|
|||||||
GLIBTOP_IF_FLAGS_MULTICAST
|
GLIBTOP_IF_FLAGS_MULTICAST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _glibtop_ifaddr
|
||||||
|
{
|
||||||
|
u_int64_t flags,
|
||||||
|
transport; /* GLIBTOP_IFADDR_TRANSPORT */
|
||||||
|
u_int8_t addr_len, /* GLIBTOP_IFADDR_ADDR_LEN */
|
||||||
|
address [GLIBTOP_IFADDR_LEN]; /* GLIBTOP_IFADDR_ADDRESS */
|
||||||
|
u_int64_t subnet, /* GLIBTOP_IFADDR_SUBNET */
|
||||||
|
scope; /* GLIBTOP_IFADDR_SCOPE */
|
||||||
|
};
|
||||||
|
|
||||||
struct _glibtop_interface
|
struct _glibtop_interface
|
||||||
{
|
{
|
||||||
u_int64_t flags,
|
u_int64_t flags,
|
||||||
@@ -139,22 +171,20 @@ struct _glibtop_interface
|
|||||||
char name [GLIBTOP_INTERFACE_LEN];
|
char name [GLIBTOP_INTERFACE_LEN];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_interface_names(array,interface,number,instance,strategy) glibtop_get_interface_names_l (glibtop_global_server, array, interface, number, instance, strategy)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_INTERFACE_NAMES
|
#if GLIBTOP_SUID_INTERFACE_NAMES
|
||||||
#define glibtop_get_interface_names_r glibtop_get_interface_names_p
|
#define glibtop_get_interface_names_r glibtop_get_interface_names_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_interface_names_r glibtop_get_interface_names_s
|
#define glibtop_get_interface_names_r glibtop_get_interface_names_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
glibtop_interface *glibtop_get_interface_names_l (glibtop *server, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy);
|
glibtop_interface *glibtop_get_interface_names_l (glibtop_client *client, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_INTERFACE_NAMES
|
#if GLIBTOP_SUID_INTERFACE_NAMES
|
||||||
int glibtop_init_interface_names_p (glibtop *server);
|
int glibtop_init_interface_names_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
glibtop_interface *glibtop_get_interface_names_p (glibtop *server, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy);
|
glibtop_interface *glibtop_get_interface_names_p (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_interface_names_s (glibtop *server);
|
int glibtop_init_interface_names_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
glibtop_interface *glibtop_get_interface_names_s (glibtop *server, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy);
|
glibtop_interface *glibtop_get_interface_names_s (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -168,6 +198,6 @@ extern const char *glibtop_descriptions_interface_names [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
/* Nobody should really be using more than 64 processors. */
|
/* Nobody should really be using more than 64 processors. */
|
||||||
#define GLIBTOP_NCPU 64
|
#define GLIBTOP_NCPU 64
|
||||||
@@ -42,12 +42,15 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
/* Maximum length of a network interface name. */
|
/* Maximum length of a network interface name. */
|
||||||
#define GLIBTOP_INTERFACE_LEN 32
|
#define GLIBTOP_INTERFACE_LEN 32
|
||||||
|
|
||||||
|
/* Length of a network interface address in bytes. */
|
||||||
|
#define GLIBTOP_IFADDR_LEN 16
|
||||||
|
|
||||||
/* This is ((u_int64_t)-1) */
|
/* This is ((u_int64_t)-1) */
|
||||||
#define GLIBTOP_UNLIMITED (~(u_int64_t)0)
|
#define GLIBTOP_UNLIMITED (~(u_int64_t)0)
|
||||||
|
|
||||||
/* Maximum length of a backend name. */
|
/* Maximum length of a backend name. */
|
||||||
#define GLIBTOP_BACKEND_NAME_LEN 40
|
#define GLIBTOP_BACKEND_NAME_LEN 40
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_LOADAVG_LOADAVG 0
|
#define GLIBTOP_LOADAVG_LOADAVG 0
|
||||||
#define GLIBTOP_LOADAVG_NR_RUNNING 1
|
#define GLIBTOP_LOADAVG_NR_RUNNING 1
|
||||||
@@ -49,22 +49,20 @@ struct _glibtop_loadavg
|
|||||||
last_pid; /* GLIBTOP_LOADAVG_LAST_PID */
|
last_pid; /* GLIBTOP_LOADAVG_LAST_PID */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_loadavg(loadavg) glibtop_get_loadavg_l(glibtop_global_server, loadavg)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_LOADAVG
|
#if GLIBTOP_SUID_LOADAVG
|
||||||
#define glibtop_get_loadavg_r glibtop_get_loadavg_p
|
#define glibtop_get_loadavg_r glibtop_get_loadavg_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_loadavg_r glibtop_get_loadavg_s
|
#define glibtop_get_loadavg_r glibtop_get_loadavg_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_loadavg_l (glibtop *server, glibtop_loadavg *buf);
|
int glibtop_get_loadavg_l (glibtop_client *client, glibtop_loadavg *buf);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_LOADAVG
|
#if GLIBTOP_SUID_LOADAVG
|
||||||
int glibtop_init_loadavg_p (glibtop *server);
|
int glibtop_init_loadavg_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf);
|
int glibtop_get_loadavg_p (glibtop_server *server, glibtop_closure *closure, glibtop_loadavg *buf);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_loadavg_s (glibtop *server);
|
int glibtop_init_loadavg_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf);
|
int glibtop_get_loadavg_s (glibtop_server *server, glibtop_closure *closure, glibtop_loadavg *buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -78,6 +76,6 @@ extern const char *glibtop_descriptions_loadavg [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_MEM_TOTAL 0
|
#define GLIBTOP_MEM_TOTAL 0
|
||||||
#define GLIBTOP_MEM_USED 1
|
#define GLIBTOP_MEM_USED 1
|
||||||
@@ -57,22 +57,20 @@ struct _glibtop_mem
|
|||||||
locked; /* GLIBTOP_MEM_LOCKED */
|
locked; /* GLIBTOP_MEM_LOCKED */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_mem(mem) glibtop_get_mem_l(glibtop_global_server, mem)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_MEM
|
#if GLIBTOP_SUID_MEM
|
||||||
#define glibtop_get_mem_r glibtop_get_mem_p
|
#define glibtop_get_mem_r glibtop_get_mem_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_mem_r glibtop_get_mem_s
|
#define glibtop_get_mem_r glibtop_get_mem_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_mem_l (glibtop *server, glibtop_mem *buf);
|
int glibtop_get_mem_l (glibtop_client *client, glibtop_mem *buf);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_MEM
|
#if GLIBTOP_SUID_MEM
|
||||||
int glibtop_init_mem_p (glibtop *server);
|
int glibtop_init_mem_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_mem_p (glibtop *server, glibtop_mem *buf);
|
int glibtop_get_mem_p (glibtop_server *server, glibtop_closure *closure, glibtop_mem *buf);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_mem_s (glibtop *server);
|
int glibtop_init_mem_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_mem_s (glibtop *server, glibtop_mem *buf);
|
int glibtop_get_mem_s (glibtop_server *server, glibtop_closure *closure, glibtop_mem *buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -86,6 +84,6 @@ extern const char *glibtop_descriptions_mem [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#include <glibtop/compat_10.h>
|
#include <glibtop/compat_10.h>
|
||||||
#include <glibtop/array.h>
|
#include <glibtop/array.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef struct _glibtop_mountentry glibtop_mountentry;
|
typedef struct _glibtop_mountentry glibtop_mountentry;
|
||||||
|
|
||||||
@@ -44,15 +44,13 @@ struct _glibtop_mountentry
|
|||||||
char type [GLIBTOP_MOUNTENTRY_LEN+1];
|
char type [GLIBTOP_MOUNTENTRY_LEN+1];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_mountlist(array,all_fs) glibtop_get_mountlist_l(glibtop_global_server, array, all_fs)
|
|
||||||
|
|
||||||
#define glibtop_get_mountlist_r glibtop_get_mountlist_s
|
#define glibtop_get_mountlist_r glibtop_get_mountlist_s
|
||||||
|
|
||||||
glibtop_mountentry *
|
glibtop_mountentry *
|
||||||
glibtop_get_mountlist_l (glibtop *server, glibtop_array *array, int all_fs);
|
glibtop_get_mountlist_l (glibtop_client *client, glibtop_array *array, int all_fs);
|
||||||
|
|
||||||
glibtop_mountentry *
|
glibtop_mountentry *
|
||||||
glibtop_get_mountlist_s (glibtop *server, glibtop_array *array, int all_fs);
|
glibtop_get_mountlist_s (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, int all_fs);
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
|
|
||||||
@@ -65,6 +63,6 @@ extern const char *glibtop_descriptions_mountlist [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_MSG_LIMITS_MSGPOOL 0
|
#define GLIBTOP_MSG_LIMITS_MSGPOOL 0
|
||||||
#define GLIBTOP_MSG_LIMITS_MSGMAP 1
|
#define GLIBTOP_MSG_LIMITS_MSGMAP 1
|
||||||
@@ -55,22 +55,20 @@ struct _glibtop_msg_limits
|
|||||||
msgtql; /* GLIBTOP_MSG_LIMITS_MSGTQL */
|
msgtql; /* GLIBTOP_MSG_LIMITS_MSGTQL */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_msg_limits(msg) glibtop_get_msg_limits_l(glibtop_global_server, msg)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_MSG_LIMITS
|
#if GLIBTOP_SUID_MSG_LIMITS
|
||||||
#define glibtop_get_msg_limits_r glibtop_get_msg_limits_p
|
#define glibtop_get_msg_limits_r glibtop_get_msg_limits_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_msg_limits_r glibtop_get_msg_limits_s
|
#define glibtop_get_msg_limits_r glibtop_get_msg_limits_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_msg_limits_l (glibtop *server, glibtop_msg_limits *buf);
|
int glibtop_get_msg_limits_l (glibtop_client *client, glibtop_msg_limits *buf);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_MSG_LIMITS
|
#if GLIBTOP_SUID_MSG_LIMITS
|
||||||
int glibtop_init_msg_limits_p (glibtop *server);
|
int glibtop_init_msg_limits_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf);
|
int glibtop_get_msg_limits_p (glibtop_server *server, glibtop_closure *closure, glibtop_msg_limits *buf);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_msg_limits_s (glibtop *server);
|
int glibtop_init_msg_limits_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf);
|
int glibtop_get_msg_limits_s (glibtop_server *server, glibtop_closure *closure, glibtop_msg_limits *buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -84,7 +82,7 @@ extern const char *glibtop_descriptions_msg_limits [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_NETINFO_IF_FLAGS 0
|
#define GLIBTOP_NETINFO_IF_FLAGS 0
|
||||||
#define GLIBTOP_NETINFO_TRANSPORT 1
|
#define GLIBTOP_NETINFO_TRANSPORT 1
|
||||||
@@ -46,29 +46,25 @@ typedef struct _glibtop_netinfo glibtop_netinfo;
|
|||||||
struct _glibtop_netinfo
|
struct _glibtop_netinfo
|
||||||
{
|
{
|
||||||
u_int64_t flags,
|
u_int64_t flags,
|
||||||
if_flags, /* GLIBTOP_NETINFO_IF_FLAGS */
|
if_flags, /* GLIBTOP_NETINFO_IF_FLAGS */
|
||||||
transport, /* GLIBTOP_NETINFO_TRANSPORT */
|
transport, /* GLIBTOP_NETINFO_TRANSPORT */
|
||||||
mtu, /* GLIBTOP_NETINFO_MTU */
|
mtu; /* GLIBTOP_NETINFO_MTU */
|
||||||
subnet, /* GLIBTOP_NETINFO_SUBNET */
|
|
||||||
address; /* GLIBTOP_NETINFO_ADDRESS */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_netinfo(netinfo,interface,transport) glibtop_get_netinfo_l(glibtop_global_server, netinfo, interface, transport)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_NETINFO
|
#if GLIBTOP_SUID_NETINFO
|
||||||
#define glibtop_get_netinfo_r glibtop_get_netinfo_p
|
#define glibtop_get_netinfo_r glibtop_get_netinfo_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_netinfo_r glibtop_get_netinfo_s
|
#define glibtop_get_netinfo_r glibtop_get_netinfo_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_netinfo_l (glibtop *server, glibtop_netinfo *buf, const char *interface, unsigned transport);
|
glibtop_ifaddr *glibtop_get_netinfo_l (glibtop_client *client, glibtop_array *array, glibtop_netinfo *buf, const char *interface, u_int64_t transport);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_NETINFO
|
#if GLIBTOP_SUID_NETINFO
|
||||||
int glibtop_init_netinfo_p (glibtop *server);
|
int glibtop_init_netinfo_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_netinfo_p (glibtop *server, glibtop_netinfo *buf, const char *interface, unsigned transport);
|
glibtop_ifaddr *glibtop_get_netinfo_p (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, glibtop_netinfo *buf, const char *interface, u_int64_t transport);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_netinfo_s (glibtop *server);
|
int glibtop_init_netinfo_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_netinfo_s (glibtop *server, glibtop_netinfo *buf, const char *interface, unsigned transport);
|
glibtop_ifaddr *glibtop_get_netinfo_s (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, glibtop_netinfo *buf, const char *interface, u_int64_t transport);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -82,6 +78,6 @@ extern const char *glibtop_descriptions_netinfo [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_NETLOAD_PACKETS_IN 0
|
#define GLIBTOP_NETLOAD_PACKETS_IN 0
|
||||||
#define GLIBTOP_NETLOAD_PACKETS_OUT 1
|
#define GLIBTOP_NETLOAD_PACKETS_OUT 1
|
||||||
@@ -63,22 +63,20 @@ struct _glibtop_netload
|
|||||||
collisions; /* GLIBTOP_NETLOAD_COLLISIONS */
|
collisions; /* GLIBTOP_NETLOAD_COLLISIONS */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_netload(netload,interface,transport,protocol) glibtop_get_netload_l(glibtop_global_server, netload, interface, transport, protocol)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_NETLOAD
|
#if GLIBTOP_SUID_NETLOAD
|
||||||
#define glibtop_get_netload_r glibtop_get_netload_p
|
#define glibtop_get_netload_r glibtop_get_netload_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_netload_r glibtop_get_netload_s
|
#define glibtop_get_netload_r glibtop_get_netload_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_netload_l (glibtop *server, glibtop_netload *buf, const char *interface, unsigned transport, unsigned protocol);
|
int glibtop_get_netload_l (glibtop_client *client, glibtop_netload *buf, const char *interface, unsigned transport, unsigned protocol);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_NETLOAD
|
#if GLIBTOP_SUID_NETLOAD
|
||||||
int glibtop_init_netload_p (glibtop *server);
|
int glibtop_init_netload_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, const char *interface, unsigned transport, unsigned protocol);
|
int glibtop_get_netload_p (glibtop_server *server, glibtop_closure *closure, glibtop_netload *buf, const char *interface, unsigned transport, unsigned protocol);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_netload_s (glibtop *server);
|
int glibtop_init_netload_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, const char *interface, unsigned transport, unsigned protocol);
|
int glibtop_get_netload_s (glibtop_server *server, glibtop_closure *closure, glibtop_netload *buf, const char *interface, unsigned transport, unsigned protocol);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -92,6 +90,6 @@ extern const char *glibtop_descriptions_netload [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -25,9 +25,8 @@
|
|||||||
#define __GLIBTOP_OPEN_H__
|
#define __GLIBTOP_OPEN_H__
|
||||||
|
|
||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/error.h>
|
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define _GLIBTOP_INIT_STATE_INIT 0x10000
|
#define _GLIBTOP_INIT_STATE_INIT 0x10000
|
||||||
#define _GLIBTOP_INIT_STATE_OPEN 0x20000
|
#define _GLIBTOP_INIT_STATE_OPEN 0x20000
|
||||||
@@ -53,7 +52,7 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#define GLIBTOP_ERROR_METHOD_DEFAULT GLIBTOP_ERROR_METHOD_WARN_ONCE
|
#define GLIBTOP_ERROR_METHOD_DEFAULT GLIBTOP_ERROR_METHOD_WARN_ONCE
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_open_l (glibtop *server, const char *backend_name,
|
glibtop_open_l (glibtop_client *client, const char *backend_name,
|
||||||
const unsigned long features, const unsigned flags);
|
const unsigned long features, const unsigned flags);
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -61,21 +60,22 @@ glibtop_init_p (glibtop *server, const unsigned long features,
|
|||||||
const unsigned flags);
|
const unsigned flags);
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_open_p (glibtop *server, const char *program_name,
|
glibtop_open_p (glibtop_server *server, glibtop_closure *closure,
|
||||||
const unsigned long features, const unsigned flags);
|
const unsigned long features, const unsigned flags);
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_open_s (glibtop *server, const char *program_name,
|
glibtop_open_s (glibtop_server *server, glibtop_closure *closure,
|
||||||
const unsigned long features, const unsigned flags);
|
const unsigned long features, const unsigned flags);
|
||||||
|
|
||||||
#ifdef _IN_LIBGTOP
|
#ifdef _IN_LIBGTOP
|
||||||
|
|
||||||
void
|
void
|
||||||
_glibtop_open_sysdeps (glibtop *server, const char *program_name,
|
_glibtop_open_sysdeps (glibtop_client *client, const char *program_name,
|
||||||
const unsigned long features, const unsigned flags);
|
const u_int64_t features, const char **backend_args,
|
||||||
|
GError **opt_error);
|
||||||
|
|
||||||
#endif /* _IN_LIBGTOP */
|
#endif /* _IN_LIBGTOP */
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -27,17 +27,24 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/open.h>
|
#include <glibtop/open.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_PARAM_METHOD 1
|
#define GLIBTOP_PARAM_ERROR_METHOD 1
|
||||||
#define GLIBTOP_PARAM_FEATURES 2
|
#define GLIBTOP_PARAM_FEATURES 2
|
||||||
#define GLIBTOP_PARAM_COMMAND 3
|
#define GLIBTOP_PARAM_NCPU 3
|
||||||
#define GLIBTOP_PARAM_HOST 4
|
#define GLIBTOP_PARAM_OS_VERSION_CODE 4
|
||||||
#define GLIBTOP_PARAM_PORT 5
|
#define GLIBTOP_PARAM_REQUIRED 5
|
||||||
#define GLIBTOP_PARAM_ERROR_METHOD 6
|
|
||||||
#define GLIBTOP_PARAM_REQUIRED 7
|
typedef struct _glibtop_parameter glibtop_parameter;
|
||||||
#define GLIBTOP_PARAM_REMOTE_USER 8
|
|
||||||
#define GLIBTOP_PARAM_PATH_RSH 9
|
struct _glibtop_parameter
|
||||||
|
{
|
||||||
|
unsigned error_method; /* Error Method */
|
||||||
|
u_int64_t features; /* Server is required for this features */
|
||||||
|
unsigned ncpu; /* Number of CPUs, zero if single-processor */
|
||||||
|
u_int64_t os_version_code; /* Version code of the operating system */
|
||||||
|
glibtop_sysdeps required; /* Required feature list */
|
||||||
|
};
|
||||||
|
|
||||||
#define glibtop_get_parameter(p1,p2,p3) glibtop_get_parameter_l(glibtop_global_server,p1,p2,p3)
|
#define glibtop_get_parameter(p1,p2,p3) glibtop_get_parameter_l(glibtop_global_server,p1,p2,p3)
|
||||||
#define glibtop_set_parameter(p1,p2,p3) glibtop_set_parameter_l(glibtop_global_server,p1,p2,p3)
|
#define glibtop_set_parameter(p1,p2,p3) glibtop_set_parameter_l(glibtop_global_server,p1,p2,p3)
|
||||||
@@ -53,6 +60,6 @@ int
|
|||||||
glibtop_set_parameter_l (glibtop *server, const unsigned parameter,
|
glibtop_set_parameter_l (glibtop *server, const unsigned parameter,
|
||||||
const void *data_ptr, size_t data_size);
|
const void *data_ptr, size_t data_size);
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_PPP_STATE 0
|
#define GLIBTOP_PPP_STATE 0
|
||||||
#define GLIBTOP_PPP_BYTES_IN 1
|
#define GLIBTOP_PPP_BYTES_IN 1
|
||||||
@@ -53,22 +53,20 @@ struct _glibtop_ppp
|
|||||||
bytes_out; /* GLIBTOP_PPP_BYTES_OUT */
|
bytes_out; /* GLIBTOP_PPP_BYTES_OUT */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_ppp(ppp,device) glibtop_get_ppp_l(glibtop_global_server, ppp, device)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PPP
|
#if GLIBTOP_SUID_PPP
|
||||||
#define glibtop_get_ppp_r glibtop_get_ppp_p
|
#define glibtop_get_ppp_r glibtop_get_ppp_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_ppp_r glibtop_get_ppp_s
|
#define glibtop_get_ppp_r glibtop_get_ppp_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_ppp_l (glibtop *server, glibtop_ppp *buf, unsigned short device);
|
int glibtop_get_ppp_l (glibtop_client *client, glibtop_ppp *buf, unsigned short device, unsigned short use_isdn);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PPP
|
#if GLIBTOP_SUID_PPP
|
||||||
int glibtop_init_ppp_p (glibtop *server);
|
int glibtop_init_ppp_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device);
|
int glibtop_get_ppp_p (glibtop_server *server, glibtop_closure *closure, glibtop_ppp *buf, unsigned short device, unsigned short use_isdn);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_ppp_s (glibtop *server);
|
int glibtop_init_ppp_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device);
|
int glibtop_get_ppp_s (glibtop_server *server, glibtop_closure *closure, glibtop_ppp *buf, unsigned short device, unsigned short use_isdn);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -82,6 +80,6 @@ extern const char *glibtop_descriptions_ppp [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -32,9 +32,7 @@
|
|||||||
#include <glibtop/compat_10.h>
|
#include <glibtop/compat_10.h>
|
||||||
#include <glibtop/array.h>
|
#include <glibtop/array.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define glibtop_get_proc_args(array,pid) glibtop_get_proc_args_l(glibtop_global_server, array, pid)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_ARGS
|
#if GLIBTOP_SUID_PROC_ARGS
|
||||||
#define glibtop_get_proc_args_r glibtop_get_proc_args_p
|
#define glibtop_get_proc_args_r glibtop_get_proc_args_p
|
||||||
@@ -43,18 +41,18 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
char **
|
char **
|
||||||
glibtop_get_proc_args_l (glibtop *server, glibtop_array *array, pid_t pid);
|
glibtop_get_proc_args_l (glibtop_client *client, glibtop_array *array, pid_t pid);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_ARGS
|
#if GLIBTOP_SUID_PROC_ARGS
|
||||||
int glibtop_init_proc_args_p (glibtop *server);
|
int glibtop_init_proc_args_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
|
|
||||||
char **
|
char **
|
||||||
glibtop_get_proc_args_p (glibtop *server, glibtop_array *array, pid_t pid);
|
glibtop_get_proc_args_p (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, pid_t pid);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_proc_args_s (glibtop *server);
|
int glibtop_init_proc_args_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
|
|
||||||
char **
|
char **
|
||||||
glibtop_get_proc_args_s (glibtop *server, glibtop_array *array, pid_t pid);
|
glibtop_get_proc_args_s (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, pid_t pid);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -68,6 +66,6 @@ extern const char *glibtop_descriptions_proc_args [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
81
include/glibtop/proccwd.h
Normal file
81
include/glibtop/proccwd.h
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, April 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GLIBTOP_PROCCWD_H__
|
||||||
|
#define __GLIBTOP_PROCCWD_H__
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
|
#include <glibtop/array.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define GLIBTOP_PROC_CWD_SIZE 0
|
||||||
|
#define GLIBTOP_PROC_CWD_DEVICE 1
|
||||||
|
#define GLIBTOP_PROC_CWD_INODE 2
|
||||||
|
|
||||||
|
#define GLIBTOP_MAX_PROC_CWD 3
|
||||||
|
|
||||||
|
typedef struct _glibtop_proc_cwd glibtop_proc_cwd;
|
||||||
|
|
||||||
|
/* Cwd stuff */
|
||||||
|
|
||||||
|
struct _glibtop_proc_cwd
|
||||||
|
{
|
||||||
|
u_int64_t flags,
|
||||||
|
size,
|
||||||
|
device,
|
||||||
|
inode;
|
||||||
|
};
|
||||||
|
|
||||||
|
#if GLIBTOP_SUID_PROC_CWD
|
||||||
|
#define glibtop_get_proc_cwd_r glibtop_get_proc_cwd_p
|
||||||
|
#else
|
||||||
|
#define glibtop_get_proc_cwd_r glibtop_get_proc_cwd_s
|
||||||
|
#endif
|
||||||
|
|
||||||
|
char *glibtop_get_proc_cwd_l (glibtop_client *client, glibtop_proc_cwd *buf, pid_t pid);
|
||||||
|
|
||||||
|
#if GLIBTOP_SUID_PROC_CWD
|
||||||
|
int glibtop_init_proc_cwd_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
|
char *glibtop_get_proc_cwd_p (glibtop_server *server, glibtop_closure *closure, glibtop_proc_cwd *buf, pid_t pid);
|
||||||
|
#else
|
||||||
|
int glibtop_init_proc_cwd_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
|
char *glibtop_get_proc_cwd_s (glibtop_server *server, glibtop_closure *closure, glibtop_proc_cwd *buf, pid_t pid);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GLIBTOP_NAMES
|
||||||
|
|
||||||
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
|
|
||||||
|
extern const char *glibtop_names_proc_cwd [];
|
||||||
|
extern const unsigned glibtop_types_proc_cwd [];
|
||||||
|
extern const char *glibtop_labels_proc_cwd [];
|
||||||
|
extern const char *glibtop_descriptions_proc_cwd [];
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_PROC_KERNEL_K_FLAGS 0
|
#define GLIBTOP_PROC_KERNEL_K_FLAGS 0
|
||||||
#define GLIBTOP_PROC_KERNEL_MIN_FLT 1
|
#define GLIBTOP_PROC_KERNEL_MIN_FLT 1
|
||||||
@@ -77,22 +77,20 @@ struct _glibtop_proc_kernel
|
|||||||
char wchan [40];
|
char wchan [40];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_kernel(p1, p2) glibtop_get_proc_kernel_l(glibtop_global_server, p1, p2)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_KERNEL
|
#if GLIBTOP_SUID_PROC_KERNEL
|
||||||
#define glibtop_get_proc_kernel_r glibtop_get_proc_kernel_p
|
#define glibtop_get_proc_kernel_r glibtop_get_proc_kernel_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_proc_kernel_r glibtop_get_proc_kernel_s
|
#define glibtop_get_proc_kernel_r glibtop_get_proc_kernel_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_proc_kernel_l (glibtop *server, glibtop_proc_kernel *buf, pid_t pid);
|
int glibtop_get_proc_kernel_l (glibtop_client *client, glibtop_proc_kernel *buf, pid_t pid);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_KERNEL
|
#if GLIBTOP_SUID_PROC_KERNEL
|
||||||
int glibtop_init_proc_kernel_p (glibtop *server);
|
int glibtop_init_proc_kernel_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_kernel_p (glibtop *server, glibtop_proc_kernel *buf, pid_t pid);
|
int glibtop_get_proc_kernel_p (glibtop_server *server, glibtop_closure *closure, glibtop_proc_kernel *buf, pid_t pid);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_proc_kernel_s (glibtop *server);
|
int glibtop_init_proc_kernel_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf, pid_t pid);
|
int glibtop_get_proc_kernel_s (glibtop_server *server, glibtop_closure *closure, glibtop_proc_kernel *buf, pid_t pid);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -106,6 +104,6 @@ extern const char *glibtop_descriptions_proc_kernel [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#include <glibtop/compat_10.h>
|
#include <glibtop/compat_10.h>
|
||||||
#include <glibtop/array.h>
|
#include <glibtop/array.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
/* You can use the folowing constants as the `which' member of
|
/* You can use the folowing constants as the `which' member of
|
||||||
* glibtop_get_proclist () to specify which processes to fetch. */
|
* glibtop_get_proclist () to specify which processes to fetch. */
|
||||||
@@ -52,8 +52,6 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#define GLIBTOP_EXCLUDE_SYSTEM 0x2000
|
#define GLIBTOP_EXCLUDE_SYSTEM 0x2000
|
||||||
#define GLIBTOP_EXCLUDE_NOTTY 0x4000
|
#define GLIBTOP_EXCLUDE_NOTTY 0x4000
|
||||||
|
|
||||||
#define glibtop_get_proclist(array,which,arg) glibtop_get_proclist_l(glibtop_global_server, array, which, arg)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROCLIST
|
#if GLIBTOP_SUID_PROCLIST
|
||||||
#define glibtop_get_proclist_r glibtop_get_proclist_p
|
#define glibtop_get_proclist_r glibtop_get_proclist_p
|
||||||
#else
|
#else
|
||||||
@@ -61,20 +59,20 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned *
|
unsigned *
|
||||||
glibtop_get_proclist_l (glibtop *server, glibtop_array *array,
|
glibtop_get_proclist_l (glibtop_client *client, glibtop_array *array,
|
||||||
int64_t which, int64_t arg);
|
int64_t which, int64_t arg);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROCLIST
|
#if GLIBTOP_SUID_PROCLIST
|
||||||
int glibtop_init_proclist_p (glibtop *server);
|
int glibtop_init_proclist_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
|
|
||||||
unsigned *
|
unsigned *
|
||||||
glibtop_get_proclist_p (glibtop *server, glibtop_array *array,
|
glibtop_get_proclist_p (glibtop_server *server, glibtop_closure *closure, glibtop_array *array,
|
||||||
int64_t which, int64_t arg);
|
int64_t which, int64_t arg);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_proclist_s (glibtop *server);
|
int glibtop_init_proclist_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
|
|
||||||
unsigned *
|
unsigned *
|
||||||
glibtop_get_proclist_s (glibtop *server, glibtop_array *array,
|
glibtop_get_proclist_s (glibtop_server *server, glibtop_closure *closure, glibtop_array *array,
|
||||||
int64_t which, int64_t arg);
|
int64_t which, int64_t arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -89,6 +87,6 @@ extern const char *glibtop_descriptions_proclist [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#include <glibtop/compat_10.h>
|
#include <glibtop/compat_10.h>
|
||||||
#include <glibtop/array.h>
|
#include <glibtop/array.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_MAP_ENTRY_START 1
|
#define GLIBTOP_MAP_ENTRY_START 1
|
||||||
#define GLIBTOP_MAP_ENTRY_END 2
|
#define GLIBTOP_MAP_ENTRY_END 2
|
||||||
@@ -60,8 +60,6 @@ struct _glibtop_map_entry
|
|||||||
char filename [GLIBTOP_MAP_FILENAME_LEN+1];
|
char filename [GLIBTOP_MAP_FILENAME_LEN+1];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_map(array,pid) glibtop_get_proc_map_l(glibtop_global_server, array, pid)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_MAP
|
#if GLIBTOP_SUID_PROC_MAP
|
||||||
#define glibtop_get_proc_map_r glibtop_get_proc_map_p
|
#define glibtop_get_proc_map_r glibtop_get_proc_map_p
|
||||||
#else
|
#else
|
||||||
@@ -69,18 +67,18 @@ struct _glibtop_map_entry
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
glibtop_map_entry *
|
glibtop_map_entry *
|
||||||
glibtop_get_proc_map_l (glibtop *server, glibtop_array *array, pid_t pid);
|
glibtop_get_proc_map_l (glibtop_client *client, glibtop_array *array, pid_t pid);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_MAP
|
#if GLIBTOP_SUID_PROC_MAP
|
||||||
int glibtop_init_proc_map_p (glibtop *server);
|
int glibtop_init_proc_map_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
|
|
||||||
glibtop_map_entry *
|
glibtop_map_entry *
|
||||||
glibtop_get_proc_map_p (glibtop *server, glibtop_array *array, pid_t pid);
|
glibtop_get_proc_map_p (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, pid_t pid);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_proc_map_s (glibtop *server);
|
int glibtop_init_proc_map_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
|
|
||||||
glibtop_map_entry *
|
glibtop_map_entry *
|
||||||
glibtop_get_proc_map_s (glibtop *server, glibtop_array *array, pid_t pid);
|
glibtop_get_proc_map_s (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, pid_t pid);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -94,6 +92,6 @@ extern const char *glibtop_descriptions_proc_map [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_PROC_MEM_SIZE 0
|
#define GLIBTOP_PROC_MEM_SIZE 0
|
||||||
#define GLIBTOP_PROC_MEM_VSIZE 1
|
#define GLIBTOP_PROC_MEM_VSIZE 1
|
||||||
@@ -57,22 +57,20 @@ struct _glibtop_proc_mem
|
|||||||
* of the process; usually 2,147,483,647 */
|
* of the process; usually 2,147,483,647 */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_mem(p1, p2) glibtop_get_proc_mem_l(glibtop_global_server, p1, p2)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_MEM
|
#if GLIBTOP_SUID_PROC_MEM
|
||||||
#define glibtop_get_proc_mem_r glibtop_get_proc_mem_p
|
#define glibtop_get_proc_mem_r glibtop_get_proc_mem_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_proc_mem_r glibtop_get_proc_mem_s
|
#define glibtop_get_proc_mem_r glibtop_get_proc_mem_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_proc_mem_l (glibtop *server, glibtop_proc_mem *buf, pid_t pid);
|
int glibtop_get_proc_mem_l (glibtop_client *client, glibtop_proc_mem *buf, pid_t pid);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_MEM
|
#if GLIBTOP_SUID_PROC_MEM
|
||||||
int glibtop_init_proc_mem_p (glibtop *server);
|
int glibtop_init_proc_mem_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf, pid_t pid);
|
int glibtop_get_proc_mem_p (glibtop_server *server, glibtop_closure *closure, glibtop_proc_mem *buf, pid_t pid);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_proc_mem_s (glibtop *server);
|
int glibtop_init_proc_mem_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf, pid_t pid);
|
int glibtop_get_proc_mem_s (glibtop_server *server, glibtop_closure *closure, glibtop_proc_mem *buf, pid_t pid);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -86,6 +84,6 @@ extern const char *glibtop_descriptions_proc_mem [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_PROC_SEGMENT_TEXT_RSS 0
|
#define GLIBTOP_PROC_SEGMENT_TEXT_RSS 0
|
||||||
#define GLIBTOP_PROC_SEGMENT_SHLIB_RSS 1
|
#define GLIBTOP_PROC_SEGMENT_SHLIB_RSS 1
|
||||||
@@ -77,22 +77,20 @@ struct _glibtop_proc_segment
|
|||||||
env_end;
|
env_end;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_segment(p1, p2) glibtop_get_proc_segment_l(glibtop_global_server, p1, p2)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_SEGMENT
|
#if GLIBTOP_SUID_PROC_SEGMENT
|
||||||
#define glibtop_get_proc_segment_r glibtop_get_proc_segment_p
|
#define glibtop_get_proc_segment_r glibtop_get_proc_segment_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_proc_segment_r glibtop_get_proc_segment_s
|
#define glibtop_get_proc_segment_r glibtop_get_proc_segment_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_proc_segment_l (glibtop *server, glibtop_proc_segment *buf, pid_t pid);
|
int glibtop_get_proc_segment_l (glibtop_client *client, glibtop_proc_segment *buf, pid_t pid);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_SEGMENT
|
#if GLIBTOP_SUID_PROC_SEGMENT
|
||||||
int glibtop_init_proc_segment_p (glibtop *server);
|
int glibtop_init_proc_segment_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf, pid_t pid);
|
int glibtop_get_proc_segment_p (glibtop_server *server, glibtop_closure *closure, glibtop_proc_segment *buf, pid_t pid);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_proc_segment_s (glibtop *server);
|
int glibtop_init_proc_segment_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf, pid_t pid);
|
int glibtop_get_proc_segment_s (glibtop_server *server, glibtop_closure *closure, glibtop_proc_segment *buf, pid_t pid);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -106,6 +104,6 @@ extern const char *glibtop_descriptions_proc_segment [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_PROC_SIGNAL_SIGNAL 0
|
#define GLIBTOP_PROC_SIGNAL_SIGNAL 0
|
||||||
#define GLIBTOP_PROC_SIGNAL_BLOCKED 1
|
#define GLIBTOP_PROC_SIGNAL_BLOCKED 1
|
||||||
@@ -51,22 +51,20 @@ struct _glibtop_proc_signal
|
|||||||
sigcatch [2]; /* mask of caught signals */
|
sigcatch [2]; /* mask of caught signals */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_signal(p1, p2) glibtop_get_proc_signal_l(glibtop_global_server, p1, p2)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_SIGNAL
|
#if GLIBTOP_SUID_PROC_SIGNAL
|
||||||
#define glibtop_get_proc_signal_r glibtop_get_proc_signal_p
|
#define glibtop_get_proc_signal_r glibtop_get_proc_signal_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_proc_signal_r glibtop_get_proc_signal_s
|
#define glibtop_get_proc_signal_r glibtop_get_proc_signal_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_proc_signal_l (glibtop *server, glibtop_proc_signal *buf, pid_t pid);
|
int glibtop_get_proc_signal_l (glibtop_client *client, glibtop_proc_signal *buf, pid_t pid);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_SIGNAL
|
#if GLIBTOP_SUID_PROC_SIGNAL
|
||||||
int glibtop_init_proc_signal_p (glibtop *server);
|
int glibtop_init_proc_signal_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_signal_p (glibtop *server, glibtop_proc_signal *buf, pid_t pid);
|
int glibtop_get_proc_signal_p (glibtop_server *server, glibtop_closure *closure, glibtop_proc_signal *buf, pid_t pid);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_proc_signal_s (glibtop *server);
|
int glibtop_init_proc_signal_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf, pid_t pid);
|
int glibtop_get_proc_signal_s (glibtop_server *server, glibtop_closure *closure, glibtop_proc_signal *buf, pid_t pid);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -80,6 +78,6 @@ extern const char *glibtop_descriptions_proc_signal [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_PROC_STATE_CMD 0
|
#define GLIBTOP_PROC_STATE_CMD 0
|
||||||
#define GLIBTOP_PROC_STATE_STATE 1
|
#define GLIBTOP_PROC_STATE_STATE 1
|
||||||
@@ -77,22 +77,20 @@ struct _glibtop_proc_state
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_state(p1, p2) glibtop_get_proc_state_l(glibtop_global_server, p1, p2)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_STATE
|
#if GLIBTOP_SUID_PROC_STATE
|
||||||
#define glibtop_get_proc_state_r glibtop_get_proc_state_p
|
#define glibtop_get_proc_state_r glibtop_get_proc_state_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_proc_state_r glibtop_get_proc_state_s
|
#define glibtop_get_proc_state_r glibtop_get_proc_state_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_proc_state_l (glibtop *server, glibtop_proc_state *buf, pid_t pid);
|
int glibtop_get_proc_state_l (glibtop_client *client, glibtop_proc_state *buf, pid_t pid);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_STATE
|
#if GLIBTOP_SUID_PROC_STATE
|
||||||
int glibtop_init_proc_state_p (glibtop *server);
|
int glibtop_init_proc_state_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf, pid_t pid);
|
int glibtop_get_proc_state_p (glibtop_server *server, glibtop_closure *closure, glibtop_proc_state *buf, pid_t pid);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_proc_state_s (glibtop *server);
|
int glibtop_init_proc_state_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid);
|
int glibtop_get_proc_state_s (glibtop_server *server, glibtop_closure *closure, glibtop_proc_state *buf, pid_t pid);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -106,6 +104,6 @@ extern const char *glibtop_descriptions_proc_state [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include <glibtop/cpu.h>
|
#include <glibtop/cpu.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_PROC_TIME_START_TIME 0
|
#define GLIBTOP_PROC_TIME_START_TIME 0
|
||||||
#define GLIBTOP_PROC_TIME_RTIME 1
|
#define GLIBTOP_PROC_TIME_RTIME 1
|
||||||
@@ -74,22 +74,20 @@ struct _glibtop_proc_time
|
|||||||
xcpu_flags;
|
xcpu_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_time(p1, p2) glibtop_get_proc_time_l(glibtop_global_server, p1, p2)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_TIME
|
#if GLIBTOP_SUID_PROC_TIME
|
||||||
#define glibtop_get_proc_time_r glibtop_get_proc_time_p
|
#define glibtop_get_proc_time_r glibtop_get_proc_time_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_proc_time_r glibtop_get_proc_time_s
|
#define glibtop_get_proc_time_r glibtop_get_proc_time_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_proc_time_l (glibtop *server, glibtop_proc_time *buf, pid_t pid);
|
int glibtop_get_proc_time_l (glibtop_client *client, glibtop_proc_time *buf, pid_t pid);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_TIME
|
#if GLIBTOP_SUID_PROC_TIME
|
||||||
int glibtop_init_proc_time_p (glibtop *server);
|
int glibtop_init_proc_time_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf, pid_t pid);
|
int glibtop_get_proc_time_p (glibtop_server *server, glibtop_closure *closure, glibtop_proc_time *buf, pid_t pid);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_proc_time_s (glibtop *server);
|
int glibtop_init_proc_time_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, pid_t pid);
|
int glibtop_get_proc_time_s (glibtop_server *server, glibtop_closure *closure, glibtop_proc_time *buf, pid_t pid);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -103,6 +101,6 @@ extern const char *glibtop_descriptions_proc_time [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_PROC_UID_UID 0
|
#define GLIBTOP_PROC_UID_UID 0
|
||||||
#define GLIBTOP_PROC_UID_EUID 1
|
#define GLIBTOP_PROC_UID_EUID 1
|
||||||
@@ -79,22 +79,20 @@ struct _glibtop_proc_uid
|
|||||||
groups [GLIBTOP_MAX_GROUPS]; /* additional prcess groups */
|
groups [GLIBTOP_MAX_GROUPS]; /* additional prcess groups */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_proc_uid(p1, p2) glibtop_get_proc_uid_l(glibtop_global_server, p1, p2)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_UID
|
#if GLIBTOP_SUID_PROC_UID
|
||||||
#define glibtop_get_proc_uid_r glibtop_get_proc_uid_p
|
#define glibtop_get_proc_uid_r glibtop_get_proc_uid_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_proc_uid_r glibtop_get_proc_uid_s
|
#define glibtop_get_proc_uid_r glibtop_get_proc_uid_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_proc_uid_l (glibtop *server, glibtop_proc_uid *buf, pid_t pid);
|
int glibtop_get_proc_uid_l (glibtop_client *client, glibtop_proc_uid *buf, pid_t pid);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_PROC_UID
|
#if GLIBTOP_SUID_PROC_UID
|
||||||
int glibtop_init_proc_uid_p (glibtop *server);
|
int glibtop_init_proc_uid_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf, pid_t pid);
|
int glibtop_get_proc_uid_p (glibtop_server *server, glibtop_closure *closure, glibtop_proc_uid *buf, pid_t pid);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_proc_uid_s (glibtop *server);
|
int glibtop_init_proc_uid_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, pid_t pid);
|
int glibtop_get_proc_uid_s (glibtop_server *server, glibtop_closure *closure, glibtop_proc_uid *buf, pid_t pid);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -108,6 +106,6 @@ extern const char *glibtop_descriptions_proc_uid [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_SEM_LIMITS_SEMMAP 0
|
#define GLIBTOP_SEM_LIMITS_SEMMAP 0
|
||||||
#define GLIBTOP_SEM_LIMITS_SEMMNI 1
|
#define GLIBTOP_SEM_LIMITS_SEMMNI 1
|
||||||
@@ -61,22 +61,20 @@ struct _glibtop_sem_limits
|
|||||||
semaem; /* GLIBTOP_SEM_LIMITS_SEMAEM */
|
semaem; /* GLIBTOP_SEM_LIMITS_SEMAEM */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_sem_limits(sem) glibtop_get_sem_limits_l(glibtop_global_server, sem)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_SEM_LIMITS
|
#if GLIBTOP_SUID_SEM_LIMITS
|
||||||
#define glibtop_get_sem_limits_r glibtop_get_sem_limits_p
|
#define glibtop_get_sem_limits_r glibtop_get_sem_limits_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_sem_limits_r glibtop_get_sem_limits_s
|
#define glibtop_get_sem_limits_r glibtop_get_sem_limits_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_sem_limits_l (glibtop *server, glibtop_sem_limits *buf);
|
int glibtop_get_sem_limits_l (glibtop_client *client, glibtop_sem_limits *buf);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_SEM_LIMITS
|
#if GLIBTOP_SUID_SEM_LIMITS
|
||||||
int glibtop_init_sem_limits_p (glibtop *server);
|
int glibtop_init_sem_limits_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf);
|
int glibtop_get_sem_limits_p (glibtop_server *server, glibtop_closure *closure, glibtop_sem_limits *buf);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_sem_limits_s (glibtop *server);
|
int glibtop_init_sem_limits_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf);
|
int glibtop_get_sem_limits_s (glibtop_server *server, glibtop_closure *closure, glibtop_sem_limits *buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -90,6 +88,6 @@ extern const char *glibtop_descriptions_sem_limits [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_SHM_LIMITS_SHMMAX 0
|
#define GLIBTOP_SHM_LIMITS_SHMMAX 0
|
||||||
#define GLIBTOP_SHM_LIMITS_SHMMIN 1
|
#define GLIBTOP_SHM_LIMITS_SHMMIN 1
|
||||||
@@ -51,22 +51,20 @@ struct _glibtop_shm_limits
|
|||||||
shmall; /* GLIBTOP_SHM_LIMITS_SHMALL */
|
shmall; /* GLIBTOP_SHM_LIMITS_SHMALL */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_shm_limits(shm) glibtop_get_shm_limits_l(glibtop_global_server, shm)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_SHM_LIMITS
|
#if GLIBTOP_SUID_SHM_LIMITS
|
||||||
#define glibtop_get_shm_limits_r glibtop_get_shm_limits_p
|
#define glibtop_get_shm_limits_r glibtop_get_shm_limits_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_shm_limits_r glibtop_get_shm_limits_s
|
#define glibtop_get_shm_limits_r glibtop_get_shm_limits_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_shm_limits_l (glibtop *server, glibtop_shm_limits *buf);
|
int glibtop_get_shm_limits_l (glibtop_client *client, glibtop_shm_limits *buf);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_SHM_LIMITS
|
#if GLIBTOP_SUID_SHM_LIMITS
|
||||||
int glibtop_init_shm_limits_p (glibtop *server);
|
int glibtop_init_shm_limits_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_shm_limits_p (glibtop *, glibtop_shm_limits *buf);
|
int glibtop_get_shm_limits_p (glibtop_server *, glibtop_shm_limits *buf);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_shm_limits_s (glibtop *server);
|
int glibtop_init_shm_limits_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf);
|
int glibtop_get_shm_limits_s (glibtop_server *server, glibtop_closure *closure, glibtop_shm_limits *buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -80,6 +78,6 @@ extern const char *glibtop_descriptions_shm_limits [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#include <sys/signal.h>
|
#include <sys/signal.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef struct _glibtop_signame glibtop_signame;
|
typedef struct _glibtop_signame glibtop_signame;
|
||||||
|
|
||||||
@@ -44,6 +44,6 @@ struct _glibtop_signame
|
|||||||
|
|
||||||
extern const glibtop_signame glibtop_sys_siglist [];
|
extern const glibtop_signame glibtop_sys_siglist [];
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_SWAP_TOTAL 0
|
#define GLIBTOP_SWAP_TOTAL 0
|
||||||
#define GLIBTOP_SWAP_USED 1
|
#define GLIBTOP_SWAP_USED 1
|
||||||
@@ -51,22 +51,20 @@ struct _glibtop_swap
|
|||||||
pageout; /* GLIBTOP_SWAP_PAGEOUT */
|
pageout; /* GLIBTOP_SWAP_PAGEOUT */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_swap(swap) glibtop_get_swap_l(glibtop_global_server, swap)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_SWAP
|
#if GLIBTOP_SUID_SWAP
|
||||||
#define glibtop_get_swap_r glibtop_get_swap_p
|
#define glibtop_get_swap_r glibtop_get_swap_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_swap_r glibtop_get_swap_s
|
#define glibtop_get_swap_r glibtop_get_swap_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_swap_l (glibtop *server, glibtop_swap *buf);
|
int glibtop_get_swap_l (glibtop_client *client, glibtop_swap *buf);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_SWAP
|
#if GLIBTOP_SUID_SWAP
|
||||||
int glibtop_init_swap_p (glibtop *server);
|
int glibtop_init_swap_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_swap_p (glibtop *server, glibtop_swap *buf);
|
int glibtop_get_swap_p (glibtop_server *server, glibtop_closure *closure, glibtop_swap *buf);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_swap_s (glibtop *server);
|
int glibtop_init_swap_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_swap_s (glibtop *server, glibtop_swap *buf);
|
int glibtop_get_swap_s (glibtop_server *server, glibtop_closure *closure, glibtop_swap *buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -80,6 +78,6 @@ extern const char *glibtop_descriptions_swap [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_SYSDEPS_CPU 0
|
#define GLIBTOP_SYSDEPS_CPU 0
|
||||||
#define GLIBTOP_SYSDEPS_MEM 1
|
#define GLIBTOP_SYSDEPS_MEM 1
|
||||||
@@ -46,23 +46,20 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#define GLIBTOP_SYSDEPS_PROC_SIGNAL 13
|
#define GLIBTOP_SYSDEPS_PROC_SIGNAL 13
|
||||||
#define GLIBTOP_SYSDEPS_PROC_KERNEL 14
|
#define GLIBTOP_SYSDEPS_PROC_KERNEL 14
|
||||||
#define GLIBTOP_SYSDEPS_PROC_SEGMENT 15
|
#define GLIBTOP_SYSDEPS_PROC_SEGMENT 15
|
||||||
#define GLIBTOP_SYSDEPS_PROC_ARGS 16
|
#define GLIBTOP_SYSDEPS_PROC_CWD 16
|
||||||
#define GLIBTOP_SYSDEPS_PROC_MAP 17
|
#define GLIBTOP_SYSDEPS_PROC_ARGS 17
|
||||||
#define GLIBTOP_SYSDEPS_MOUNTLIST 18
|
#define GLIBTOP_SYSDEPS_PROC_MAP 18
|
||||||
#define GLIBTOP_SYSDEPS_FSUSAGE 19
|
#define GLIBTOP_SYSDEPS_MOUNTLIST 19
|
||||||
#define GLIBTOP_SYSDEPS_INTERFACE_NAMES 20
|
#define GLIBTOP_SYSDEPS_FSUSAGE 20
|
||||||
#define GLIBTOP_SYSDEPS_NETINFO 21
|
#define GLIBTOP_SYSDEPS_INTERFACE_NAMES 21
|
||||||
#define GLIBTOP_SYSDEPS_NETLOAD 22
|
#define GLIBTOP_SYSDEPS_NETINFO 22
|
||||||
#define GLIBTOP_SYSDEPS_PPP 23
|
#define GLIBTOP_SYSDEPS_NETLOAD 23
|
||||||
|
#define GLIBTOP_SYSDEPS_PPP 24
|
||||||
|
|
||||||
#define GLIBTOP_MAX_SYSDEPS 26
|
#define GLIBTOP_MAX_SYSDEPS 27
|
||||||
|
|
||||||
#define GLIBTOP_SYSDEPS_ALL ((1 << GLIBTOP_MAX_SYSDEPS) - 1)
|
#define GLIBTOP_SYSDEPS_ALL ((1 << GLIBTOP_MAX_SYSDEPS) - 1)
|
||||||
|
|
||||||
typedef int (*glibtop_init_func_t) (glibtop *);
|
|
||||||
extern glibtop_init_func_t _glibtop_init_hook_s [];
|
|
||||||
extern glibtop_init_func_t _glibtop_init_hook_p [];
|
|
||||||
|
|
||||||
typedef struct _glibtop_sysdeps glibtop_sysdeps;
|
typedef struct _glibtop_sysdeps glibtop_sysdeps;
|
||||||
|
|
||||||
struct _glibtop_sysdeps
|
struct _glibtop_sysdeps
|
||||||
@@ -86,6 +83,7 @@ struct _glibtop_sysdeps
|
|||||||
proc_signal, /* glibtop_proc_signal */
|
proc_signal, /* glibtop_proc_signal */
|
||||||
proc_kernel, /* glibtop_proc_kernel */
|
proc_kernel, /* glibtop_proc_kernel */
|
||||||
proc_segment, /* glibtop_proc_segment */
|
proc_segment, /* glibtop_proc_segment */
|
||||||
|
proc_cwd, /* glibtop_proc_cwd */
|
||||||
proc_args, /* glibtop_proc_args */
|
proc_args, /* glibtop_proc_args */
|
||||||
proc_map, /* glibtop_proc_map */
|
proc_map, /* glibtop_proc_map */
|
||||||
mountlist, /* glibtop_mountlist */
|
mountlist, /* glibtop_mountlist */
|
||||||
@@ -96,10 +94,6 @@ struct _glibtop_sysdeps
|
|||||||
ppp; /* glibtop_ppp */
|
ppp; /* glibtop_ppp */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_sysdeps(sysdeps) glibtop_get_sysdeps_r(glibtop_global_server,sysdeps)
|
|
||||||
|
|
||||||
void glibtop_get_sysdeps_r (glibtop *server, glibtop_sysdeps *buf);
|
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
|
|
||||||
/* You need to link with -lgtop_names to get this stuff here. */
|
/* You need to link with -lgtop_names to get this stuff here. */
|
||||||
@@ -111,6 +105,6 @@ extern const char *glibtop_descriptions_sysdeps [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_SYSINFO_CPUINFO 0
|
#define GLIBTOP_SYSINFO_CPUINFO 0
|
||||||
|
|
||||||
@@ -55,12 +55,10 @@ struct _glibtop_sysinfo
|
|||||||
glibtop_entry cpuinfo [GLIBTOP_NCPU];
|
glibtop_entry cpuinfo [GLIBTOP_NCPU];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_sysinfo() glibtop_get_sysinfo_s(glibtop_global_server)
|
|
||||||
|
|
||||||
#define glibtop_get_sysinfo_r glibtop_get_sysinfo_s
|
#define glibtop_get_sysinfo_r glibtop_get_sysinfo_s
|
||||||
|
|
||||||
glibtop_sysinfo *glibtop_get_sysinfo_s (glibtop *server);
|
glibtop_sysinfo *glibtop_get_sysinfo_s (glibtop_server *server);
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
#ifndef __GLIBTOP_TYPES_H__
|
#ifndef __GLIBTOP_TYPES_H__
|
||||||
#define __GLIBTOP_TYPES_H__
|
#define __GLIBTOP_TYPES_H__
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_TYPE_LONG 1
|
#define GLIBTOP_TYPE_LONG 1
|
||||||
#define GLIBTOP_TYPE_ULONG 2
|
#define GLIBTOP_TYPE_ULONG 2
|
||||||
@@ -36,6 +36,6 @@ BEGIN_LIBGTOP_DECLS
|
|||||||
#define GLIBTOP_TYPE_CHAR 6
|
#define GLIBTOP_TYPE_CHAR 6
|
||||||
#define GLIBTOP_TYPE_STRING 7
|
#define GLIBTOP_TYPE_STRING 7
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -46,6 +46,8 @@
|
|||||||
#include <glibtop/procargs.h>
|
#include <glibtop/procargs.h>
|
||||||
#include <glibtop/procmap.h>
|
#include <glibtop/procmap.h>
|
||||||
|
|
||||||
|
#include <glibtop/proccwd.h>
|
||||||
|
|
||||||
#include <glibtop/mountlist.h>
|
#include <glibtop/mountlist.h>
|
||||||
#include <glibtop/fsusage.h>
|
#include <glibtop/fsusage.h>
|
||||||
|
|
||||||
@@ -54,7 +56,7 @@
|
|||||||
#include <glibtop/interfaces.h>
|
#include <glibtop/interfaces.h>
|
||||||
#include <glibtop/ppp.h>
|
#include <glibtop/ppp.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef union _glibtop_union glibtop_union;
|
typedef union _glibtop_union glibtop_union;
|
||||||
|
|
||||||
@@ -76,6 +78,7 @@ union _glibtop_union
|
|||||||
glibtop_proc_signal proc_signal;
|
glibtop_proc_signal proc_signal;
|
||||||
glibtop_proc_kernel proc_kernel;
|
glibtop_proc_kernel proc_kernel;
|
||||||
glibtop_proc_segment proc_segment;
|
glibtop_proc_segment proc_segment;
|
||||||
|
glibtop_proc_cwd proc_cwd;
|
||||||
glibtop_array proc_args;
|
glibtop_array proc_args;
|
||||||
glibtop_array proc_map;
|
glibtop_array proc_map;
|
||||||
glibtop_array mountlist;
|
glibtop_array mountlist;
|
||||||
@@ -86,6 +89,6 @@ union _glibtop_union
|
|||||||
glibtop_ppp ppp;
|
glibtop_ppp ppp;
|
||||||
};
|
};
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GLIBTOP_UPTIME_UPTIME 0
|
#define GLIBTOP_UPTIME_UPTIME 0
|
||||||
#define GLIBTOP_UPTIME_IDLETIME 1
|
#define GLIBTOP_UPTIME_IDLETIME 1
|
||||||
@@ -47,22 +47,20 @@ struct _glibtop_uptime
|
|||||||
u_int64_t boot_time; /* GLIBTOP_UPTIME_BOOT_TIME */
|
u_int64_t boot_time; /* GLIBTOP_UPTIME_BOOT_TIME */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_uptime(uptime) glibtop_get_uptime_l(glibtop_global_server, uptime)
|
|
||||||
|
|
||||||
#if GLIBTOP_SUID_UPTIME
|
#if GLIBTOP_SUID_UPTIME
|
||||||
#define glibtop_get_uptime_r glibtop_get_uptime_p
|
#define glibtop_get_uptime_r glibtop_get_uptime_p
|
||||||
#else
|
#else
|
||||||
#define glibtop_get_uptime_r glibtop_get_uptime_s
|
#define glibtop_get_uptime_r glibtop_get_uptime_s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glibtop_get_uptime_l (glibtop *server, glibtop_uptime *buf);
|
int glibtop_get_uptime_l (glibtop_client *client, glibtop_uptime *buf);
|
||||||
|
|
||||||
#if GLIBTOP_SUID_UPTIME
|
#if GLIBTOP_SUID_UPTIME
|
||||||
int glibtop_init_uptime_p (glibtop *server);
|
int glibtop_init_uptime_p (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf);
|
int glibtop_get_uptime_p (glibtop_server *server, glibtop_closure *closure, glibtop_uptime *buf);
|
||||||
#else
|
#else
|
||||||
int glibtop_init_uptime_s (glibtop *server);
|
int glibtop_init_uptime_s (glibtop_server *server, glibtop_closure *closure);
|
||||||
int glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf);
|
int glibtop_get_uptime_s (glibtop_server *server, glibtop_closure *closure, glibtop_uptime *buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLIBTOP_NAMES
|
#ifdef GLIBTOP_NAMES
|
||||||
@@ -76,6 +74,6 @@ extern const char *glibtop_descriptions_uptime [];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,20 +29,14 @@
|
|||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/error.h>
|
#include <glibtop/error.h>
|
||||||
|
|
||||||
BEGIN_LIBGTOP_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define glibtop_malloc(p1) glibtop_malloc_r(glibtop_global_server, p1)
|
void *glibtop_malloc_r (glibtop_server *server, size_t size);
|
||||||
#define glibtop_calloc(p1, p2) glibtop_calloc_r(glibtop_global_server, p1, p2)
|
void *glibtop_calloc_r (glibtop_server *server, size_t nmemb, size_t size);
|
||||||
#define glibtop_realloc(p1, p2) glibtop_realloc_r(glibtop_global_server, p1, p2)
|
void *glibtop_realloc_r (glibtop_server *server, void *ptr, size_t size);
|
||||||
#define glibtop_strdup(p1) glibtop_strdup_r(glibtop_global_server, p1)
|
char *glibtop_strdup_r (glibtop_server *server, const char *string);
|
||||||
#define glibtop_free(p1) glibtop_free_r(glibtop_global_server, p1)
|
void glibtop_free_r (glibtop_server *server, void *ptr);
|
||||||
|
|
||||||
void *glibtop_malloc_r (glibtop *server, size_t size);
|
G_END_DECLS
|
||||||
void *glibtop_calloc_r (glibtop *server, size_t nmemb, size_t size);
|
|
||||||
void *glibtop_realloc_r (glibtop *server, void *ptr, size_t size);
|
|
||||||
char *glibtop_strdup_r (glibtop *server, const char *string);
|
|
||||||
void glibtop_free_r (glibtop *server, const void *ptr);
|
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -7,3 +7,5 @@ libgtop.la
|
|||||||
lib.c
|
lib.c
|
||||||
structures.h
|
structures.h
|
||||||
sysdeps-init.c
|
sysdeps-init.c
|
||||||
|
libgtop_server.la
|
||||||
|
test-backends
|
||||||
|
@@ -1,22 +1,42 @@
|
|||||||
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||||
|
|
||||||
INCLUDES = @INCLUDES@
|
if INODEDB
|
||||||
|
inodedb_SRCLIST = inodedb.c
|
||||||
|
inodedb_DEFS = -DSYSTEM_INODEDB=\"$(prefix)/var/libgtop/inodedb.db\"
|
||||||
|
else
|
||||||
|
inodedb_SRCLIST =
|
||||||
|
inodedb_DEFS =
|
||||||
|
endif
|
||||||
|
|
||||||
|
INCLUDES = @INCLUDES@ $(inodedb_DEFS)
|
||||||
|
|
||||||
|
noinst_PROGRAMS = test-backends
|
||||||
|
|
||||||
lib_LTLIBRARIES = libgtop.la
|
lib_LTLIBRARIES = libgtop.la
|
||||||
|
|
||||||
libgtop_la_SOURCES = init.c open.c close.c lib.c parameter.c \
|
noinst_LTLIBRARIES = libgtop_server.la
|
||||||
sysdeps.c errors.c glib-arrays.c \
|
|
||||||
backend.c init-backends.c open-backend.c \
|
libgtop_la_SOURCES = errors.c glibtop-backend-info.c \
|
||||||
sysdeps-init.c
|
glibtop-client.c glibtop-server.c \
|
||||||
|
glibtop-backend.c glibtop-client-private.h \
|
||||||
|
glibtop-server-private.h xmalloc.c error.c \
|
||||||
|
$(inodedb_SRCLIST) $(BUILT_SOURCES)
|
||||||
|
|
||||||
|
libgtop_server_la_SOURCES = error.c xmalloc.c
|
||||||
|
|
||||||
libgtop_la_LDFLAGS = $(LT_VERSION_INFO)
|
libgtop_la_LDFLAGS = $(LT_VERSION_INFO)
|
||||||
libgtop_la_LIBADD = $(LIBGTOP_XML_LIB)
|
libgtop_la_LIBADD = $(GLIB_LIBS) $(XML_LIBS)
|
||||||
|
|
||||||
|
test_backends_SOURCES = \
|
||||||
|
test-backends.c
|
||||||
|
|
||||||
|
test_backends_LDADD = libgtop.la
|
||||||
|
|
||||||
glibtopdir = $(includedir)/glibtop
|
glibtopdir = $(includedir)/glibtop
|
||||||
|
|
||||||
glibtop_HEADERS = structures.h
|
glibtop_HEADERS = structures.h
|
||||||
|
|
||||||
BUILT_SOURCES = lib.c structures.h sysdeps-init.c
|
BUILT_SOURCES = lib.c structures.h
|
||||||
|
|
||||||
lib.c: lib.pl $(top_builddir)/config.h $(top_srcdir)/features.def $(top_srcdir)/scripts/c_types.pl
|
lib.c: lib.pl $(top_builddir)/config.h $(top_srcdir)/features.def $(top_srcdir)/scripts/c_types.pl
|
||||||
$(PERL) -I $(top_srcdir)/scripts $(srcdir)/lib.pl < $(top_srcdir)/features.def > lib-t
|
$(PERL) -I $(top_srcdir)/scripts $(srcdir)/lib.pl < $(top_srcdir)/features.def > lib-t
|
||||||
@@ -29,17 +49,7 @@ structures.h: structures.pl $(top_builddir)/config.h \
|
|||||||
structures.h > tmp-s
|
structures.h > tmp-s
|
||||||
mv tmp-s structures.h
|
mv tmp-s structures.h
|
||||||
|
|
||||||
sysdeps-init.c:
|
|
||||||
rm -f sysdeps-init.c
|
|
||||||
cp $(srcdir)/@sysdeps_init_file@ sysdeps-init.c
|
|
||||||
|
|
||||||
CLEANFILES = $(BUILT_SOURCES)
|
CLEANFILES = $(BUILT_SOURCES)
|
||||||
|
|
||||||
EXTRA_DIST = lib.pl structures.pl \
|
EXTRA_DIST = lib.pl structures.pl
|
||||||
sysdeps-init-freebsd.c \
|
|
||||||
sysdeps-init-kernel.c \
|
|
||||||
sysdeps-init-linux.c \
|
|
||||||
sysdeps-init-solaris.c \
|
|
||||||
sysdeps-init-stub-suid.c \
|
|
||||||
sysdeps-init-stub.c
|
|
||||||
|
|
||||||
|
@@ -1,93 +0,0 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
||||||
|
|
||||||
/* $Id$ */
|
|
||||||
|
|
||||||
/* Copyright (C) 1998-99 Martin Baulig
|
|
||||||
This file is part of LibGTop 1.0.
|
|
||||||
|
|
||||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 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/global.h>
|
|
||||||
#include <glibtop/xmalloc.h>
|
|
||||||
|
|
||||||
#include <glibtop/backend.h>
|
|
||||||
|
|
||||||
static GHashTable *_glibtop_backend_list = NULL;
|
|
||||||
static long _glibtop_backend_nr = 0;
|
|
||||||
|
|
||||||
long
|
|
||||||
glibtop_register_backend (glibtop_backend_entry *entry)
|
|
||||||
{
|
|
||||||
long id;
|
|
||||||
|
|
||||||
if (!_glibtop_backend_list)
|
|
||||||
_glibtop_backend_list = g_hash_table_new (NULL, NULL);
|
|
||||||
|
|
||||||
id = ++_glibtop_backend_nr;
|
|
||||||
|
|
||||||
g_hash_table_insert (_glibtop_backend_list,
|
|
||||||
GINT_TO_POINTER (id),
|
|
||||||
entry);
|
|
||||||
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
glibtop_unregister_backend (long id)
|
|
||||||
{
|
|
||||||
g_hash_table_remove (_glibtop_backend_list,
|
|
||||||
GINT_TO_POINTER (id));
|
|
||||||
}
|
|
||||||
|
|
||||||
glibtop_backend_entry *
|
|
||||||
glibtop_backend_by_id (long id)
|
|
||||||
{
|
|
||||||
return g_hash_table_lookup (_glibtop_backend_list,
|
|
||||||
GINT_TO_POINTER (id));
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
const char *backend_name;
|
|
||||||
glibtop_backend_entry *entry;
|
|
||||||
} _find_by_name_param_t;
|
|
||||||
|
|
||||||
static void
|
|
||||||
find_by_name (gpointer key, gpointer value, gpointer user_data)
|
|
||||||
{
|
|
||||||
_find_by_name_param_t *param = (_find_by_name_param_t *) user_data;
|
|
||||||
glibtop_backend_entry *entry = (glibtop_backend_entry *) value;
|
|
||||||
|
|
||||||
if (!entry || !entry->name || param->entry)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!strcmp (entry->name, param->backend_name))
|
|
||||||
param->entry = entry;
|
|
||||||
}
|
|
||||||
|
|
||||||
glibtop_backend_entry *
|
|
||||||
glibtop_backend_by_name (const char *backend_name)
|
|
||||||
{
|
|
||||||
_find_by_name_param_t param = { backend_name, NULL };
|
|
||||||
|
|
||||||
g_hash_table_foreach (_glibtop_backend_list,
|
|
||||||
find_by_name, ¶m);
|
|
||||||
|
|
||||||
return param.entry;
|
|
||||||
}
|
|
@@ -30,7 +30,7 @@
|
|||||||
/* Prints error message and exits. */
|
/* Prints error message and exits. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_server_name (glibtop *server)
|
print_server_name (glibtop_server *server)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s: ", server ?
|
fprintf (stderr, "%s: ", server ?
|
||||||
(server->name ? server->name : DEFAULT_NAME)
|
(server->name ? server->name : DEFAULT_NAME)
|
||||||
@@ -38,7 +38,7 @@ print_server_name (glibtop *server)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_error_vr (glibtop *server, char *format, va_list args)
|
glibtop_error_vr (glibtop_server *server, char *format, va_list args)
|
||||||
{
|
{
|
||||||
print_server_name (server);
|
print_server_name (server);
|
||||||
vfprintf (stderr, format, args);
|
vfprintf (stderr, format, args);
|
||||||
@@ -52,7 +52,7 @@ glibtop_error_vr (glibtop *server, char *format, va_list args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_error_io_vr (glibtop *server, char *format, int error, va_list args)
|
glibtop_error_io_vr (glibtop_server *server, char *format, int error, va_list args)
|
||||||
{
|
{
|
||||||
print_server_name (server);
|
print_server_name (server);
|
||||||
vfprintf (stderr, format, args);
|
vfprintf (stderr, format, args);
|
||||||
@@ -66,7 +66,7 @@ glibtop_error_io_vr (glibtop *server, char *format, int error, va_list args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_warn_vr (glibtop *server, char *format, va_list args)
|
glibtop_warn_vr (glibtop_server *server, char *format, va_list args)
|
||||||
{
|
{
|
||||||
print_server_name (server);
|
print_server_name (server);
|
||||||
vfprintf (stderr, format, args);
|
vfprintf (stderr, format, args);
|
||||||
@@ -78,7 +78,7 @@ glibtop_warn_vr (glibtop *server, char *format, va_list args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_warn_io_vr (glibtop *server, char *format, int error, va_list args)
|
glibtop_warn_io_vr (glibtop_server *server, char *format, int error, va_list args)
|
||||||
{
|
{
|
||||||
print_server_name (server);
|
print_server_name (server);
|
||||||
vfprintf (stderr, format, args);
|
vfprintf (stderr, format, args);
|
||||||
@@ -88,3 +88,83 @@ glibtop_warn_io_vr (glibtop *server, char *format, int error, va_list args)
|
|||||||
abort ();
|
abort ();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_error_r (glibtop_server *server, char *format, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start (args, format);
|
||||||
|
glibtop_error_vr (server, format, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_warn_r (glibtop_server *server, char *format, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start (args, format);
|
||||||
|
glibtop_warn_vr (server, format, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_error_io_r (glibtop_server *server, char *format, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start (args, format);
|
||||||
|
glibtop_error_io_vr (server, format, errno, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_warn_io_r (glibtop_server *server, char *format, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start (args, format);
|
||||||
|
glibtop_warn_io_vr (server, format, errno, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef __GNUC__
|
||||||
|
|
||||||
|
static void
|
||||||
|
glibtop_error (char *format, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start (args, format);
|
||||||
|
glibtop_error_vr (glibtop_global_server, format, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glibtop_warn (char *format, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start (args, format);
|
||||||
|
glibtop_warn_vr (glibtop_global_server, format, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glibtop_error_io (char *format, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start (args, format);
|
||||||
|
glibtop_error_io_vr (glibtop_global_server, format, errno, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glibtop_warn_io (char *format, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start (args, format);
|
||||||
|
glibtop_warn_io_vr (glibtop_global_server, format, errno, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* no __GNUC__ */
|
146
lib/errors.c
146
lib/errors.c
@@ -25,42 +25,132 @@
|
|||||||
|
|
||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
#include <glibtop/xmalloc.h>
|
#include <glibtop/errors.h>
|
||||||
|
|
||||||
const char *glibtop_error_strings[GLIBTOP_MAX_ERROR] = {
|
/* Error quark */
|
||||||
N_("No error"),
|
GQuark
|
||||||
N_("Unknown error"),
|
glibtop_error_quark (void)
|
||||||
N_("Invalid argument"),
|
|
||||||
N_("No such parameter"),
|
|
||||||
N_("Attempted to modify a read-only value"),
|
|
||||||
N_("Parameter size mismatch"),
|
|
||||||
N_("Communication with LibGTop server failed"),
|
|
||||||
N_("No such process"),
|
|
||||||
N_("No kernel support"),
|
|
||||||
N_("Incompatible kernel version")
|
|
||||||
};
|
|
||||||
|
|
||||||
char *
|
|
||||||
glibtop_get_error_string_l (glibtop *server, unsigned error_number)
|
|
||||||
{
|
{
|
||||||
if (error_number >= GLIBTOP_MAX_ERROR)
|
static GQuark q = 0;
|
||||||
error_number = GLIBTOP_ERROR_UNKNOWN;
|
if (q == 0)
|
||||||
|
q = g_quark_from_static_string ("glibtop-error-quark");
|
||||||
|
|
||||||
return glibtop_strdup_r (server, _(glibtop_error_strings [error_number]));
|
return q;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned
|
void
|
||||||
glibtop_get_errno_l (glibtop *server)
|
glibtop_error_vl (glibtop_client *client, glibtop_error code,
|
||||||
|
const char *format, va_list args)
|
||||||
{
|
{
|
||||||
return server->glibtop_errno;
|
gchar *message;
|
||||||
|
GError *error;
|
||||||
|
|
||||||
|
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||||
|
message = g_strdup_vprintf (format, args);
|
||||||
|
|
||||||
|
error = g_error_new_literal (GLIBTOP_ERROR, code, message);
|
||||||
|
glibtop_client_propagate_error (client, error);
|
||||||
|
|
||||||
|
g_error_free (error);
|
||||||
|
g_free (message);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned
|
void
|
||||||
glibtop_clear_errno_l (glibtop *server)
|
glibtop_error_io_vl (glibtop_client *client, glibtop_error code,
|
||||||
|
int io_errno, const char *format, va_list args)
|
||||||
{
|
{
|
||||||
unsigned old_errno;
|
gchar *message, *fullmessage;
|
||||||
|
GError *error;
|
||||||
|
|
||||||
old_errno = server->glibtop_errno;
|
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||||
server->glibtop_errno = 0;
|
message = g_strdup_vprintf (format, args);
|
||||||
return old_errno;
|
fullmessage = g_strdup_printf ("%s: %s", message, strerror (io_errno));
|
||||||
|
|
||||||
|
error = g_error_new_literal (GLIBTOP_ERROR, code, message);
|
||||||
|
glibtop_client_propagate_error (client, error);
|
||||||
|
|
||||||
|
g_error_free (error);
|
||||||
|
g_free (fullmessage);
|
||||||
|
g_free (message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_warn_vl (glibtop_client *client, glibtop_error code,
|
||||||
|
const char *format, va_list args)
|
||||||
|
{
|
||||||
|
gchar *message;
|
||||||
|
GError *error;
|
||||||
|
|
||||||
|
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||||
|
message = g_strdup_vprintf (format, args);
|
||||||
|
|
||||||
|
error = g_error_new_literal (GLIBTOP_ERROR, code, message);
|
||||||
|
glibtop_client_propagate_warning (client, error);
|
||||||
|
|
||||||
|
g_error_free (error);
|
||||||
|
g_free (message);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_warn_io_vl (glibtop_client *client, glibtop_error code,
|
||||||
|
int io_errno, const char *format, va_list args)
|
||||||
|
{
|
||||||
|
gchar *message, *fullmessage;
|
||||||
|
GError *error;
|
||||||
|
|
||||||
|
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
|
||||||
|
message = g_strdup_vprintf (format, args);
|
||||||
|
fullmessage = g_strdup_printf ("%s: %s", message, strerror (io_errno));
|
||||||
|
|
||||||
|
error = g_error_new_literal (GLIBTOP_ERROR, code, message);
|
||||||
|
glibtop_client_propagate_warning (client, error);
|
||||||
|
|
||||||
|
g_error_free (error);
|
||||||
|
g_free (fullmessage);
|
||||||
|
g_free (message);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_error_l (glibtop_client *client, glibtop_error code,
|
||||||
|
char *format, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start (args, format);
|
||||||
|
glibtop_error_vl (client, code, format, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_warn_l (glibtop_client *client, glibtop_error code,
|
||||||
|
char *format, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start (args, format);
|
||||||
|
glibtop_warn_vl (client, code, format, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_error_io_l (glibtop_client *client, glibtop_error code,
|
||||||
|
char *format, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start (args, format);
|
||||||
|
glibtop_error_io_vl (client, code, errno, format, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_warn_io_l (glibtop_client *client, glibtop_error code,
|
||||||
|
char *format, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start (args, format);
|
||||||
|
glibtop_warn_io_vl (client, code, errno, format, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -29,14 +29,15 @@
|
|||||||
#include <glibtop/glib-arrays.h>
|
#include <glibtop/glib-arrays.h>
|
||||||
|
|
||||||
GArray *
|
GArray *
|
||||||
glibtop_get_proclist_as_array_l (glibtop *server, int64_t which, int64_t arg)
|
glibtop_get_proclist_as_array_l (glibtop_client *client, int64_t which,
|
||||||
|
int64_t arg)
|
||||||
{
|
{
|
||||||
glibtop_array array;
|
glibtop_array array;
|
||||||
GArray *retval;
|
GArray *retval;
|
||||||
unsigned *ptr;
|
unsigned *ptr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
ptr = glibtop_get_proclist_l (server, &array, which, arg);
|
ptr = glibtop_get_proclist_l (client, &array, which, arg);
|
||||||
if (!ptr) return NULL;
|
if (!ptr) return NULL;
|
||||||
|
|
||||||
retval = g_array_new (FALSE, TRUE, sizeof (guint));
|
retval = g_array_new (FALSE, TRUE, sizeof (guint));
|
||||||
@@ -45,20 +46,20 @@ glibtop_get_proclist_as_array_l (glibtop *server, int64_t which, int64_t arg)
|
|||||||
for (i = 0; i < array.number; i++)
|
for (i = 0; i < array.number; i++)
|
||||||
g_array_index (retval, guint, i) = ptr [i];
|
g_array_index (retval, guint, i) = ptr [i];
|
||||||
|
|
||||||
glibtop_free_r (server, ptr);
|
g_free (ptr);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
GPtrArray *
|
GPtrArray *
|
||||||
glibtop_get_proc_args_as_array_l (glibtop *server, pid_t pid)
|
glibtop_get_proc_args_as_array_l (glibtop_client *client, pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_array array;
|
glibtop_array array;
|
||||||
GPtrArray *retval;
|
GPtrArray *retval;
|
||||||
char **ptr;
|
char **ptr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
ptr = glibtop_get_proc_args_l (server, &array, pid);
|
ptr = glibtop_get_proc_args_l (client, &array, pid);
|
||||||
if (!ptr) return NULL;
|
if (!ptr) return NULL;
|
||||||
|
|
||||||
retval = g_ptr_array_new ();
|
retval = g_ptr_array_new ();
|
||||||
@@ -66,23 +67,23 @@ glibtop_get_proc_args_as_array_l (glibtop *server, pid_t pid)
|
|||||||
|
|
||||||
for (i = 0; i < array.number; i++) {
|
for (i = 0; i < array.number; i++) {
|
||||||
retval->pdata [i] = g_strdup (ptr [i]);
|
retval->pdata [i] = g_strdup (ptr [i]);
|
||||||
glibtop_free_r (server, ptr [i]);
|
g_free (ptr [i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
glibtop_free_r (server, ptr);
|
g_free (ptr);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
GPtrArray *
|
GPtrArray *
|
||||||
glibtop_get_proc_map_as_array_l (glibtop *server, pid_t pid)
|
glibtop_get_proc_map_as_array_l (glibtop_client *client, pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_array array;
|
glibtop_array array;
|
||||||
GPtrArray *retval;
|
GPtrArray *retval;
|
||||||
glibtop_map_entry *ptr;
|
glibtop_map_entry *ptr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
ptr = glibtop_get_proc_map_l (server, &array, pid);
|
ptr = glibtop_get_proc_map_l (client, &array, pid);
|
||||||
if (!ptr) return NULL;
|
if (!ptr) return NULL;
|
||||||
|
|
||||||
retval = g_ptr_array_new ();
|
retval = g_ptr_array_new ();
|
||||||
@@ -91,20 +92,20 @@ glibtop_get_proc_map_as_array_l (glibtop *server, pid_t pid)
|
|||||||
for (i = 0; i < array.number; i++)
|
for (i = 0; i < array.number; i++)
|
||||||
retval->pdata [i] = g_memdup (ptr+i, sizeof (glibtop_map_entry));
|
retval->pdata [i] = g_memdup (ptr+i, sizeof (glibtop_map_entry));
|
||||||
|
|
||||||
glibtop_free_r (server, ptr);
|
g_free (ptr);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
GPtrArray *
|
GPtrArray *
|
||||||
glibtop_get_mountlist_as_array_l (glibtop *server, int all_fs)
|
glibtop_get_mountlist_as_array_l (glibtop_client *client, int all_fs)
|
||||||
{
|
{
|
||||||
glibtop_array array;
|
glibtop_array array;
|
||||||
GPtrArray *retval;
|
GPtrArray *retval;
|
||||||
glibtop_mountentry *ptr;
|
glibtop_mountentry *ptr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
ptr = glibtop_get_mountlist_l (server, &array, all_fs);
|
ptr = glibtop_get_mountlist_l (client, &array, all_fs);
|
||||||
if (!ptr) return NULL;
|
if (!ptr) return NULL;
|
||||||
|
|
||||||
retval = g_ptr_array_new ();
|
retval = g_ptr_array_new ();
|
||||||
@@ -113,7 +114,7 @@ glibtop_get_mountlist_as_array_l (glibtop *server, int all_fs)
|
|||||||
for (i = 0; i < array.number; i++)
|
for (i = 0; i < array.number; i++)
|
||||||
retval->pdata [i] = g_memdup (ptr+i, sizeof (glibtop_mountentry));
|
retval->pdata [i] = g_memdup (ptr+i, sizeof (glibtop_mountentry));
|
||||||
|
|
||||||
glibtop_free_r (server, ptr);
|
g_free (ptr);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@@ -25,26 +25,21 @@
|
|||||||
|
|
||||||
#include <glibtop.h>
|
#include <glibtop.h>
|
||||||
#include <glibtop/global.h>
|
#include <glibtop/global.h>
|
||||||
#include <glibtop/xmalloc.h>
|
|
||||||
|
|
||||||
#include <glibtop/backend.h>
|
#include <glibtop/glibtop-backend.h>
|
||||||
|
#include <glibtop/glibtop-backend-info.h>
|
||||||
|
|
||||||
extern glibtop_backend_info glibtop_backend_server;
|
static GHashTable *_glibtop_backend_list = NULL;
|
||||||
extern glibtop_backend_info glibtop_backend_sysdeps;
|
static long _glibtop_backend_nr = 0;
|
||||||
extern glibtop_backend_info glibtop_backend_common;
|
|
||||||
|
|
||||||
#if HAVE_LIBXML
|
|
||||||
|
|
||||||
#define LIBGTOP_XML_NAMESPACE "http://www.home-of-linux.org/libgtop/1.1"
|
#define LIBGTOP_XML_NAMESPACE "http://www.home-of-linux.org/libgtop/1.1"
|
||||||
|
|
||||||
#include <gnome-xml/parser.h>
|
#include <libxml/parser.h>
|
||||||
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
|
||||||
static void _glibtop_init_gmodule_backends (const char *);
|
static void _glibtop_init_gmodule_backends (const char *);
|
||||||
|
|
||||||
#endif /* HAVE_LIBXML */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
glibtop_init_backends (void)
|
glibtop_init_backends (void)
|
||||||
{
|
{
|
||||||
@@ -54,17 +49,15 @@ glibtop_init_backends (void)
|
|||||||
return;
|
return;
|
||||||
backends_initialized = 1;
|
backends_initialized = 1;
|
||||||
|
|
||||||
#if HAVE_LIBXML
|
LIBXML_TEST_VERSION;
|
||||||
_glibtop_init_gmodule_backends (LIBGTOP_BACKEND_DIR);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#if HAVE_LIBXML
|
_glibtop_init_gmodule_backends (LIBGTOP_BACKEND_DIR);
|
||||||
|
}
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
_get_library_filename (xmlDocPtr doc, xmlNodePtr cur, const char *directory)
|
_get_library_filename (xmlDocPtr doc, xmlNodePtr cur, const char *directory)
|
||||||
{
|
{
|
||||||
char *filename = xmlNodeListGetString (doc, cur->childs, 1);
|
char *filename = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1);
|
||||||
gchar *retval;
|
gchar *retval;
|
||||||
|
|
||||||
if (!filename)
|
if (!filename)
|
||||||
@@ -79,6 +72,32 @@ _get_library_filename (xmlDocPtr doc, xmlNodePtr cur, const char *directory)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GSList *
|
||||||
|
_parse_extra_libs (xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, const char *dir)
|
||||||
|
{
|
||||||
|
GSList *list = NULL;
|
||||||
|
|
||||||
|
/* We don't care what the top level element name is */
|
||||||
|
cur = cur->xmlChildrenNode;
|
||||||
|
while (cur != NULL) {
|
||||||
|
if ((!strcmp (cur->name, "ExtraLib")) && (cur->ns == ns)) {
|
||||||
|
xmlNodePtr sub = cur->xmlChildrenNode;
|
||||||
|
|
||||||
|
while (sub != NULL) {
|
||||||
|
if ((!strcmp (sub->name, "ShlibName")) && (sub->ns == ns))
|
||||||
|
list = g_slist_append
|
||||||
|
(list, _get_library_filename (doc, sub, dir));
|
||||||
|
|
||||||
|
sub = sub->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cur = cur->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
static glibtop_backend_entry *
|
static glibtop_backend_entry *
|
||||||
_parseBackend (xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, const char *dir)
|
_parseBackend (xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, const char *dir)
|
||||||
{
|
{
|
||||||
@@ -90,14 +109,14 @@ _parseBackend (xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, const char *dir)
|
|||||||
ret = g_new0 (glibtop_backend_entry, 1);
|
ret = g_new0 (glibtop_backend_entry, 1);
|
||||||
|
|
||||||
/* We don't care what the top level element name is */
|
/* We don't care what the top level element name is */
|
||||||
cur = cur->childs;
|
cur = cur->xmlChildrenNode;
|
||||||
while (cur != NULL) {
|
while (cur != NULL) {
|
||||||
if ((!strcmp (cur->name, "Name")) && (cur->ns == ns))
|
if ((!strcmp (cur->name, "Name")) && (cur->ns == ns))
|
||||||
ret->name = xmlNodeListGetString
|
ret->name = xmlNodeListGetString
|
||||||
(doc, cur->childs, 1);
|
(doc, cur->xmlChildrenNode, 1);
|
||||||
|
|
||||||
if ((!strcmp (cur->name, "Location")) && (cur->ns == ns)) {
|
if ((!strcmp (cur->name, "Location")) && (cur->ns == ns)) {
|
||||||
xmlNodePtr sub = cur->childs;
|
xmlNodePtr sub = cur->xmlChildrenNode;
|
||||||
|
|
||||||
while (sub != NULL) {
|
while (sub != NULL) {
|
||||||
if ((!strcmp (sub->name, "LibtoolName")) && (sub->ns == ns))
|
if ((!strcmp (sub->name, "LibtoolName")) && (sub->ns == ns))
|
||||||
@@ -105,6 +124,9 @@ _parseBackend (xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, const char *dir)
|
|||||||
if ((!strcmp (sub->name, "ShlibName")) && (sub->ns == ns))
|
if ((!strcmp (sub->name, "ShlibName")) && (sub->ns == ns))
|
||||||
ret->shlib_name = _get_library_filename (doc, sub, dir);
|
ret->shlib_name = _get_library_filename (doc, sub, dir);
|
||||||
|
|
||||||
|
if ((!strcmp (sub->name, "ExtraLibs")) && (sub->ns == ns))
|
||||||
|
ret->extra_libs = _parse_extra_libs (doc, ns, sub, dir);
|
||||||
|
|
||||||
sub = sub->next;
|
sub = sub->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -173,7 +195,7 @@ _glibtop_init_gmodule_backends (const char *directory)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur = cur->childs;
|
cur = cur->xmlChildrenNode;
|
||||||
while (cur != NULL) {
|
while (cur != NULL) {
|
||||||
glibtop_backend_entry *backend;
|
glibtop_backend_entry *backend;
|
||||||
|
|
||||||
@@ -197,4 +219,62 @@ _glibtop_init_gmodule_backends (const char *directory)
|
|||||||
closedir (dir);
|
closedir (dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_LIBXML */
|
long
|
||||||
|
glibtop_register_backend (glibtop_backend_entry *entry)
|
||||||
|
{
|
||||||
|
long id;
|
||||||
|
|
||||||
|
if (!_glibtop_backend_list)
|
||||||
|
_glibtop_backend_list = g_hash_table_new (NULL, NULL);
|
||||||
|
|
||||||
|
id = ++_glibtop_backend_nr;
|
||||||
|
|
||||||
|
g_hash_table_insert (_glibtop_backend_list,
|
||||||
|
GINT_TO_POINTER (id),
|
||||||
|
entry);
|
||||||
|
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glibtop_unregister_backend (long id)
|
||||||
|
{
|
||||||
|
g_hash_table_remove (_glibtop_backend_list,
|
||||||
|
GINT_TO_POINTER (id));
|
||||||
|
}
|
||||||
|
|
||||||
|
glibtop_backend_entry *
|
||||||
|
glibtop_backend_by_id (long id)
|
||||||
|
{
|
||||||
|
return g_hash_table_lookup (_glibtop_backend_list,
|
||||||
|
GINT_TO_POINTER (id));
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
const char *backend_name;
|
||||||
|
glibtop_backend_entry *entry;
|
||||||
|
} _find_by_name_param_t;
|
||||||
|
|
||||||
|
static void
|
||||||
|
find_by_name (gpointer key, gpointer value, gpointer user_data)
|
||||||
|
{
|
||||||
|
_find_by_name_param_t *param = (_find_by_name_param_t *) user_data;
|
||||||
|
glibtop_backend_entry *entry = (glibtop_backend_entry *) value;
|
||||||
|
|
||||||
|
if (!entry || !entry->name || param->entry)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!strcmp (entry->name, param->backend_name))
|
||||||
|
param->entry = entry;
|
||||||
|
}
|
||||||
|
|
||||||
|
glibtop_backend_entry *
|
||||||
|
glibtop_backend_by_name (const char *backend_name)
|
||||||
|
{
|
||||||
|
_find_by_name_param_t param = { backend_name, NULL };
|
||||||
|
|
||||||
|
g_hash_table_foreach (_glibtop_backend_list,
|
||||||
|
find_by_name, ¶m);
|
||||||
|
|
||||||
|
return param.entry;
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user