HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Parameters This function takes the following parameters:
The attribute that will contain the values.
a
Values to be added to the attribute.
v
Returns This function always returns 0.
See also
“slapi_attr_first_value()”
“slapi_attr_next_value()”
“slapi_attr_get_numvalues()”
“slapi_attr_value_cmp()”
slapi_attr_value_find()
19.2 slapi_attr_basetype()
Description This function returns the base type of an attribute (for example, if given
cn;lang-jp, returns cn).
Syntax
#include "slapi-plugin.h"
char *slapi_attr_basetype( char *type, char *buf, size_t bufsiz );
Parameters This function takes the following parameters:
Attribute type from which you want to get the base type.
type
Buffer to hold the returned base type.
buf
Size of the buffer.
bufsiz
Returns This function returns NULL if the base type fits in the buffer. If the base type is longer
than the buffer, the function allocates memory for the base type and returns a pointer to it.
Memory concerns You should free the returned base type when done by calling
“slapi_attr_basetype()”.
See also
“slapi_attr_type2plugin()”
slapi_attr_get_type()
“slapi_attr_type_cmp()”
“slapi_attr_types_equivalent()”
19.3 slapi_attr_dup()
Description Use this function to make a copy of an attribute.
Syntax
#include "slapi-plugin.h"
Slapi_Attr *slapi_attr_dup(const Slapi_Attr *attr);
Parameters This function takes the following parameters:
The attribute to be duplicated.
attr
Returns This function returns the newly created copy of the attribute.
Memory concerns You must free the returned attribute using “slapi_attr_free()”.
172 Functions for handling attributes