Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > E


HP-UX 11i Version 3: February 2007

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index


EvmFilterCreate(), EvmFilterDestroy(), EvmFilterIsFile(), EvmFilterReadFile(), EvmFilterSet(), EvmFilterTest() — event filter evaluator routines


#include <evm/evm.h> EvmStatus_t EvmFilterCreate( EvmFilter_t *filter_evaluator ); EvmStatus_t EvmFilterDestroy(: EvmFilter_t filter_evaluator ); EvmBoolean_t EvmFilterIsFile( const char *filter_string ); char * EvmFilterReadFile( const char *filter_string ); EvmStatus_t EvmFilterSet( EvmFilter_t filter_evaluator, const EvmString_t filter_string ); EvmStatus_t EvmFilterTest( EvmFilter_t filter_evaluator, EvmEvent_t event, EvmBoolean_t *matchFlag );


EVM Support Library (libevm.so).



For EvmFilterCreate(), filter_evaluator is the return handle of an established filter evaluator.

For EvmFilterSet() filter_evaluator , identifies the filter evaluator that uses the filter_string in subsequent matches.

For EvmFilterTest(), filter_evaluator identifies the filter evaluator that compares the supplied event with the filter string.

For EvmFilterDestroy(), filter_evaluator identifies the filter evaluator to be destroyed.


The filter string used by the filter evaluator in subsequent matches. See the EvmFilter(5) manpage for the syntax.


The event to be compared with the filter string currently associated with the filter evaluator.


The result obtained when the supplied event is compared with the filter string currently associated with the filter evaluator. Possible return values are as follows:


The event matches the filter_string.


The event does not match the filter_string.


The filter evaluation routines check whether an event matches a given event filter. These functions are useful to clients that pass a complex filter to the EVM daemon. Then the clients test incoming events against subcomponents of the filter to determine the appropriate action.

The EvmFilterCreate() routine establishes an instance of a filter evaluator, returning a handle in filter_evaluator.

The EvmFilterSet() routine passes a filter_string to the filter_evaluator for subsequent matches.

The EvmFilterTest() routine compares the supplied event with the filter_string currently associated with the filter_evaluator. The result is returned in matchFlag. Possible return values are as follows:


The event matches the filter_string.


The event does not match the filter_string.

The indirect filter syntax, @filename, is supported by the EvmFilterIsFile() and EvmFilterReadFile() routines. Programs which support indirect filters may use EvmFilterIsFile() to determine whether a user-supplied filter string is indirect. If so, then use EvmFilterReadFile() to expand the file to a regular filter string.

EvmFilterIsFile() returns EvmTRUE if the supplied filter_string uses indirect filter notation, and returns EvmFALSE otherwise.

EvmFilterReadFile() interprets the supplied filter_string, and attempts to open and read the referenced file. EvmFilterReadFile() returns a pointer to heap space memory containing the expanded filter string. The caller is responsible for freeing the memory when it is no longer needed. NULL is returned if an error occurs while reading the file. Note that EvmFilterReadFile() does not attempt to validate the filter string contained in the file.

The EvmFilterDestroy() routine destroys the filter_evaluator, freeing all associated resources.



The operation completed without error.


A filter string that is syntactically invalid passed to the filter evaluator.


One of the arguments to the function is invalid.


A value in a structure member is invalid.


An operation failed because an attempt to acquire heap memory failed.


An attempt was made to use a filter evaluator without first calling EvmFilterSet() which provides an initial filter string.


An attempt to read a filter file failed.


The value of errno is not set.


Event Management


EVM Events


Event Filter


Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.