Table of Contents | Previous | Next | Index

Netscape Directory SDK 3.0 for C Programmer’s Guide
     Chapter 17 Data Types and Structures

LDAPsortkey

LDAPsortkey represents a server control used to specify that the server should sort the search results before sending them back to the client. Controls are part of the LDAP v3 protocol.

For example, you can use LDAPsortkey to specify that you want the server to sort search results by the roomNumber attribute.

LDAPsortkey is defined as follows:

typedef struct LDAPsortkey {
   char *sk_attrtype;
   char *sk_matchruleoid;
   int sk_reverseorder;
} LDAPsortkey;
The fields in this structure are described below:

sk_attrtype

Name of the attribute that you want to use for sorting.

sk_matchruleoid

Object identifier (OID) of the matching rule that you want to use for sorting.

sk_reverseorder

Specifies whether or not the results are sorted in reverse order. This field can have one of the following values:

To create an array of LDAPsortkey structures, you can call the ldap_create_sort_keylist() function.

To free an array of LDAPsortkey structures, you can call the ldap_free_sort_keylist() function.


Table of Contents | Previous | Next | Index

Last Updated: 10/01/98 17:05:28