HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
44.2 slapi_vattr_attrs_free()
This function should be used to free the list of attributes returned from
slapi_vattrspi_add_type().
Syntax
#include "slapi-plugin.h"
void slapi_vattr_attrs_free(vattr_type_thang **types, int flags);
Parameters This function takes the following parameters:
Pointer to the list of attributes to be freed.
types
Bit mask of options. Valid value is as follows:
SLAPI_VIRTUALATTRS_RETURNED_POINTERS
flags
Memory concerns Free the pointer block using “slapi_ch_free()”.
See also “slapi_vattr_list_attrs()”
44.3 slapi_vattr_schema_check_type()
Performs a schema check on the attribute types in the entry.
Syntax
#include "slapi-plugin.h"
int slapi_vattr_schema_check_type(Slapi_Entry *e, char *type);
Parameters This function takes the following parameters:
The entry to be checked.
e
The attribute type in the schema.
type
Returns Return 0 if success, -1 if error.
44.4 slapi_vattr_value_compare()
Description This function compares attribute type and name in a given entry. There is no need
to call “slapi_vattr_values_free()” after calling this function.
Syntax
#include "slapi-plugin.h"
int slapi_vattr_value_compare( Slapi_Entry *e, char *type,
Slapi_Value *test_this, int *result, int flags);
Parameters This function takes the following parameters:
Entry to be compared.
e
Attribute type name.
type
Value to be tested.
test_this
0 if the compare is true, 1 if the compare is false.result
Not used. You should pass 0 for this parameter.flags
Returns This function returns 1 for success, in which case result contains the result of the
comparison. Otherwise, this function returns 0 and one of the following:
354 Functions specific to virtual attribute service