Added new feature to get a list of network interface names.

1999-11-21  Martin Baulig  <martin@home-of-linux.org>

	Added new feature to get a list of network interface names.

	* features.def: Added `interface_names' feature.

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

	* include/glibtop/sysdeps.h (GLIBTOP_SYSDEPS_INTERFACE_NAMES): Added.
	(glibtop_sysdeps): Added `interface_names'.
	* include/glibtop/union.h (glibtop_union): Added `interface_names'.
	* include/glibtop/command.h (GLIBTOP_CMND_INTERFACE_NAMES): Added.
This commit is contained in:
Martin Baulig
1999-11-21 18:35:40 +00:00
committed by Martin Baulig
parent e5a7a5b0e5
commit b746f488b0
13 changed files with 217 additions and 23 deletions

View File

@@ -50,6 +50,8 @@ BEGIN_LIBGTOP_DECLS
typedef struct _glibtop_netload glibtop_netload;
#include <glibtop/interfaces.h>
enum {
GLIBTOP_IF_FLAGS_UP = 1,
GLIBTOP_IF_FLAGS_BROADCAST,
@@ -91,9 +93,9 @@ struct _glibtop_netload
#define glibtop_get_netload(netload,interface) glibtop_get_netload_l(glibtop_global_server, netload, interface)
#if GLIBTOP_SUID_NETLOAD
#define glibtop_get_netload_r glibtop_get_netload_p
#define glibtop_get_netload_r glibtop_get_netload_p
#else
#define glibtop_get_netload_r glibtop_get_netload_s
#define glibtop_get_netload_r glibtop_get_netload_s
#endif
int glibtop_get_netload_l (glibtop *server, glibtop_netload *buf, const char *interface);