Added isPrefixEqual, fixed unit test bug, fixed ipv6 bind bug

This commit is contained in:
Joseph Henry
2017-05-03 21:12:26 -07:00
parent bb6d9d5f8c
commit 64f2634960
7 changed files with 50 additions and 30 deletions

View File

@@ -347,6 +347,16 @@ struct InetAddress : public sockaddr_storage
*/
InetAddress network() const;
#ifdef ZT_SDK
/**
* Test whether this IPv6 prefix matches the prefix of a given IPv6 address
*
* @param addr Address to check
* @return True if this IPv6 prefix matches the prefix of a given IPv6 address
*/
bool isEqualPrefix(const InetAddress &addr) const;
#endif
/**
* Test whether this IP/netmask contains this address
*