[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: openldap and network connection

At 05:28 PM 2001-11-01, Marko Samastur wrote:
>I deeply apologize, if I'm sending this email to the wrong list. If 
>someone can direct me in the right direction, I'd really appreciate it.

The openldap-software list is actually the most appropriate
list for discussing how to use OpenLDAP Software, including
APIs.  http://www.openldap.org/lists/
Please direct future posts appropriate.

>To effectively integrate ldap client in existing architecture, I'd need 
>to handle TCP socket myself. But if I'm reading openldap library 
>sources correctly, OpenLDAP takes care of that. Is there a way that I 
>could use OpenLDAP for "speaking the protocol" without using its 
>network facilities (of which I could take care on my own)?

You can manage your own event loop, but it's more difficult
to manage your own network input/output.  Use LDAP_OPT_DESC
to grab the socket description, use your own select(2) (or
poll(2)), and call ldap_result(3) in poll mode.

>If I'm not mistaken ldap_int_open_connection, which is used fairly deep 
>in ldap_bind calls, decides between TCP and Unix socket based on URL 
>(ldap for TCP and ldapi for Unix). Is that right? Since it's not a 
>documented function, can it be relied on that it will stay there and 
>work in this way in the future?

No.  It's an internal function and should not called directly.