February 2000
Intermediate to advanced
720 pages
15h 26m
English
The first SDK to provide client access to LDAP was developed for the C language at the University of Michigan. The API of this C SDK was formalized in RFC 1823. Netscape extended the C API to support all features of LDAPv3 and made the source code publicly available through Mozilla.org in 1998. The following is an example of a program written with the C SDK. The program performs a simple search for all people with the surname Jensen:
#include "ldap.h" int main( int argc, char **argv ) { LDAP *ld; LDAPMessage *result, *e; BerElement *ber; char *a, *dn; char **vals; int i; /* get a handle to an LDAP connection */ if ( (ld = ldap_init("localhost", 389 )) == NULL ) { perror("ldap_init" ); return( 1 ); } /* ...Read now
Unlock full access