summaryrefslogtreecommitdiff
path: root/node/InetAddress.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-06-13 11:34:31 +0200
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-06-13 11:34:31 +0200
commit96a58becf8fe10efceab38c49553b009754d2632 (patch)
treeb4e73bbced3c94eb16ac79cfc8dd2b78eccb7938 /node/InetAddress.hpp
parent8a9715f183096e35e964a195b61f84bb263a9f85 (diff)
downloadinfinitytier-96a58becf8fe10efceab38c49553b009754d2632.tar.gz
infinitytier-96a58becf8fe10efceab38c49553b009754d2632.zip
Gateways support in network controller schema and database (not implemented yet in client) toward GitHub issue #178
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