summaryrefslogtreecommitdiff
path: root/node/InetAddress.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2014-08-12 17:20:34 -0700
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2014-08-12 17:20:34 -0700
commitf8d4611d15b18bf505de9ca82d74f5102fc57024 (patch)
tree731d0e6e1f808c227f1e82eaa15c238a3fa437a1 /node/InetAddress.hpp
parentf25bd41a03561b960622fefd9ab22a03010e9733 (diff)
downloadinfinitytier-f8d4611d15b18bf505de9ca82d74f5102fc57024.tar.gz
infinitytier-f8d4611d15b18bf505de9ca82d74f5102fc57024.zip
(1) Tweak LAN locator beacon frequencies, (2) Windows virtual networks
now show up as *real* networks and prompt the user to set their location and firewall status (public, private, home/work, etc.). The hack used to achieve #2 should not be examined by children or those suffering from epilepsy or heart conditions.
Diffstat (limited to 'node/InetAddress.hpp')
-rw-r--r--node/InetAddress.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/node/InetAddress.hpp b/node/InetAddress.hpp
index 74e42670..7cfb1abe 100644
--- a/node/InetAddress.hpp
+++ b/node/InetAddress.hpp
@@ -77,6 +77,16 @@ public:
*/
static const InetAddress LO6;
+ /**
+ * 0.0.0.0/0
+ */
+ static const InetAddress DEFAULT4;
+
+ /**
+ * ::/0
+ */
+ static const InetAddress DEFAULT6;
+
InetAddress() throw() { memset(&_sa,0,sizeof(_sa)); }
InetAddress(const InetAddress &a) throw() { memcpy(&_sa,&a._sa,sizeof(_sa)); }
InetAddress(const struct sockaddr *sa) throw() { this->set(sa); }
@@ -148,6 +158,12 @@ public:
throw();
/**
+ * @return True if this ip/netmask would represent a default route (e.g. 0.0.0.0/0)
+ */
+ bool isDefaultRoute() const
+ throw();
+
+ /**
* @return True if this is a loopback address
*/
inline bool isLoopback() const