Subject: RE: getaddrinfo

From: Brian Zill <[email-masked]>
Date: Mon, 18 Sep 2000 20:07:00 -0700

> From: Hideaki YOSHIFUJI [mailto:[email-masked]]
> 
> In article <[email-masked]> (at 
> Mon, 18 Sep 2000 20:14:40 -0400), Jim Bound <[email-masked]> says:
> 
> > >getaddrinfo("xxx:xxx::xxx", NULL, &res)
> > >
> > >should return the full results of a query to the DNS for 
> address "xxx...",
> > >and not only a struct sockaddr_in6 filled with the address 
> "xxx...", imo.
> > >is this correct?
> 
> What do you mean by "full results," Mauro?

Yes, what are you asking?  In your earlier message you asked:

> first, suppose that the nodename argument is a numeric host
> address and the flag AI_NUMERICHOST is not set. will the
> query to getaddrinfo return ALL addresses of that host? 

Are you saying that if one gives it a literal address, it should do a
reverse lookup to figure out what name that corresponds to and then do a
forward lookup to find all the addresses for that host?  Personally, I think
that's crazy!  If you want that behavior, you should use getnameinfo to get
the name, and then feed the name into getaddrinfo.  getaddrinfo shouldn't be
doing reverse lookups, that's what getnameinfo is for.  The AI_NUMERICHOST
flag should have no effect if you give getaddrinfo an address literal.  It's
purpose is to prevent DNS lookups in the case where you don't give
getaddrinfo an address literal.

> > Yes.  
> Really?

I sure hope not.  I vote No.

--Brian

> -- 
> Hideaki YOSHIFUJI @ USAGI Project  <[email-masked]>
> Web Page: http://www.ecei.tohoku.ac.jp/%7Eyoshfuji/
> PGP5i FP: F731 6599 5EB2 BBA7 1515  1323 1806 A96F 5700 6B25 
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------
> 
--------------------------------------------------------------------
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, 18 Sep 2000 23:29:12 -0400

Brian,

Let me clarify.  I think its crazy too.  But what I was beaten in to
believe and I think XNET was too is that implementors want this?

/jim

---

From: Jim Bound <[email-masked]>
Date: Tue, 19 Sep 2000 02:11:52 -0400

the problem is there is nothing that says you can't do it.

thats why my long winded mail about these are classic API issues not
network issues.

/jim

---

From: Vladislav Yasevich <[email-masked]>
Date: Tue, 19 Sep 2000 10:14:28 -0400

> believe and I think XNET was too is that implementors want this?

Jim

Really?  Every implementation I know of (the ones I've seen the code to)
do exacatly what Brian described, that is just translate the address to 
binary and return it.

I agree with Brian that getaddrinfo() should not do reverse lookups.
That is what getnameinfo() is for.  Adding this would makes this
function even more bloated then it already is and add more state
information to keep track of.

I vote "no" to this.

-vlad

++++++++++++++++++++++++++++++++++++++++++++++++++++
Vladislav Yasevich		Tel: (603) 884-1079
Compaq Computer Corp.		Fax: (435) 514-6884
110 Spit Brook Rd ZK03-3/T07
Nashua, NH 03062
--------------------------------------------------------------------
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: Tue, 19 Sep 2000 11:50:02 -0400

Vlad,

You miss the point completely.  I agree with you but nothing in the
curent wording in the spec "prevents" it from being interrupted that
way.  The getnameinfo() is the best argument thus far.

regards,
/jim

---

From: Stig Venaas <[email-masked]>
Date: Tue, 19 Sep 2000 07:59:28 +0200

> believe and I think XNET was too is that implementors want this?

Yes, this sounds crazy to me as well. I can't see why someone wants
this, I've also carefully checked the specs (also XNET) and I can't
find anything saying this should be possible.

Stig

---

From: Mauro Tortonesi <[email-masked]>
Date: Tue, 19 Sep 2000 19:06:56 +0200 (CEST)

> getaddrinfo an address literal.

i am not as expert as you are, but if you read the latest draft-rfc2553bis
with a bit of logic, you will find that my interpretation of the text is
not wrong ;)

please, would you tell me why you consider this a bad behaviour? thank
you.

-- 
Aequam memento rebus in arduis servare mentem...

Mauro Tortonesi			[email-masked]
Ferrara Linux User Group	http://www.ferrara.linux.it
Project6 - IPv6 for Linux	http://project6.ferrara.linux.it

---

From: Vladislav Yasevich <[email-masked]>
Date: Tue, 19 Sep 2000 13:55:14 -0400

Stig

After Jim told me that I missed his point, I went back through XNET 5.2
and 2553-bis and they are both very vague on the issue (not the fault of
2553-bis since it tryes to use the same wording as XNET 5.2).  There is
nothing there that says it should be possible. There is nothing there
that says that this should NOT be possible either.

IMHO, this is yet another one of those ambiguities that needs to be clarified by
XNET (not the api draft).

-vlad