nfs4: Add ServerAddress comparators

This commit is contained in:
Pawel Dziepak
2012-06-29 02:14:11 +02:00
parent bb7c7ca2c4
commit 274145b3ea
@@ -25,6 +25,23 @@
KSOCKET_MODULE_DECL; KSOCKET_MODULE_DECL;
bool
ServerAddress::operator==(const ServerAddress& x)
{
return fAddress == x.fAddress && fPort == x.fPort
&& fProtocol == x.fProtocol;
}
bool
ServerAddress::operator<(const ServerAddress& x)
{
return fAddress < x.fAddress ||
(fAddress == x.fAddress && fPort < x.fPort) ||
(fAddress == x.fAddress && fPort == x.fPort &&
fProtocol < x.fProtocol);
}
Connection::Connection(const sockaddr_in& addr, Transport proto, bool markers) Connection::Connection(const sockaddr_in& addr, Transport proto, bool markers)
: :
fSock(-1), fSock(-1),