Sun Microsystems Logo
Products and Services
 
Support and Training
 
 

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
 
Program Interfacecmm_connect(3CMM)


NAME

 cmm_connect - prepare or test a connection to the Cluster Membership Manager (CMM)

SYNOPSIS

 
cc [ flag... ] file...  -lcgha_cmm  -lrt
 
#include <cmm.h>
cmm_error_t cmm_connect( const timespec_t timeout);

DESCRIPTION

The cmm_connect() function is implicit in the first call to the Cluster Membership Manager (CMM) Application Programming Interface (API). You do not need to call this function to create a CMM connection; but use this function to test the availability of a CMM connection, or to set the timeout value. The default timeout is five seconds.

The timeout parameter is globally used by the CMM API to signify the maximum amount of time for which a call can block. The type of the timeout is a timespec_t and the value must be greater than 0 seconds, 0 nanoseconds. Note that if the value of the timeout is too short, you risk being unable to use the CMM API. This is because every call would fail since the timeout would be expired before the call finished.

Note – This function is not related to cluster information; therefore, can be called from any node - even a node that is not part of a cluster.

RETURN VALUES

The cmm_connect() function returns one of the following values:

CMM_ECONN

No nhcmmd(1M) is currently accessible on the local node.

CMM_EINVAL

The given timeout is invalid.

CMM_ENOTSUP

Unexpected service error occurs.

CMM_ETIMEDOUT

Fails to connect before the previous timeout expired.

CMM_OK

Operation succeeds.

This call never returns CMM_ENOCLUSTER

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
ArchitectureSPARC
AvailabilitySUNWnhcmd
Interface StabilityEvolving
MT-LevelMT-Safe
Cancel-SafetyDeferred-Cancel-Safe Asynchronous-Cancel-Unsafe

SEE ALSO

Intro(3CMM), nhcmmd(1M)


Netra HAS FS 2.1Go To TopLast Changed September 2004