cnet v3.1.4

home
FAQ

cmdline options
topology files
attributes

datatypes
data structures
core API
support API

download/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 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 was written and is maintained by Chris McDonald (chris@csse.uwa.edu.au).

cnet development has been supported by an ACM-SIGCSE Special Project Grant, and an Australian Apple University Consortium Scholarship.