GETSITES(2,L) AIX Technical Reference GETSITES(2,L)
-------------------------------------------------------------------------------
getsites
PURPOSE
Determines sites which are in the current TCF cluster.
SYNTAX
#include <sys/types.h>
int getsites (sitep, maxsites)
sitestat_t *sitep;
int maxsites;
DESCRIPTION
The getsites system call returns information about which AIX/370 and AIX PS/2
sites are in the current TCF cluster. These sites are also referred to
collectively as the current network partition. The sitep argument is a pointer
to a buffer of length maxsites*sizeof (sitestat_t), with each element
representing a site (that is, sitep[i] is the status information for site i).
Site i is in the current TCF cluster if (sitep[i] & GS_UP) != 0. If maxsites
is not large enough to return all of the site information, -1 is returned.
Otherwise, the return value is the maximum site number plus one. A good value
to be passed as the maxsites argument is the constant MAXSITE which is defined
in the file <sys/param.h>.
RETURN VALUE
Upon successful completion of getsites, the maximum site number plus one is
returned. Otherwise, -1 is returned and errno is set to indicate the error.
ERROR CONDITIONS
The getsites system call fails if any of the following are true:
EINVAL maxsites is zero or negative.
EFAULT sitep does not point to a writable region inside the user's address
space.
EFAULT maxsites is not big enough to return all the site information.
RELATED INFORMATION
In this book: "netctrl," and "site."
The clusterstart and clusterstop commands in the AIX Operating System Command
Reference.
Processed November 7, 1990 GETSITES(2,L) 1