cnet's runtime environment
When initially configured and compiled,
cnet employs a number of string constants to define and
constrain its execution.
While it is anticipated that these "compiled-in" defaults will be reasonable,
there are occasions when you may wish to change one without having to
recompile all code.
cnet honours a number of Unix/Linux environment variables that
may override cnet's default behaviour.
Running cnet with its -v
option will report the environment values that are being used
(along with much other information).
Depending on which Unix/Linux shell you use
(type echo $SHELL to find out),
environment variables may be set in one of two ways:
- for sh, bash, ksh, or zsh:
CNETPATH="/usr/local/cnetlib" ; export CNETPATH
- for csh:
The value of CNETPATH provides a colon-separated
list of directory names where cnet will search for
the <cnet.h> header file when compiling C protocol files.
CNETPATH is also used to locate the Tcl/Tk source file (see CNETTCLTK,
below), the GIF images displayed on the simulation map, and any
extension modules specified with the
The value of CNETCPP provides the full pathname of the C preprocessor
used to preprocess cnet topology files (if necessary).
If gcc is being used as the preprocessor, it will be invoked
with its -E option to preprocess the topology files.
The value of CNETCC provides the full pathname of the C compiler used to
compile the C99 protocol files.
If gcc is being used as the compiler, it will be invoked
with its -std=c99 option to compile the source files.
The value of CNETLD provides the full pathname of the program used to
link one or more object files to produce the final executable protocol.
The value of CNETFILEEXT provides the filename extension of
cnet's (executable) shared object files.
By default, this is ".cnet"
The CNETTCLTK environment variable provides the filename of the Tcl/Tk
source file that defines the look of cnet's graphical interface.
If the specified filename does not contain a slash (/) character,
the file is sought via the value of CNETPATH (see above).
Setting CNETTCLTK saves you from having to invoke cnet with
its -F option.
By default, this is "cnet.tcl"
cnet uses Tcl/Tk under the X-window system on Unix/Linux
to provide its graphical interface (not employed on Mac-OSX).
Setting the DISPLAY environment variable permits cnet's graphical
interface to be redirected to another display/screen.
cnet v3.3.3, written by Chris.McDonald@uwa.edu.au
Last modified: Tue Oct 13 1:07PM 2015