cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_SCOPE

From: Phil Blundell <pb_at_reciva.com>
Date: Fri, 11 Jul 2008 19:44:13 +0100

On Fri, 2008-07-11 at 10:34 -0700, Dan Fandrich wrote:
> On Fri, Jul 11, 2008 at 11:19:31AM +0100, Phil Blundell wrote:
> > +.IP CURLOPT_ADDRESS_SCOPE
> > +Pass an unsigned int specifying the scope_id value to use when
> > +connecting to IPv6 link-local or site-local addresses.
>
> Don't you mean zone_id instead of scope_id?

Hm, dunno. By "the scope_id value", I was intending to convey that this
value maps 1:1 onto the sin6_scope_id field in struct sockaddr_in6
(RFC2553 section 3.3). I'm not sure that application authors will
necessarily be familiar with the "zone_id" terminology, though I imagine
most people will be able to figure it out.

> RFC4007 states that implementations may use non-integer zone IDs. If curl
> is ever to be used on such a system, this interface type should be
> relaxed into an arbitrary URL-encoded string and only converted to an
> integer when stored into the struct sockaddr_in6.

True, but RFC4007 does additionally say that "implementations choosing
to follow the recommended basic API will want to restrict their index
values to those that can be represented by the sin6_scope_id field of
the sockaddr_in6 structure". Since libcurl doesn't have any support for
any other IPv6 API, and as far as I know there's no plan to add such in
the foreseeable future, using an int here doesn't seem that
unreasonable.

p.
Received on 2008-07-11