Net Load

## Net Load Net Load — Network Load. |

## Stability Level

Stable, unless otherwise indicated

## Synopsis

    #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
    struct              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);

## Description

The application class handles ...

## Details

### GLIBTOP_NETLOAD_IF_FLAGS

    #define GLIBTOP_NETLOAD_IF_FLAGS 0

### GLIBTOP_NETLOAD_MTU

    #define GLIBTOP_NETLOAD_MTU		1

### GLIBTOP_NETLOAD_SUBNET

    #define GLIBTOP_NETLOAD_SUBNET		2

### GLIBTOP_NETLOAD_ADDRESS

    #define GLIBTOP_NETLOAD_ADDRESS		3

### GLIBTOP_NETLOAD_PACKETS_IN

    #define GLIBTOP_NETLOAD_PACKETS_IN 4

### GLIBTOP_NETLOAD_PACKETS_OUT

    #define GLIBTOP_NETLOAD_PACKETS_OUT 5

### GLIBTOP_NETLOAD_PACKETS_TOTAL

    #define GLIBTOP_NETLOAD_PACKETS_TOTAL 6

### GLIBTOP_NETLOAD_BYTES_IN

    #define GLIBTOP_NETLOAD_BYTES_IN 7

### GLIBTOP_NETLOAD_BYTES_OUT

    #define GLIBTOP_NETLOAD_BYTES_OUT 8

### GLIBTOP_NETLOAD_BYTES_TOTAL

    #define GLIBTOP_NETLOAD_BYTES_TOTAL 9

### GLIBTOP_NETLOAD_ERRORS_IN

    #define GLIBTOP_NETLOAD_ERRORS_IN 10

### GLIBTOP_NETLOAD_ERRORS_OUT

    #define GLIBTOP_NETLOAD_ERRORS_OUT 11

### GLIBTOP_NETLOAD_ERRORS_TOTAL

    #define GLIBTOP_NETLOAD_ERRORS_TOTAL 12

### GLIBTOP_NETLOAD_COLLISIONS

    #define GLIBTOP_NETLOAD_COLLISIONS 13

### GLIBTOP_NETLOAD_ADDRESS6

    #define GLIBTOP_NETLOAD_ADDRESS6 14

### GLIBTOP_NETLOAD_PREFIX6

    #define GLIBTOP_NETLOAD_PREFIX6		15

### GLIBTOP_NETLOAD_SCOPE6

    #define GLIBTOP_NETLOAD_SCOPE6		16

### GLIBTOP_NETLOAD_HWADDRESS

    #define GLIBTOP_NETLOAD_HWADDRESS 17

### GLIBTOP_MAX_NETLOAD

    #define GLIBTOP_MAX_NETLOAD		18

### struct glibtop_netload

    struct glibtop_netload {
    	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_get_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.

### glibtop_get_netload_r

    #define glibtop_get_netload_r glibtop_get_netload_p

### glibtop_get_netload_l ()

    void                glibtop_get_netload_l               (glibtop *server,
                                                             glibtop_netload *buf,
                                                             const char *interface);

### glibtop_get_netload_p ()

    void                glibtop_get_netload_p               (glibtop *server,
                                                             glibtop_netload *buf,
                                                             const char *interface);

### glibtop_get_netload_s ()

    void                glibtop_get_netload_s               (glibtop *server,
                                                             glibtop_netload *buf,
                                                             const char *interface);

## See Also

libtop-netlist