cnet v4.0.4  

home topology files command‑line options the core API FAQ download and install

cnet's Application Programming Interface

NAME
CNET_get_linkstats - obtain runtime statistics about one of current node's links

SYNOPSIS
#include <cnet.h> typedef struct { int64_t tx_frames; int64_t tx_bytes; int64_t tx_cost; int64_t rx_frames; int64_t rx_bytes; int64_t rx_frames_corrupted; int64_t rx_frames_collisions; } CnetLinkStats; int CNET_get_linkstats(int link, CnetLinkStats *stats);

DESCRIPTION
CNET_get_linkstats() provides the current node with statistics about each of its own communication links.

A node's link statistics are cleared when the node reboots. The "sum" of all link statistics form the global link statistics which are reported on the GUI and may be requested with the -s command-line option.

RETURN VALUE
The value 0 is returned on success. On failure, the value -1 is returned, and the global variable cnet_errno is set to one of the following values to describe the error:

ER_BADLINK
The value of link is less than zero, or greater than the number of physical links of the current node.
ER_BADARG
stats was a NULL pointer.
SEE ALSO
CNET_get_nodestats.

cnet v4.0.4 - [email protected]