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

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

## NAME

> cmm_cmc_filter - define notification filtering

## SYNOPSIS

>     cc [ flag... ] file...  -lcgha_cmm  -lrt

>     #include <cmm.h>

> `cmm_error_t cmm_cmc_filter(cmm_cmcfilter_t const action, cmm_cmchanges_t const * const notifications_list, uint32_t const notifications_count);`

## DESCRIPTION

> The cmm_cmc_filter() function defines the list of notifications sent to an application that is registered to receive Cluster Membership Manager notifications. An application registers to receive notifications by calling the `cmm_cmc_register`(3CMM) function. By default, when an application calls this function, the application receives a notification for every change that occurs in the cluster state. An application can operate when viewing a subset of the notifications. By using the cmm_cmc_filter() function, an application defines the list of notifications that it receives.

> Note – For information on the notification sequences and the various scenarios, see the Netra High Availability Suite Foundation Services 2.1 6/03 CMM Programming Guide.

## PARAMETERS

> The cmm_cmc_filter() function takes the following parameters:

> action

>   Specifies the action to be performed on the current filter (add, remove, set).

> notifications_list

>   An array of ``cmm_cmchanges_t``. This array represents the modifications to be applied to the current filter.

> notifications_count

>   Specifies the number of elements in notifications_list.

> - The action parameter is set to:

>   `CMM_CMC_NOTIFY_REM`

>     To remove some notifications from the set currently in the filter.

>   `CMM_CMC_NOTIFY_ADD`

>     To receive a given set of notifications in addition to the set currently in the filter.

>   `CMM_CMC_NOTIFY_SET`

>     To define a completely new set of notifications.

>   `CMM_CMC_NOTIFY_ALL`

>     To receive all notifications.

>   `CMM_CMC_NOTIFY_NONE`

>     To receive no notifications. This is not a way to remove a registration. Use cmm_cmc_unregister() to stop `nhcmmd` sending notifications.

> - The notifications_list parameter is the set of notifications. In the case of `CMM_CMC_NOTIFY_ALL` and `CMM_CMC_NOTIFY_NONE`, this argument is ignored and not tested.

> - The notifications_count parameter is the number of elements contained in notifications_list. This must be a positive integer. If `CMM_CMC_NOTIFY_ALL` and `CMM_CMC_NOTIFY_NONE` are used with the action parameter, this argument is ignored and not tested.

> An application can call the cmm_cmc_filter() function as many times as needed. The changes to the filter take effect when the call returns successfully. The filter is evaluated in `cmm_notify_dispatch`(3CMM), so you must define it before calling this dispatching function. An application calling cmm_cmc_register() after cmm_cmc_filter() does not receive unsolicited notifications.

## RETURN VALUES

> The cmm_cmc_filter() function returns one of the following values:

> `CMM_EINVAL`

>   Invalid argument such as notification_count is a `NULL` or action is not valid.

> `CMM_OK`

>   Operation succeeds.

## 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), `cmm_cmc_register`(3CMM), `cmm_notify_getfd`(3CMM), `cmm_notify_dispatch`(3CMM)

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.