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:
committed by
Martin Baulig
parent
e9c8125828
commit
77a1a6a43d
@@ -42,6 +42,9 @@ BEGIN_LIBGTOP_DECLS
|
||||
/* Maximum length of a network interface name. */
|
||||
#define GLIBTOP_INTERFACE_LEN 32
|
||||
|
||||
/* Length of a network interface address in bytes. */
|
||||
#define GLIBTOP_IFADDR_LEN 16
|
||||
|
||||
/* This is ((u_int64_t)-1) */
|
||||
#define GLIBTOP_UNLIMITED (~(u_int64_t)0)
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user