added isEqualPrefix to InetAddress

This commit is contained in:
Joseph Henry 2017-05-04 15:25:48 -07:00
parent 6bb855873d
commit ceeb8ee0bc
2 changed files with 34 additions and 0 deletions

View file

@ -355,6 +355,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
*