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 Tcl/Tk graphical interface, the output of CNET_trace() also appears in a graphical pane below the main network "map".

When running without the Tcl/Tk graphical interface, 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 v3.3.1, written by Chris.McDonald@uwa.edu.au
 Last modified: Thu Apr 10 4:35PM 2014