20.22. slapi_get_first_backend()
This function returns a pointer to the backend structure of the first backend. If you wish to iterate through all of the backends, use this function in conjunction with slapi_get_next_backend(). For example:
Slapi_Backend *be = NULL;
char *cookie = NULL;
be = slapi_get_first_backend (&cookie);
while (be )
{
...
be = slapi_get_next_backend (cookie);
}
slapi_ch_free ((void**)&cookie);
#include "slapi-plugin.h" Slapi_Backend* slapi_get_first_backend(char **cookie);
This function takes the following parameter:
| cookie | Output parameter containing the index of the returned backend. This is useful for calls to slapi_get_next_backend(). Contains 0 in output if no backend is returned. |
This function returns one of the following values:
- A pointer to the backend structure of the first backend and its index in the
cookieparameter. NULLif there is no backend.
Free the cookie parameter after the iteration using slapi_ch_free().

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.