draft-ietf-ipngwg-rfc2553bis-04.txt section 6.2 states:
The flags argument is a flag that changes the default actions of the
function. By default the fully-qualified domain name (FQDN) for the host
shall be returned, but:
- If the flag bit NI_NOFQDN is set, only the node name portion of the
FQDN shall be returned for local hosts.
- If the flag bit NI_NUMERICHOST is set, the numeric form of the
host's address shall be returned instead of its name, under all
circumstances.
- If the flag bit NI_NAMEREQD is set, an error shall be returned if the
host's name cannot be located.
- If the flag bit NI_NUMERICSERV is set, the numeric form of the
service address shall be returned (for example, its port number)
instead of
its name, under all circumstances.
- If the flag bit NI_NUMERICSCOPE is set, the numeric form of the
scope identifier shall be 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 shall assume that
the service is a stream service (SOCK_STREAM).
So what if NI_NUMERICHOST is not set and NI_NAMEREQD is not set.
Getnameinfo attempts to resolve the name via DNS query and scan of the
local files. If the host name is not resolved, do we return the numeric
form or an error?
Also, if NI_NUMERICSERV is not set, getnameinfo calls getservbyport to scan
the local service name file and if the service name is not resolved we
return the numeric form. So, how can the application calling getnameinfo
determine that the resolution of the service name failed since it can
receive the numeric form regardless of NI_NUMERICSERV setting. It would
have to determine that numeric form was returned and NI_NUMERICSERV had not
been specified. There doesn't seem to be a service name equivalent of
NI_NAMEREQD. Should getnameinfo return the numeric form of the service
name if name resolution fails or should we return an error?
Lori
919-254-6146 T/L 8-444-6146
E-mail: [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]
--------------------------------------------------------------------