HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
19.6 slapi_attr_free()
Description Use this function to free an attribute when you are finished with it.
Syntax
#include "slapi-plugin.h"
void slapi_attr_free( Slapi_Attr **a );
Parameters This function takes the following parameters:
Attribute to be freed.
a
See also
“slapi_attr_new()”
“slapi_attr_init()”
“slapi_attr_dup()”
19.7 slapi_attr_get_bervals_copy()
Description This function copies the values from an attribute into an array of berval structure
pointers.
Syntax
#include "slapi-plugin.h"
int slapi_attr_get_bervals_copy( Slapi_Attr *a,
struct berval ***vals );
Parameters This function takes the following parameters:
Attribute that contains the desired values.
a
Pointer to an array of berval structure pointers to hold the desired values.vals
Returns This function returns one of the following values:
0 if values are found.
-1 if null.
Memory concerns You should free this array using ber_bvecfree from the LDAP SDK for
C.
19.8 slapi_attr_get_flags()
Description This function gets the flags associated with the specified attribute. These flags can
identify an attribute as a single-valued attribute, an operational attribute, or as a read-only
attribute.
Syntax
#include "slapi-plugin.h"
int slapi_attr_get_flags( const Slapi_Attr *attr,
unsigned long *flags );
Parameters This function takes the following parameters:
Attribute for which you want to get the flags.
attr
When you call “slapi_attr_get_flags()”, this parameter is set to a pointer to the flags of
the specified attribute. Do not free the flags; the flags are part of the actual data in the
attribute, not a copy of the data.
flags
174 Functions for handling attributes