NETCTRL(2,L) AIX Technical Reference NETCTRL(2,L)
-------------------------------------------------------------------------------
netctrl
PURPOSE
Allows system administrator to exercise control over TCF networking.
SYNTAX
#include <sys/netctrl.h>
int netctrl(option, param)
int option;
caddr_t param;
DESCRIPTION
The netctrl system call provides the superuser with a method for controlling
the behavior of the TCF network (that is, cluster communication). The option
parameter may be ORed with SET_OPT to cause the value(s) to be set or reset as
appropriate in addition to returning the old value(s). The various structures
to which param may refer are defined in <sys/netctrl.h>. The following options
are available:
NET_FLOW Controls TCF cluster communication (network traffic) and/or returns
current state. param is the address of an integer whose value is
NET_START, NETJOIN, or NET_STOP.
NET_START starts a cluster communication, allowing it to join a
cluster with other TCF sites.
NET_JOIN is used after cluster communication is enabled to
actively look for other cluster sites and hence join a
cluster. NET_JOIN is usually used immediately after
NET_START.
NET_STOP stops cluster communication.
Note: On AIX/370, in addition to enabling cluster communication,
NET_START enables communication using a telecommunications
adapter (TCA) for use by AIX Access. NET_STOP, however, does
not disable TCA traffic.
NET_STATS Get current TCF network statistics gathered since last network
startup. This information is returned into a net_stats structure as
pointed to by param. If SET_OPT is set, then the statistics are
reset within the kernel.
Processed November 7, 1990 NETCTRL(2,L) 1
NETCTRL(2,L) AIX Technical Reference NETCTRL(2,L)
For the following options, if more sites exist than are implied by the number
of entries specified by the param argument, the values for those sites are
simply not returned or modified.
SITE_STATS
Get current statistics on TCF sites. This information is returned
into a site_stats structure as pointed to by param. If SET_OPT is
set, then the statistics are reset within the kernel.
MSG_STATS Get current statistics on message traffic on a per site basis. This
information is returned into a msg_stats structure as pointed to by
param. If SET_OPT is set, then the statistics are reset within the
kernel.
SITE_PARMS
Get or set current site parameters as determined by the site_parms
structure which is pointed to by param. Values for the site_parms
structure may have the following values:
sp_route Reserved for future implementation.
sp_timeout Must be greater than or equal to 2.
sp_block_size
Must be a power of 2 greater than or equal to 512 and
less than or equal to 16384.
sp_retries Must be greater than 0.
sp_window Must be greater than 0.
sp_s_window Must be greater than or equal to 1.
sp_checksum If 1, checksumming is done. If 0, no checksumming is
done.
NET_TOPWAIT
Wait for change in TCF cluster topology. The param parameter is a
pointer to a character whose value is one of the topology change
status values defined in <sys/topchg.h<:
TP_PARTITION
TP_CLEANUP
TP_MERGE
TP_NEWTOP
TP_RECOVERY
TP_CANCEL
TP_WAIT
TP_STABLE
Usually, the first time NET_WAIT is used, the value TP_STABLE is
passed.
Processed November 7, 1990 NETCTRL(2,L) 2
NETCTRL(2,L) AIX Technical Reference NETCTRL(2,L)
The netctrl system call will wait until the current topology change
status is different from the provided value; at which point the
system call will return, replacing the character pointed at by param
with the then current topology status. Because there may be multiple
changes in the topology status before this process gets a chance to
run-it is possible that the returned topology change status actually
equals the value passed in.
RETURN VALUE
Upon successful completion, a value of 0 is returned to the calling process.
Otherwise, a value of -1 is returned and errno is set to indicate the error.
ERROR CONDITIONS
The netctrl system call fails if any of the following is true:
EPERM The SET_OPT bit was on and the user was not the superuser.
EINVAL Option is not an one of the choices described above.
EINVAL One or more of the parameters specified in the site_parms structure
are outside of the acceptable ranges.
EFAULT param pointed to an area which was unwritable.
EBUSY NET_JOIN was specified while already in the process of joining a
cluster.
EINVAL TCF is not enabled on your system (AIX PS/2 only).
RELATED INFORMATION
In this book: "getsites."
The clusterstart, clusterstop, and netparams commands in AIX Operating System
Commands Reference.
Processed November 7, 1990 NETCTRL(2,L) 3