From 96a58becf8fe10efceab38c49553b009754d2632 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Sat, 13 Jun 2015 11:34:31 +0200 Subject: Gateways support in network controller schema and database (not implemented yet in client) toward GitHub issue #178 --- node/InetAddress.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'node/InetAddress.hpp') diff --git a/node/InetAddress.hpp b/node/InetAddress.hpp index 5b725174..16e3f4d5 100644 --- a/node/InetAddress.hpp +++ b/node/InetAddress.hpp @@ -265,6 +265,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 */ -- cgit v1.2.3