Thanks for the answer, however the -h <URI/URL> appears to be a server (slapd) option. I'm looking for the LDAP client side which uses OpenLDAP libldap and liblber libraries.
Daniel
-----Original Message----- From: Quanah Gibson-Mount [mailto:quanah@symas.com] Sent: Thursday, May 11, 2017 11:56 AM To: Daniel Le daniel.le@exfo.com; 'openldap-technical@openldap.org' openldap-technical@openldap.org Subject: Re: Client binding to a specific local address
--On Wednesday, May 10, 2017 8:05 PM +0000 Daniel Le daniel.le@exfo.com wrote:
Hi,
Is there an API to bind client to a local IP address? If not, how best to directly handle a BER socket for such purpose? The reason is to direct traffic to go through a specific interface of a host that has multiple NICs. There is no option in ldap_set_option() for address binding. I found the thread "listener question" from the OpenLDAP Technical archives which asked a similar question, but not exactly the same.
Use the IP address as the URI, like -H ldap://1.2.3.4:389
--quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com