Table of Contents | Previous | Next | Index

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

ldap_is_ldap_url()

The ldap_is_ldap_url() function determines whether or not a URL is an LDAP URL. An LDAP URL is a URL with the protocol set to ldap:// (or ldaps://, if the server is communicating over an SSL connection).

For more information, see "Determining If a URL is an LDAP URL" on page 248.

Syntax

#include <ldap.h>
int ldap_is_ldap_url( char *url );

Parameters

This function has the following parameters:

url

The URL that you want to check.

Returns

One of the following values:

Example

The following section of code determines if a URL is an LDAP URL.

#include <stdio.h>
#include <ldap.h>
...
char *my_url = "ldap://ldap.netscape.com/o=Airius.com";
...
if ( ldap_is_ldap_url( my_url ) != 0 ) {
   printf( "%s is an LDAP URL.\n", my_url );
} else {
   printf( "%s is not an LDAP URL.\n", my_url );
}
...

See Also

ldap_url_parse().


Table of Contents | Previous | Next | Index

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