HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Parameters This function takes the following parameter:
A null-terminated string used to initialize the newly-allocated Slapi_Value structure.s
Returns This function returns a pointer to a newly allocated Slapi_Value structure. If space
cannot be allocated (for example, if no virtual memory exists), the slapd program terminates.
Memory concerns The value should be freed by the caller, using “slapi_value_free()”.
See also
“slapi_value_free()”
“slapi_value_new()”
“slapi_value_dup()”
42.19 slapi_value_new_value()
Description This function returns a Slapi_Value structure containing a value duplicated
from the Slapi_Value structure passed as the parameter. This function is identical to
“slapi_value_dup()”.
Syntax
#include "slapi-plugin.h"
slapi_value_new_value(const Slapi_Value *v);
Parameters This function takes the following parameter:
Pointer to the Slapi_Value structure used to initialize the newly allocated
Slapi_Value.
v
Returns This function returns a pointer to the newly allocated Slapi_Value. If space cannot
be allocated (for example, if no more virtual memory exists), the slapd program will terminate.
Memory concerns When you are no longer using the value, you should free it from memory
by calling the “slapi_value_free()” function.
See also
“slapi_value_dup()”
“slapi_value_free()”
42.20 slapi_value_set()
Description This function sets the value in the Slapi_Value structure. The value is a duplicate
of the data pointed to by val and of the length len.
Syntax
#include "slapi-plugin.h"
slapi_value_set( Slapi_Value *value, void *val, unsigned long len);
Parameters This function takes the following parameters:
Pointer to the Slapi_Value in which to set the value.value
Pointer to the value.
val
Length of the value.
len
Returns This function returns a pointer to the Slapi_Value with the valueset.
Memory concerns If the pointer to the Slapi_Value structure is NULL, then nothing is done,
and the function returns NULL. If the Slapi_Value structure already contains a value, it is freed
from memory before the new one is set.
342 Functions for handling values