summaryrefslogtreecommitdiff
path: root/node/InetAddress.hpp
diff options
context:
space:
mode:
authorGrant Limberg <glimberg@gmail.com>2015-06-30 19:23:23 -0700
committerGrant Limberg <glimberg@gmail.com>2015-06-30 19:23:23 -0700
commitd853dbf2d88d4c7b0016e4416b7d046801e4f65a (patch)
tree6e6e859a3da842b6158f04a2b110d0ed735eb9e8 /node/InetAddress.hpp
parentaee8e95d4961195b3251bcc8581677a8f0c0cdd8 (diff)
parent0cbbcf288455b8657134bf5be0861232daa6c7d9 (diff)
downloadinfinitytier-d853dbf2d88d4c7b0016e4416b7d046801e4f65a.tar.gz
infinitytier-d853dbf2d88d4c7b0016e4416b7d046801e4f65a.zip
Merge branch 'adamierymenko-dev' into android-jni
Diffstat (limited to 'node/InetAddress.hpp')
-rw-r--r--node/InetAddress.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/node/InetAddress.hpp b/node/InetAddress.hpp
index 16e3f4d5..35fd4314 100644
--- a/node/InetAddress.hpp
+++ b/node/InetAddress.hpp
@@ -344,6 +344,17 @@ struct InetAddress : public sockaddr_storage
inline void zero() throw() { memset(this,0,sizeof(InetAddress)); }
/**
+ * Check whether this is a network/route rather than an IP assignment
+ *
+ * A network is an IP/netmask where everything after the netmask is
+ * zero e.g. 10.0.0.0/8.
+ *
+ * @return True if everything after netmask bits is zero
+ */
+ bool isNetwork() const
+ throw();
+
+ /**
* @return True if address family is non-zero
*/
inline operator bool() const throw() { return (ss_family != 0); }