sun.com | docs.sun.com |  | How To Buy | My Sun | Worldwide Sites |

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 Interface | cmm_connect(3CMM)

- NAME
- SYNOPSIS
- DESCRIPTION
- RETURN VALUES
- ATTRIBUTES
- SEE ALSO

## 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 TYPE | ATTRIBUTE VALUE
> --- | ---
> Architecture | SPARC
> Availability | SUNWnhcmd
> Interface Stability | Evolving
> MT-Level | MT-Safe
> Cancel-Safety | Deferred-Cancel-Safe Asynchronous-Cancel-Unsafe

## SEE ALSO

> `Intro`(3CMM), `nhcmmd`(1M)

Netra HAS FS 2.1 | Go To Top | Last Changed September 2004

Company Info | Contact | Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.