Table of Contents | Previous | Next | Index

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

ldap_parse_reference()

Parses search references from the results received from an LDAP server.

Search references are part of the LDAP v3 protocol. When calling this function, make sure that you are working with a server that supports the LDAP v3 protocol.

Syntax

#include <ldap.h>
int ldap_parse_reference( LDAP *ld, LDAPMessage *ref,
   char ***referralsp, LDAPControl ***serverctrlsp,
   int freeit );

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.

ref

Pointer to an LDAPMessage structure of the type LDAP_RES_SEARCH_REFERENCE.

referralsp

Pointer to an array of strings representing the referrals found by an LDAP search operation and returned by the server (applicable only if the LDAP operation was a search operation).

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

serverctrlsp

Pointer to an array of LDAPControl structures, which represent the LDAP v3 server controls returned by the server.

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

freeit

Specifies whether or not to free the results of the operation (the LDAPMessage structure specified by the res argument). The parameter can have the following possible values:

Returns

One of the following values:

Description

The ldap_parse_reference() function parses the referral URLs from an LDAPMessage structure of the type LDAP_RES_SEARCH_REFERENCE.


Table of Contents | Previous | Next | Index

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