home
topology files
command‑line options
the core API
FAQ
download and install
|
cnet's Application Programming Interface
- NAME
- CNET_getvar - obtain the value of a per-node environment variable
- SYNOPSIS
-
#include <cnet.h>
char *CNET_getvar(const char *name);
- DESCRIPTION
-
CNET_getvar obtains the value of the per-node environment
variable corresponding to the value of name .
Environment variables may be defined in a cnet toplogy file,
and may either be global (defined outside of any node's definition)
or defined within a node's definition.
Each node inherits all global environment variables at the time of
the node's definition (in the toplogy file),
and each node may redefine any variable's value to provide a local definition.
- RETURN VALUE
-
On success,
the value corresponding to
name is returned.
On failure (if no value corresponds to name )
the empty string "" is returned
(note that this is not the NULL string).
Depending on the role of the variable,
its string representation may need conversion with
atoi() or atof() .
- NOTE
-
The values of environment variables cannot be modified or deleted at run-time.
|