Subject: Basic Socket Interface Extensions for IPv6, <draft-ietf-ipngwg-rfc2553bis-03.txt>

From: "Steve Hawley" <[email-masked]>
Date: Fri, 13 Apr 2001 09:54:00 -0400

Some questions have arisen from examination of section 6, the getnameinfo
sub-section
of the draft. This sub-section describes flags controlling the actions to
be taken by the
function:

    - If the flag bit NI_NUMERICSCOPE is set, the numeric form of the
       scope identifier is returned (for example, interface index)
       instead of its name.  This flag is ignored if the sa argument is
       not an IPv6 address.

     - If the flag bit NI_DGRAM is set, this indicates that the service is
       a datagram service (SOCK_DGRAM). The default behavior is to assume
   that
       the service is a stream service (SOCK_STREAM).

NI_NUMERICSCOPE is confusing.  The draft does not mention NI_WITHSCOPEID.
Earlier
implementations of getnameinfo contain reference to NI_WITHSCOPEID which
specifies
that scope is to be returned.  If NI_WITHSCOPEID is specified in flags then
NI_NUMERICSCOPE
makes sense.  The scope is to be returned in numeric form.  In the draft's
current form,
NI_NUMERICSCOPE seems to be a vestige, something that should have been
removed but
wasn't.  At the moment IBM does not plan to include NI_NUMERICSCOPE in our
implementation
of getnameinfo.  Comments on this interpretation of the draft would be
appreciated.

Further, can anyone elaborate on the meaning of NI_DGRAM.  The draft does
not provide an
explanation of what this flag means.  Again thanks for any comments.

Steve Hawley
cs/390 development, IBM
[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: Vladislav Yasevich <[email-masked]>
Date: Thu, 19 Apr 2001 16:50:06 -0400

Hello Steve

The way I understand it, NI_NUMERICSCOPE applies to sin6_scope_id the same
way as NI_NUMERICHOST applies to sin6_addr.  By specifying NI_NUMERICSCOPE
flag, the conversion of sin6_scope_id to the 'zone[scope] name' will not take
place and a numeric scope id will be returned with the name.
	ex: sin6_addr = fe80::1
	    sin6_scope_id = 1;

	return values:
	some-name%link = NI_NUMERICSCOPE is not set
	some-name%1	= NI_NUMERICSCOPE is set

This flag should not have any effect if the sin6_scope_id is not set.

NI_DGRAM flag is used to distinguish between datagram/UDP and stream/TCP
services.
Since different services may reside on the same port (one UDP and one TCP), it
is necessary when doing a port-to-service mapping to know the transport
protocol.
So, by default getnaminfo() assumes that transport is TCP, but if you specify
NI_DGRAM, it will use UDP to figure out the name for the service.

I am not sure, but I think NI_WITHSCOPEID was never in the draft.  It was
proposed
at least on the apifolks list, but not incorporated.  I believe BSD and Linux
implement this flag.

-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: [email-masked]
Date: Fri, 20 Apr 2001 08:22:45 +0900

>NI_NUMERICSCOPE is confusing.  The draft does not mention
>NI_WITHSCOPEID.  Earlier implementations of getnameinfo contain
>reference to NI_WITHSCOPEID which specifies that scope is to be
>returned.  If NI_WITHSCOPEID is specified in flags then NI_NUMERICSCOPE
>makes sense.  The scope is to be returned in numeric form.  In the
>draft's current form, NI_NUMERICSCOPE seems to be a vestige,
>something that should have been removed but wasn't.  At the moment
>IBM does not plan to include NI_NUMERICSCOPE in our implementation
>of getnameinfo.  Comments on this interpretation of the draft would
>be appreciated.

	NI_NUMERICSCOPE is introduced as there can be systems which use
	symbolic representation for scopeid.  for example, notations like
	the following is acceptable:
		fe80::1%loopback
		fe80::1%ether0

	in such case, you will want to selectively get numeric representation
	in scopeid portion, or textual representation, depending on
	NI_NUMERICSCOPE.

	draft-ietf-ipngwg-scoping-arch-02.txt has more details on this topic.

>not provide an explanation of what this flag means.  Again thanks for any
>comments.

	with NI_DGRAM: getservbyname(foo, "udp")
	without NI_DGRAM: getservbyname(foo, "tcp")

itojun

---

From: [email-masked]
Date: Fri, 20 Apr 2001 08:25:53 +0900

>	without NI_DGRAM: getservbyname(foo, "tcp")

	oops, getservbyport.

itojun