address' and subnet' are now arrays of GLIBTOP_IFADDR_LEN u_int8_t

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.
This commit is contained in:
Martin Baulig
2000-01-24 01:42:32 +00:00
committed by Martin Baulig
parent e9c8125828
commit 77a1a6a43d
5 changed files with 170 additions and 17 deletions

View File

@@ -46,11 +46,11 @@ typedef struct _glibtop_netinfo glibtop_netinfo;
struct _glibtop_netinfo
{
u_int64_t flags,
if_flags, /* GLIBTOP_NETINFO_IF_FLAGS */
transport, /* GLIBTOP_NETINFO_TRANSPORT */
mtu, /* GLIBTOP_NETINFO_MTU */
subnet, /* GLIBTOP_NETINFO_SUBNET */
address; /* GLIBTOP_NETINFO_ADDRESS */
if_flags, /* GLIBTOP_NETINFO_IF_FLAGS */
transport, /* GLIBTOP_NETINFO_TRANSPORT */
mtu; /* GLIBTOP_NETINFO_MTU */
u_int8_t subnet [GLIBTOP_IFADDR_LEN],/* GLIBTOP_NETINFO_SUBNET */
address [GLIBTOP_IFADDR_LEN]; /* GLIBTOP_NETINFO_ADDRESS */
};
#define glibtop_get_netinfo(netinfo,interface,transport) glibtop_get_netinfo_l(glibtop_global_server, netinfo, interface, transport)
@@ -61,14 +61,14 @@ struct _glibtop_netinfo
#define glibtop_get_netinfo_r glibtop_get_netinfo_s
#endif
int glibtop_get_netinfo_l (glibtop *server, glibtop_netinfo *buf, const char *interface, unsigned transport);
int glibtop_get_netinfo_l (glibtop *server, glibtop_netinfo *buf, const char *interface, u_int64_t transport);
#if GLIBTOP_SUID_NETINFO
int glibtop_init_netinfo_p (glibtop *server);
int glibtop_get_netinfo_p (glibtop *server, glibtop_netinfo *buf, const char *interface, unsigned transport);
int glibtop_get_netinfo_p (glibtop *server, glibtop_netinfo *buf, const char *interface, u_int64_t transport);
#else
int glibtop_init_netinfo_s (glibtop *server);
int glibtop_get_netinfo_s (glibtop *server, glibtop_netinfo *buf, const char *interface, unsigned transport);
int glibtop_get_netinfo_s (glibtop *server, glibtop_netinfo *buf, const char *interface, u_int64_t transport);
#endif
#ifdef GLIBTOP_NAMES