On 5/4/04 4:52 pm, Peter Marschall <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> On Monday 05 April 2004 17:31, Safford, Brian wrote:
>> I have a multi-homed host, and I need to be able to specify an IP address
>> or local host name to use for the connection to the LDAP server in my $ldap
>> = Net::LDAP new () statement ... is this possible?  I don't see a 'bindip'
>> or similar argument in the documentation.
> 
> Quite simple. Do
> 
> $ldap = Net::LDAP->new('IP.AD.DR.ESS', ...);
> 
> where IP.AD.DR.ESS is the IP address you want to connect to.
> If this IP address has a specific DNS entry you can use that as well.
> 
> Peter

I'm not sure, but I think Brian wants to set the local address that his
connections come from, rather than the address of the remote server.

I don't think this is currently possible, although the underlying
IO::Socket::INET object supports the setting of 'LocalAddr'. You could
override the Net::LDAP->connect_ldap method in your code and set whatever
you want in there, though that would be an ugly hack and not something
anyone would advise :-)

OTOH, perhaps Brian's missing the 'multihomed' => 1 arguments to
Net::LDAP->new(), which means you can pass a reference to an array of hosts
to connect to, rather than a single scalar.

So many interpretations... ;-)

Cheers,

Chris

Reply via email to