HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
20.24 slapi_get_next_back end()
Description This function returns a pointer to the next back end. If you wish to iterate through
all the back ends, use this function in conjunction with “slapi_get_first_back end()”. For example:
Slapi_Back end *be = NULL;
char *cookie = NULL;
be = slapi_get_first_back end (&cookie);
while (be ) {
...
be = slapi_get_next_back end (cookie);
}
slapi_ch_free ((void**)&cookie);
Syntax
#include "slapi-plugin.h"
Slapi_Back end* slapi_get_next_back end(char *cookie);
Parameters This function takes the following parameter:
Upon input, contains the index from which the search for the next back end is done.
Upon output, contains the index of the returned back end.
cookie
Returns This function returns one of the following values:
A pointer to the next back end, if it exists, and updates the cookie parameter.
NULL, and cookie is not changed.
Memory concerns Free the cookie parameter after the iteration using slapi_ch_free().
See also
“slapi_get_first_back end()”
“slapi_ch_free()”
20.25 slapi_get_next_suffix()
Description This function returns the DN of the next root suffix of the DIT. If you wish to iterate
through all the suffixes, use this function in conjunction with “slapi_get_first_suffix()”. For
example:
void *node = NULL;
Slapi_DN * suffix = slapi_get_first_suffix (&node, 1);
while (suffix) {
...
suffix = slapi_get_next_suffix (&node, 1);
}
Syntax
#include "slapi-plugin.h"
Slapi_DN * slapi_get_next_suffix(void ** node, int show_private);
Parameters This function takes the following parameter:
0 checks only for non-private suffixes.
1 checks for both private and non-private suffixes.
show_private
Contains the returned valued, which is the DN of the next root suffix of the DIT.
node
Returns This function returns one of the following values:
The DN of the next root suffix of the DIT.
NULL if there are more suffixes to parse.
Memory concerns You should not free the returned pointer.
20.24 slapi_get_next_back end() 191