Sun Directory Server Enterprise Edition 7.0 Developer's Guide

Converting a Slapi_Entry Structure to an LDIF String

You can achieve this type of conversion by using slapi_entry2str(). This function takes as its two arguments the entry to convert and an int to hold the length of the string that is returned. The function returns a char * to the LDIF if successful, NULL otherwise, as shown in Example 38–3.