20.23. slapi_get_first_suffix()

Description

This function returns the first root suffix of the DIT. If you wish to iterate through all of the suffixes, use this function in conjunction with slapi_get_next_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_first_suffix(void ** node, int show_private);

Parameters

This function takes the following parameter:

node Contains the returned valued, which is the DN of the first root suffix of the DIT.
show_private 0 checks only for non-private suffixes.1 checks for both private and non-private suffixes.
Returns

This function returns the DN of the first root suffix.

Memory Concerns

You should not free the returned pointer.