Subject: [nfsv4] [RFC1833 rpcbind/portmap]: GETADDR vs GETVERSADDR ...

From: dhawal bhagwat <[email-masked]>
Date: Wed, 15 Apr 2009 21:01:52 +0530 (IST)

Hi all,

Am trying to understand what is the difference between the GETADDR and 
GETVERSADDR procedures defined in RFC1833 (rpcbind/portmap).  (Texts 
pasted below.)

Other than the difference in text, both seem to be saying that the r_vers 
field in the call will be used to tell the server which version the client 
is interested in.

Due to the more explicit statement in case of GETVERSADDR, is it that for 
GETADDR, the server should be ignoring the value in the r_vers field, and 
just returning info for any version ?

thanks,

-dhawal.

=== begin ===

    RPCBPROC_GETADDR:

    Given a program number "r_prog", version number "r_vers", and network
    identifier  "r_netid", this procedure returns the universal address
    on which the program is awaiting call requests.  The "r_netid" field
    of the argument is ignored and the "r_netid" is inferred from the
    network identifier of the transport on which the request came in.

    RPCBPROC_GETVERSADDR:

    This procedure is similar to RPCBPROC_GETADDR.  The difference is the
    "r_vers" field of the rpcb structure can be used to specify the
    version of interest.  If that version is not registered, no address
    is returned.

==== end ====

---

From: Nicolas Williams <[email-masked]>
Date: Wed, 15 Apr 2009 11:14:17 -0500

> field in the call will be used to tell the server which version the client 

GETADDR returns all registrations regardless of version.  GETVERSADDR
returns registrations only for r_vers.  At least that's what the Solaris
implementation does.

---

From: Nicolas Williams <[email-masked]>
Date: Wed, 15 Apr 2009 11:28:28 -0500

> returns registrations only for r_vers.  At least that's what the Solaris

Er, actually, it's more like: GETADDR the first registration found
regardless of r_vers, while GETVERSADDR returns the registration that
matches r_vers or none at all.

---

From: dhawal bhagwat <[email-masked]>
Date: Fri, 17 Apr 2009 20:18:39 +0530 (IST)

Noted.

A quick check on opensolaris.org suggests (for GETADDR) it returns a 
exact version match if found, otherwise, a match irrespective of the 
version.  And NULL, otherwise.

And for GETVERSADDR, same as you said.

thanks,

-{db}.

>} Date: Wed, 15 Apr 2009 11:28:28 -0500
>} From: Nicolas Williams <[email-masked]>
>} To: dhawal bhagwat <[email-masked]>
>} Cc: [email-masked]
>} Subject: Re: [nfsv4] [RFC1833 rpcbind/portmap]: GETADDR vs GETVERSADDR ...
>} 
>} On Wed, Apr 15, 2009 at 11:14:17AM -0500, Nicolas Williams wrote:
>} > On Wed, Apr 15, 2009 at 09:01:52PM +0530, dhawal bhagwat wrote:
>} > > Other than the difference in text, both seem to be saying that the r_vers 
>} > > field in the call will be used to tell the server which version the client 
>} > > is interested in.
>} > 
>} > GETADDR returns all registrations regardless of version.  GETVERSADDR
>} > returns registrations only for r_vers.  At least that's what the Solaris
>} > implementation does.
>} 
>} Er, actually, it's more like: GETADDR the first registration found
>} regardless of r_vers, while GETVERSADDR returns the registration that
>} matches r_vers or none at all.
>} _______________________________________________
>} nfsv4 mailing list
>} [email-masked]
>} https://www.ietf.org/mailman/listinfo/nfsv4
>}