Directory Services

LDAP_SERVER_RESP_SORT_OID

The LDAP_SERVER_RESP_SORT_OID control is used by the server to indicate the results of a search function that was initiated using the LDAP_SERVER_SORT_OID control. This control is returned only by the server and should not be sent to the server by a client program.

The server returns results in the members of the LDAPControl structure as follows:

PWCHAR ldctl_oid = LDAP_SERVER_RESP_SORT_OID;
struct berval ldctl_value;
BOOLEAN ldctl_iscritical = FALSE;

Members

ldctl_oid
LDAP_SERVER_RESP_SORT_OID, which is defined as "1.2.840.113556.1.4.474".
ldctl_value
Specifies a BER-encoded sequence that indicates the results of the sorted search request (see Remarks below).
ldctl_iscritical
Returned as FALSE.

Remarks

The Response Sort control returns the status of a sorted search request previously initiated by using the LDAP_SERVER_SORT_OID control. The returned value is a BER-encoded OCTET STRING that contains the following sequence data:

Sequence {
  sortResult	ENUMERATED
  attributeType   attributeDescription (optional)
}

Client programs should use the ldap_parse_result and ldap_parse_sort_control API functions to parse the result fields of this returned control.

The sortResult enumeration is as follows:

sortResult description
success [0] results are sorted
operationsError [1] server internal error
timeLimitExceeded [3] timelimit reached before sorting was completed
strongAuthRequired [8] refused to return sorted results via insecure protocol
adminLimitExceeded [11] too many matching entries for the server to sort
noSuchAttribute [16] unrecognized attribute type in sort key
inappropriateMatching [18] unrecognized or inappropriate matching rule in sort key
insufficientAccessRights [50] refused to return sorted results to this client
busy [51] too busy to process
unwillingToPerform [53] unable to sort
other [80]

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Winldap.h.

See Also

Data Structures, LDAPMessage, Using Controls