![]() |
![]() |
![]() |
Libgtop Reference Manual | ![]() |
---|---|---|---|---|
#include <glibtop/netload.h> #define GLIBTOP_NETLOAD_IF_FLAGS #define GLIBTOP_NETLOAD_MTU #define GLIBTOP_NETLOAD_SUBNET #define GLIBTOP_NETLOAD_ADDRESS #define GLIBTOP_NETLOAD_PACKETS_IN #define GLIBTOP_NETLOAD_PACKETS_OUT #define GLIBTOP_NETLOAD_PACKETS_TOTAL #define GLIBTOP_NETLOAD_BYTES_IN #define GLIBTOP_NETLOAD_BYTES_OUT #define GLIBTOP_NETLOAD_BYTES_TOTAL #define GLIBTOP_NETLOAD_ERRORS_IN #define GLIBTOP_NETLOAD_ERRORS_OUT #define GLIBTOP_NETLOAD_ERRORS_TOTAL #define GLIBTOP_NETLOAD_COLLISIONS #define GLIBTOP_NETLOAD_ADDRESS6 #define GLIBTOP_NETLOAD_PREFIX6 #define GLIBTOP_NETLOAD_SCOPE6 #define GLIBTOP_NETLOAD_HWADDRESS #define GLIBTOP_MAX_NETLOAD glibtop_netload; void glibtop_get_netload (glibtop_netload *buf, const char *interface); #define glibtop_get_netload_r void glibtop_get_netload_l (glibtop *server, glibtop_netload *buf, const char *interface); void glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, const char *interface); void glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, const char *interface);
typedef struct { guint64 flags; guint64 if_flags; /* GLIBTOP_NETLOAD_IF_FLAGS */ guint32 mtu; /* GLIBTOP_NETLOAD_MTU */ guint32 subnet; /* GLIBTOP_NETLOAD_SUBNET */ guint32 address; /* GLIBTOP_NETLOAD_ADDRESS */ guint64 packets_in; /* GLIBTOP_NETLOAD_PACKETS_IN */ guint64 packets_out; /* GLIBTOP_NETLOAD_PACKETS_OUT */ guint64 packets_total; /* GLIBTOP_NETLOAD_PACKETS_TOTAL*/ guint64 bytes_in; /* GLIBTOP_NETLOAD_BYTES_IN */ guint64 bytes_out; /* GLIBTOP_NETLOAD_BYTES_OUT */ guint64 bytes_total; /* GLIBTOP_NETLOAD_BYTES_TOTAL */ guint64 errors_in; /* GLIBTOP_NETLOAD_ERRORS_IN */ guint64 errors_out; /* GLIBTOP_NETLOAD_ERRORS_OUT */ guint64 errors_total; /* GLIBTOP_NETLOAD_ERRORS_TOTAL */ guint64 collisions; /* GLIBTOP_NETLOAD_COLLISIONS */ guint8 address6[16]; /* GLIBTOP_NETLOAD_ADDRESS6 */ guint8 prefix6[16]; /* GLIBTOP_NETLOAD_PREXIF6 */ guint8 scope6; /* GLIBTOP_NETLOAD_SCOPE6 */ guint8 hwaddress[8]; /* GLIBTOP_NETLOAD_HWADDRESS */ } glibtop_netload;
void glibtop_get_netload (glibtop_netload *buf, const char *interface);
Recolects network statistics for interface
(which is the same than in ifconfig).
The values are returned into buf
.
buf : |
The variable where the results will be assigned. |
interface : |
The name of the network interface. |
void glibtop_get_netload_l (glibtop *server, glibtop_netload *buf, const char *interface);
server : |
|
buf : |
|
interface : |
void glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, const char *interface);
server : |
|
buf : |
|
interface : |
void glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, const char *interface);
server : |
|
buf : |
|
interface : |