summaryrefslogtreecommitdiff
path: root/node/RoutingTable.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-07-17 13:08:37 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-07-17 13:08:37 -0700
commit51766e6549ebf0e8e9e668549f28cc1331d1912b (patch)
tree6375eb5b9517762cbf07b6f00a2a411ca9da80e3 /node/RoutingTable.hpp
parentd3151567331716341210fe957df69fd2a705dc8b (diff)
downloadinfinitytier-51766e6549ebf0e8e9e668549f28cc1331d1912b.tar.gz
infinitytier-51766e6549ebf0e8e9e668549f28cc1331d1912b.zip
BSD routing table works... that hurt much worse than it should have.
Diffstat (limited to 'node/RoutingTable.hpp')
-rw-r--r--node/RoutingTable.hpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/node/RoutingTable.hpp b/node/RoutingTable.hpp
index 8894018d..3a4a3dde 100644
--- a/node/RoutingTable.hpp
+++ b/node/RoutingTable.hpp
@@ -50,7 +50,8 @@ public:
InetAddress destination;
InetAddress gateway; // port/netmaskBits field not used, should be 0 -- null if direct-to-device route
char device[128];
- int metric;
+ int deviceIndex; // may not always be set, depending on OS -- for internal use only
+ int metric; // higher = lower priority -- on some OSes this is "hop count," etc.
std::string toString() const;
@@ -66,9 +67,13 @@ public:
virtual ~RoutingTable();
/**
+ * Get routing table
+ *
+ * @param includeLinkLocal If true, include link-local address routes (default: false)
+ * @param includeLoopback Include loopback (default: false)
* @return Sorted routing table entries
*/
- virtual std::vector<Entry> get() const = 0;
+ virtual std::vector<Entry> get(bool includeLinkLocal = false,bool includeLoopback = false) const = 0;
/**
* Add or update a routing table entry