 |
Index for Section 3 |
|
 |
Alphabetical listing for C |
|
 |
Bottom of page |
|
clua_getaliasaddress(3)
NAME
clua_getaliasaddress - List the cluster alias addresses enabled on the
calling node
LIBRARY
Cluster Alias Library (libclua.a and libclua.so)
SYNOPSIS
#include <clua/clua.h>
#include <sys/socket.h>
clua_status_t clua_getaliasaddress (
struct sockaddr *addr ,
int *context );
PARAMETERS
addr Pointer to a caller-allocated sockaddr structure in which
clua_getaliasaddress() puts the IP address of one cluster alias
to which this member belongs. Iterative calls to this function
retrieve the IP addresses of all the cluster aliases that this
member has joined.
context Context variable initialized to 0 (zero) by the caller and
updated by clua_getaliasaddress().
DESCRIPTION
Each call to clua_getaliasaddress() retrieves the IP address of one cluster
alias joined by the calling member. At the same time the routine increments
the context variable to point to the next alias. The next call to
clua_getaliasaddress() retrieves the next address and again increments the
context variable. When no more cluster aliases remain, the routine returns
CLUA_NOMOREALIASES.
You must call this function iteratively to obtain all the aliases to which
the calling member belongs.
It is expected that clua_getaliasaddress() and clua_getaliasinfo() will be
used in a loop where the addresses obtained by clua_getaliasaddress are
iteratively passed as input arguments to clua_getaliasinfo(). See
clua_getaliasinfo(3) for an example of this type of loop.
The clua_getaliasaddress() function might not return information about a
cluster alias that was enabled on the caller during the iterative call
sequence (for instance, if the caller's context variable is at n and the
new alias is assigned an alias ID lower than n).
Programs that use cluster alias functions include the cluster alias header
file, <clua/clua.h>, and are compiled with the cluster alias library,
libclua. Programs that use the clua_getaliasaddress(), clua_getaliasinfo(),
clua_getdefaultalias(), clua_isalias(), clua_registerservice(), or
clua_unregisterservice() functions are also compiled with the configuration
management library, libcfg.
RETURN VALUES
The clua_getaliasaddress() returns one of the following values:
CLUA_SUCCESS
Successful completion.
CLUA_NOMOREALIASES
No more aliases defined.
CLUA_ENOCLUSTER
Caller is not in a cluster.
SEE ALSO
Commands: cluamgr(8), clua_active(8)
Functions: clua_error(3), clua_getaliasinfo(3), clua_getdefaultalias(3),
clua_isalias(3), clua_registerservice(3)
Files: clua_services(4), clu_alias.config(4), exports.aliases(4)
 |
Index for Section 3 |
|
 |
Alphabetical listing for C |
|
 |
Top of page |
|