cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Binding to interface and IP

From: Petr Pisar <petr.pisar_at_atlas.cz>
Date: Wed, 7 Jul 2010 20:41:51 +0200

On Wed, Jul 07, 2010 at 11:02:32AM -0700, Ben Greear wrote:
> In order to support secondary IPs on an interface, I would like
> to be able to bind to both a local IP and local interface.
>
> 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)?

What about using ADDRESS "%" INTERFACE syntax that is standardized for link
scope address selecition in RFC 4007 (IPv6 Scoped Address Architecture)? BTW,
you should (I don't know state of support in curl) be able to pass outgoing
interface to request URI string with the same mechanism.

-- Petr

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

  • application/pgp-signature attachment: stored
Received on 2010-07-07