Subject: rfc2292bis-01 rcmd comments

From: Jean-Luc Richier <[email-masked]>
Date: Fri, 14 Jan 2000 13:30:10 +0100 (MET)

draft-ietf-ipngwg-2292bis-01.txt suggest extension to replace r-functions
with hostname argument, rexec and rcmd.
The suggestion is to add an af argument to specify the INET/INET6 family.

This solution is the same as the one of gethostbyname2.
I do not think it is sufficient. Both getipnodebyname and getaddrinfo use a
more powerful scheme: one can specify AF_INET, AF_INET6 or both.
The both case is in fact often the default and seems the right value for
rlogin, rsh: user do not care whether the remote host has an IPv4 or IPv6,
any will do.
And making two calls for IPv6 and then IPv4 is an unneeded complication.

Therefore I suggest a modification to the proposition, based on the
getaddrinfo solution:

    in addition to the AF_INET and AF_INET6 values, the af argument can take
    a special value which means AF_INET6 or AF_INET.

    I suggest AF_UNSPEC as in getaddrinfo, so this argument can be simply
    used as  value of a ai_family field of an hint argument to a call to
    getaddrinfo.
    (Other value are possible, the arg is often an int, and af values are
    from 0 to 255)

I think that this is a general concern with porting any function which use a
hostname as argument: we need a new argument to tell the AF_ family, but
AF_INET or AF_UNET6 is not enough, we need a AF_INET_ANY flag or value.
Saying that INET6 contains INET (implicitely always add the case of V4mapped
addresses) may be too strong.
A returned family value is not needed: generally a socket is reated, and 
getsokckname/getpeername can be used to find the actual family.

I have seen the same problem when porting the rpc library for functions
clnt_create, callrpc and getrpcport, and in url manipulation library.

An other concern is managing scopeid/flowinfo fields. There should be an
universal notation in address literals for this information. Also for any
function which take an ip addr as argument there should be a new one with
a sockaddr argument to specify everything : family/scope/flow ....

-- 
Jean-Luc RICHIER ([email-masked]  [email-masked])
Laboratoire Logiciels, Systemes et Reseaux (LSR-IMAG)
IMAG-CAMPUS, BP 72, F-38402 St Martin d'Heres Cedex
Tel : +33 4 76 82 72 32 Fax : +33 4 76 82 72 87
--------------------------------------------------------------------
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]
--------------------------------------------------------------------