HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
24.47 slapi_entry_size()
This function returns the approximate size of an entry, rounded to the nearest 1k. This can be
useful for checking cache sizes, estimating storage needs, and so on.
Description When determining the size of an entry, only the sizes of the attribute values are
counted; the size of other entry values (such as the size of attribute names, variously-normalized
DNs, or any metadata) are not included in the size returned. It is assumed that the size of the
metadata, et al., is well enough accounted for by the rounding of the size to the next largest
1k . This holds true especially in larger entries, where the actual size of the attribute values far
outweighs the size of the metadata.
Syntax
#include "slapi-plugin.h"
size_t slapi_entry_size(Slapi_Entry *e);
Parameters This function takes the following parameter:
Entry from which you want the size returned.
e
Returns This function returns one of the following values:
The size of the entry, rounded to the nearest 1k. The value returned is a size_t data type
with a u_long value.
A size of 1k if the entry is empty.
When determining the size of the entry, both deleted values and deleted attributes are included
in the count.
24.48 slapi_is_rootdse()
This function determines if an entry is the root DSE. The root DSE is a special entry that contains
information about the Directory Server, including its capabilities and configuration.
Syntax
#include "slapi-plugin.h"
int slapi_is_rootdse ( const char *dn );
Parameters This function takes the following parameter:
The DN that you want to test to see if it is the root DSE entry.
dn
Returns This function returns one of the following values:
0
If dn is not the root DSE.
1
If dn is the root DSE.
24.49 slapi_str2entry()
Converts an LDIF description of a directory entry (a string value) into an entry of the
Slapi_Entry type.
Description A directory entry can be described by a string in LDIF format; for details, see
“Converting between entries and strings”.
Calling the slapi_str2entry() function converts a string description in this format to a
Slapi_Entry structure, which you can pass to other API functions.
24.47 slapi_entry_size() 231