Table of Contents | Previous | Next | Index

Netscape Directory SDK 3.0 for C Programmer’s Guide
     Chapter 18 Functions

ldap_parse_sort_control()

Parses the result returned from a search operation that used a server control for sorting search results.

This function implements an extension to the LDAP v3 protocol. Server-side sorting is an optional LDAP server feature; it may not be supported on all LDAP servers. Call this function when interacting with LDAP servers that support this LDAP v3 extension.

Syntax

#include <ldap.h>
int ldap_parse_sort_control( LDAP *ld, LDAPControl **ctrls,
   unsigned long *result, char **attribute );

Parameters

This function has the following parameters:

ld

Connection handle, which is a pointer to an LDAP structure containing information about the connection to the LDAP server.

ctrls

An array of controls returned by the server. You obtain these controls by calling the ldap_parse_result() function on the set of results returned by the server.

result

Pointer to the sort control result code retrieved by this function.

attribute

If the sorting operation fails, the function sets this to point to the name of the attribute that caused the failure.

When done, you can free this by calling the ldap_memfree() function.

Returns

One of the following values:

Description

Call the ldap_parse_sort_control() function as part of the process of retrieving sorted search results from a server.

Call this function after receiving the results (call ldap_result() to get the results) and parsing the server controls from the results (call ldap_parse_result() to get the controls from the results).

See Also

ldap_create_sort_control().


Table of Contents | Previous | Next | Index

Last Updated: 10/01/98 17:06:23