Generates an LDIF string description of an LDAP entry.
#include "slapi-plugin.h" char *slapi_entry2str( Slapi_Entry const *e, int *len );
This function takes the following parameters:
Entry that you want to convert into an LDIF string.
Length of the returned LDIF string.
Returns the LDIF string representation of the entry you specify. If an error occurs, the function returns NULL.
This function generates an LDIF string value conforming to the following format:
dn: dn\n [attr: value\n]*
For example:
dn: uid=jdoe, ou=People, o=example.com cn: Jane Doe sn: Doe ...
To convert a string description in LDIF format to an entry of the Slapi_Entry data type, call the slapi_str2entry() function.
When you no longer need to use the string, you should free it from memory by calling the slapi_ch_free_string() function.