summaryrefslogtreecommitdiff
path: root/node/InetAddress.hpp
diff options
context:
space:
mode:
authorGrant Limberg <glimberg@gmail.com>2015-06-13 14:39:45 -0700
committerGrant Limberg <glimberg@gmail.com>2015-06-13 14:39:45 -0700
commitc59c74dddab862ade65938e630dc0f561fcb0c2f (patch)
treeb5843f27b60d898be02fd2f2cb5607b95718b96a /node/InetAddress.hpp
parentabbcb0a12cbab782c1d9879391efb65e9cd92acf (diff)
parent845955dea53035e8472059ff03feca9f47c0d5fa (diff)
downloadinfinitytier-c59c74dddab862ade65938e630dc0f561fcb0c2f.tar.gz
infinitytier-c59c74dddab862ade65938e630dc0f561fcb0c2f.zip
Merge branch 'adamierymenko-dev' into android-jni
Diffstat (limited to 'node/InetAddress.hpp')
-rw-r--r--node/InetAddress.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/node/InetAddress.hpp b/node/InetAddress.hpp
index 5b725174..16e3f4d5 100644
--- a/node/InetAddress.hpp
+++ b/node/InetAddress.hpp
@@ -266,6 +266,16 @@ struct InetAddress : public sockaddr_storage
inline unsigned int netmaskBits() const throw() { return port(); }
/**
+ * Alias for port()
+ *
+ * This just aliases port() because for gateways we use this field to
+ * store the gateway metric.
+ *
+ * @return Gateway metric
+ */
+ inline unsigned int metric() const throw() { return port(); }
+
+ /**
* Construct a full netmask as an InetAddress
*/
InetAddress netmask() const