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

Steve Hawley wrote:
> 
> 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 PROTECTED]
> 
> --------------------------------------------------------------------
> 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 PROTECTED]
> --------------------------------------------------------------------

-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++
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 PROTECTED]
--------------------------------------------------------------------

Reply via email to