go to  ForumEasy.com   
LdapPro  
 
 
   Home  |  MyForum  |  FAQ  |  Archive    You are not logged in. [Login] or [Register]  
Forum Home » LDAP RFCs & SPECs » LDAP Search Paged Results Control -- RFC 2696
Email To Friend  |   Set Alert To This Topic Rewarding Points Availabe: 0 (What's this) New Topic  |   Post Reply
Author Topic: LDAP Search Paged Results Control -- RFC 2696
SteveHB
member
offline   
 
posts: 113
joined: 05/31/2006
from: Mountain View, CA
  posted on: 09/01/2006 03:34:10 PM    Edit  |   Quote  |   Report 
LDAP Search Paged Results Control -- RFC 2696

http://www.ietf.org/rfc/rfc2696

This document describes an LDAPv3 control extension for simple paging of search results. This control extension allows a client to control the rate at which an LDAP server returns the results of an LDAP search operation. This control may be useful when the LDAP client has limited resources and may not be able to process the entire result set from a given LDAP query, or when the LDAP client is connected over a low-bandwidth connection. Other operations on the result set are not defined in this extension. This extension is not designed to provide more sophisticated result set management.

 Profile | Reply Points Earned: 0
SteveHB
member
offline   
 
posts: 113
joined: 05/31/2006
from: Mountain View, CA
  posted on: 09/01/2006 03:41:15 PM    Edit  |   Quote  |   Report 
LDAP Protocol

   This control is included in the searchRequest and searchResultDone
   messages as part of the controls field of the LDAPMessage, as defined
   in Section 4.1.12 of [LDAPv3]. The structure of this control is as
   follows:

pagedResultsControl ::= SEQUENCE {
        controlType     1.2.840.113556.1.4.319,
        criticality     BOOLEAN DEFAULT FALSE,
        controlValue    searchControlValue
}

The searchControlValue is an OCTET STRING wrapping the BER-encoded
version of the following SEQUENCE:

realSearchControlValue ::= SEQUENCE {
        size            INTEGER (0..maxInt),
                                -- requested page size from client
                                -- result set size estimate from server
        cookie          OCTET STRING
}



 Profile | Reply Points Earned: 0
SteveHB
member
offline   
 
posts: 113
joined: 05/31/2006
from: Mountain View, CA
  posted on: 09/01/2006 03:43:30 PM    Edit  |   Quote  |   Report 
Client-Server Interaction Example
The following example illustrates the client-server interaction between a client doing a search requesting a page size limit of 3. The entire result set returned by the server contains 5 entries. Lines beginning with "C:" indicate requests sent from client to server. Lines beginning with "S:" indicate responses sent from server to client. Lines beginning with "--" are comments to help explain the example.

   -- Client sends a search request asking for paged results
   -- with a page size of 3.
   C: SearchRequest + pagedResultsControl(3,"")
   -- Server responds with three entries plus an indication
   -- of 5 total entries in the search result and an opaque
   -- cooking to be used by the client when retrieving subsequent
   -- pages.
   S: SearchResultEntry
   S: SearchResultEntry
   S: SearchResultEntry
   S: SearchResultDone + pagedResultsControl(5, "opaque")
   -- Client sends an identical search request (except for
   -- message id), returning the opaque cooking, asking for
   -- the next page.
   C: SearchRequest + PagedResultsControl(3, "opaque")
   -- Server responds with two entries plus an indication
   -- that there are no more entries (null cookie).
   S: SearchResultEntry
   S: SearchResultEntry
   S: SearchResultDone + pagedResultsControl(5,"")



 Profile | Reply Points Earned: 0
SteveHB
member
offline   
 
posts: 113
joined: 05/31/2006
from: Mountain View, CA
  posted on: 10/23/2006 03:45:09 PM    Edit  |   Quote  |   Report 
LDAP Search Paged Results Control Code Example

A LDAP Search Paged Results Control Code Example can be found at the following:

http://www.forumeasy.com/forums/thread.jsp?tid=115756126876&fid=ldapprof2&highlight=LDAP+Search+Paged+Results+Control

 Profile | Reply Points Earned: 0
SteveHB
member
offline   
 
posts: 113
joined: 05/31/2006
from: Mountain View, CA
  posted on: 03/06/2007 03:01:15 PM    Edit  |   Quote  |   Report 
Which Server Supports Search Paged Results Control?
In order to know if a specific server supports Search Paged Results Control, you can query the root DSE of the server for attribute supportedControl with value of 1.2.840.113556.1.4.319.

Microsoft Active Directory (2000 and 2003) supports Search Paged Results Control.

SunOne Directory Server does not supports Search Paged Results Control but it supports Virtual List View Control instead.

 Profile | Reply Points Earned: 0

 
Powered by ForumEasy © 2003-2005, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.