cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Binding to interface and IP

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 7 Jul 2010 21:55:34 +0200 (CEST)

On Wed, 7 Jul 2010, Ben Greear wrote:

>>> I'm thinking of passing something like this to "eth2::192.168.1.5" to the
>>> CURLOPT_INTERFACE (and changing that code to parse it properly).
>>>
>> I do not understand your idea. Do you want to bind a socket to specific
>> address on specific interface (in case you have more interfaces with the
>> same address)?
>
> I want the SO_BINDTODEVICE logic, and I also want to set the specific

SO_BINDTODEVICE should be able to use if you just figure out which interface
that has the particular address, shouldn't you? Unless you have the same IP on
several interfaces, but that sounds like a really bizarre setup.

> address because I want to support multiple addresses on each interface.

If you figure out which interface based on the IP, won't that work?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-07