24.2. slapi_entry2str_with_options()
slapi_entry2str(); however, you can specify output options with this function.
dn: dn\n [attr: value\n]*
dn: uid=jdoe, ou=People, dc=example,dc=com cn: Jane Doe sn: Doe ...
#include "slapi-plugin.h" char *slapi_entry2str_with_options( Slapi_Entry *e, int *len, int options );
This function takes the following parameters:
| e | Entry that you want to convert into an LDIF string. |
| len | Length of the LDIF string returned by this function. |
| options | An option set that specifies how you want the string converted. |
You can OR together any of the following options when you call this function:
| Flag Value | Description |
|
SLAPI_DUMP_STATEINFO
| This is only used internally by replication. This allows access to the internal data used by multi-master replication. |
|
SLAPI_DUMP_UNIQUEID
| This option is used when creating an LDIF file to be used to initialize a replica. Each entry will contain the nsuniqueID operational attribute. |
|
SLAPI_DUMP_NOOPATTRS
| By default, certain operational attributes (such as creatorName, modifiersName, createTimestamp, modifyTimestamp) may be included in the output. With this option, no operational attributes will be included. |
|
SLAPI_DUMP_NOWRAP
| By default, lines will be wrapped as defined in the LDIF specification. With this option, line wrapping is disabled. |
This function returns one of the following values:
- The LDIF string representation of the entry you specify.
NULLif an error occurs.
When you no longer need to use the string, you should free it from memory by calling the slapi_ch_free() function.

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.