Subject: RE: draft-ietf-ipngwg-scopedaddr-format-00.txt

From: Brian Zill <[email-masked]>
Date: Sun, 7 Nov 1999 19:36:04 -0800

Jim,

> note this works with getipnodebyname by just setting sin6_scope_id to
> the value of the interface you would want to ping with link-local in
> your case and previoius mail.

I think Sam's point (or at least mine if it wasn't) is that since
getipnodebyname doesn't return a sin6_scope_id, you can't just pass it a
numeric address string (the format of which is what this thread started out
discussing) like "2/fe80::1" and get back something that has parsed the
scope_id part and put in a nice variable for you.  getaddrinfo, by virtue of
returning an addrinfo structure containing a sockaddr_in6 rather than a
hostent structure containing a in6_addr, does this.

So if you want to use getipnodebyname with numeric scoped address strings,
you have to seperately parse the address string the user gives you for
potential scope.  This is extra work, and makes it harder for a programmer
to support scoped addresses via getipnodebyname than via getaddrinfo.  And
if you want to use getipnodebyname with DNS names that correspond to scoped
addresses, you can't.

The possible courses of action I've seen proposed by various people are (I
could have forgot some):

(1) Do nothing.  Programs aren't required to be "scope aware", so
programmers who want their programs to work with scoped addresses can either
use getaddrinfo or perform the extra parsing themselves.  This has the nice
quality that we don't have to change this part of the basic API at this late
date.  It has the downside that you can't get scoped addresses out of the
DNS this way.

(2) Change getipnodebyname to return an additional out parameter which is
the scope_id of the address being returned in the hostent structure.  This
has the problem that hostents can contain multiple addresses, which might
have different scope_ids.  But for numeric address strings, the hostent will
never contain more than one address, so it wouldn't matter for them... but
many people think that we should be able to put scoped addresses in the DNS,
where this would break.

(3) Change the hostent structure to contain a scope_id field in addition to
an in6_addr field. This also has the problem with hostents containing
multiple addresses.

(4) Change the in6_addr field in hostents to a new field that groups a
scope_id field in with the 128 bit address field.  This is pretty clean, but
involves changing the basic API spec.

Oh, and unless I'm missing something, the same issue exists for inet_ntop,
inet_pton, and getipnodebyaddr.

--Brian

> thanks
> /jim
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [email-masked]
--------------------------------------------------------------------

---

From: [email-masked] (Sam Manthorpe)
Date: Sun, 7 Nov 1999 22:19:19 -0800 (PST)

Brian Zill wrote:
> scope_id part and put in a nice variable for you.  

Yes, that was my point.

> The possible courses of action I've seen proposed by various people are (I

[ snip ]

One other backwardsly compatible idea I was toying with was to
define a new flag for getipnodebyname() which, if set, indicates
that the app wants a sockaddr_in6 address rather than a `raw'
IPv6 address in the h_addr_list array.  I was pondering on just
how ugly it was before I sent it to the list, but since you bring
the subject up, there it is.

> inet_pton, and getipnodebyaddr.

Hmm, yes, I guess it does.

Thanks,
Sam.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sam Manthorpe, SGI.  tel: (650)933-2856 fax: (650)932-2856  [email-masked]
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [email-masked]
--------------------------------------------------------------------

---

From: Jim Bound <[email-masked]>
Date: Mon, 08 Nov 1999 07:45:49 -0500

brian,

other option is to have an operation to perform scoping on the field
once back from getipnodebyname.

we need to discuss this at ipng this week.

/jim

---

From: Francis Dupont <[email-masked]>
Date: Tue, 09 Nov 1999 16:13:15 +0100

In your previous mail you wrote:

   The possible courses of action I've seen proposed by various people are (I
   could have forgot some): (1-4)...

=> Brian, this is an excellent summary!

Thanks

[email-masked]

---

From: Jim Bound <[email-masked]>
Date: Tue, 09 Nov 1999 11:21:18 -0500

francis,

scoped addresses will be the exception not the norm.  

do you think oracle will use scoped addresses lets not change the api
fore the non-norm.

XNET should be doing this I am convinced reading this mail

/jim

---

From: [email-masked] (Sam Manthorpe)
Date: Tue, 9 Nov 1999 10:30:45 -0800 (PST)

> scoped addresses will be the exception not the norm.  

Agreed, but I want my apps to work the exceptions as well.

I personally hope to see scoped addresses used as little as
possible but I still want my apps to support them.

-- Sam