Table of Contents | Previous | Next | Index

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

ldap_create_virtuallist_control()

Creates a control that requests a subset of search results for use in a virtual list box.

This function implements an extension to the LDAP v3 protocol. Virtual list view 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_create_virtuallist_control( LDAP *ld,
   LDAPVirtualList *ldvlistp, LDAPControl **ctrlp );

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.

ldvlistp

Pointer to an LDAPVirtualList structure that specifies the subset of entries that you want retrieved from the server and the selected entry.

ctrlp

Pointer to a pointer to an LDAPControl structure that will be created by this function. When you are done using this control, you should free it by calling the ldap_control_free() function.

Returns

One of the following values:

Description

The ldap_create_virtuallist_control() function allows you to retrieve a subset of entries from the server for use in a virtual list box. Calling this function creates an LDAP control that you can pass to the ldap_search_ext() and ldap_search_ext_s() functions.

Note that you also need to pass a server-side sorting control to the search functions. You can call the ldap_create_sort_keylist() and ldap_create_sort_control() functions to create a server-side sorting control.

In order for the virtual list view control to work, the LDAP server that you are connecting to must support the server control for sorting search results (OID 2.16.840.1.113730.3.4.9, or LDAP_CONTROL_VLVREQUEST, as defined in ldap.h).

At this point in time, no server supports this control. (The Netscape Directory Server 3.x does not support this control, although future releases of the Directory Server plan to support it.) For information on determining if a server supports this or other LDAP v3 controls, see "Determining If the Server Supports LDAP v3" on page 264.

To specify the subset of entries that you want to retrieve, create an LDAPVirtualList structure and pass in a pointer to this structure as the ldvlistp argument.

When you are done with the search, you should free the control by calling the ldap_control_free() function.

For more information about this control, see "Using the Virtual List View Control" on page 304.

See Also

LDAPVirtualList, ldap_parse_virtuallist_control(), ldap_search_ext(), ldap_search_ext_s(), ldap_control_free().


Table of Contents | Previous | Next | Index

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