cnet v4.0.4  

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

cnet's Application Programming Interface

NAME
CNET_trace - print formatted output to cnet's trace stream.

SYNOPSIS
#include <cnet.h> int CNET_trace(const char *format, ...);

DESCRIPTION
If the execution of the cnet event currently being handled by the current node is being traced, a call to CNET_trace() will format and print the requested output to cnet's trace stream.

If execution is not currently being traced, a call to CNET_trace() has no effect and, so, may be safely left in a protocol's source code.

The arguments to CNET_trace() are just like those of the standard-C function printf(), and all of the standard formatting sequences (introduced with %) are supported.

If the current simulation has registered a tracefile (via its topology file), the output of CNET_trace() will always be appended to that file.

When running under the GUI, the output of CNET_trace() also appears in a graphical pane below the main network "map".

When running without the GUI, the output of CNET_trace() also appears on cnet's stderr output stream.

RETURN VALUE
This function always succeeds and returns the value 0.

cnet v4.0.4 - [email protected]