diff options
Diffstat (limited to 'node/InetAddress.hpp')
| -rw-r--r-- | node/InetAddress.hpp | 16 |
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 |
