[haiku-commits] Re: BRANCH pdziepak-github.nfs4 - src/add-ons/kernel/file_systems/nfs4

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 12 Jul 2012 20:00:04 +0200

On 12.07.2012 19:35, Pawel Dziepak wrote:
Out of curiosity: what are the fPort/fProtocol fields used for?
ServerAddress is used to identify a RPCServer object when a NFS4 file
system is mounted (one connection per server, doesn't matter how many
file systems are mounted). Since NFS4 supports both TCP and UDP the
client needs to know which transport protocol RPCServer object uses.
fPort was removed in commit 137884e.

Okay, but fProtocol could probably removed then as well, as it's part of the sockaddr structure as well.

I will add ServerAddress::Size() as well as some accessors (for
example ServerAddress::Port()) since ServerAddress implementation is
much better place to deal with the internals of sockaddr_* structures
than, for example RequestBuilder::_GenerateClientId().

Yep, sounds good.

Maybe ServerAddress could be a light-weight version mix of
BNetworkAddress/BNetworkAddressResolver instead? And since there is nothing
server specific about ServerAddress, the class could then be renamed, too
:-)
As I said before ServerAddress is used as server identifier not only a
structure to store IP address.

That actually doesn't really matter, as it actually only is a network address, right? I mean, I wouldn't call a File class Image just because I use it in that context. If it provides any functions out of the scope of a generic network address class, that would be something different, of course, but I must admit I don't know much about it :-)

Bye,
   Axel.

Other related posts: