From ceeb8ee0bcd591d79dc61a684ede2c9cae91323c Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Thu, 4 May 2017 15:25:48 -0700 Subject: added isEqualPrefix to InetAddress --- node/InetAddress.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'node/InetAddress.hpp') diff --git a/node/InetAddress.hpp b/node/InetAddress.hpp index 0975a9cf..4cb9a4dc 100644 --- a/node/InetAddress.hpp +++ b/node/InetAddress.hpp @@ -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 * -- cgit v1.2.3