LDAP - is there an API

Hi,

I've just been experimenting with AIX's ldapsearch utility - I've been successfully using it to retrieve information from an Active Directory, however, I need to make similar calls from a C program.

Is there a suitable LDAP API on AIX which will give me similar capabilties to the ldapsearch utlity?

An alternative is to call ldapsearch from my program but that's not really ideal.

Thanks for looking :slight_smile:

Yes, there is a C API.

Have a look at the IBM Directory Server C-Client SDK Programming Reference Version 5.2 Document Number SC32-1341-00 or later.

It is available on the Web if you do a search for it.

Depending on the source of your ldapsearch utility OpenLDAP may be alternately applicable. OpenLDAP, Software, Man Pages: ldap

Thanks for your posts :slight_smile:

I spoke to our UNIX admin guy who located some additional ldap stuff - the LPP contained some additional directories one of which was an examples folder which contained, amongst other utilities, the source code for ldapsearch. I was able to build this quite easily and I'll modify it for my application which needs to only do specific types of search.