Moving around path weight tagging. Now CcnxFace owns metric field, which is used for tagging.
Correcting bugs in blackhole-sprint scenario. This time it should be
the right one:
- instead of a hijacker app, all faces on hijacked node are turned down
- there was a trick with RTT estimation (when batch, it is necessary to
reset history upon a new batch)
- instead of random runs, trying all possible combinations of
producer/hijacker
diff --git a/model/ccnx-face.h b/model/ccnx-face.h
index 29ec371..e2100c6 100644
--- a/model/ccnx-face.h
+++ b/model/ccnx-face.h
@@ -111,19 +111,19 @@
Receive (const Ptr<const Packet> &p);
////////////////////////////////////////////////////////////////////
- // /**
- // * \Brief Assign routing/forwarding metric with face
- // *
- // * \param metric configured routing metric (cost) of this face
- // */
- // virtual void SetMetric (uint16_t metric);
+ /**
+ * \Brief Assign routing/forwarding metric with face
+ *
+ * \param metric configured routing metric (cost) of this face
+ */
+ virtual void SetMetric (uint16_t metric);
- // /**
- // * \brief Get routing/forwarding metric assigned to the face
- // *
- // * \returns configured routing/forwarding metric (cost) of this face
- // */
- // virtual uint16_t GetMetric (void) const;
+ /**
+ * \brief Get routing/forwarding metric assigned to the face
+ *
+ * \returns configured routing/forwarding metric (cost) of this face
+ */
+ virtual uint16_t GetMetric (void) const;
/**
* These are face states and may be distinct from actual lower-layer
@@ -228,7 +228,10 @@
ProtocolHandler m_protocolHandler; ///< Callback via which packets are getting send to CCNx stack
bool m_ifup; ///< \brief flag indicating that the interface is UP
uint32_t m_id; ///< \brief id of the interface in CCNx stack (per-node uniqueness)
- Time m_lastLeakTime;
+ Time m_lastLeakTime;
+ uint32_t m_metric; ///< \brief metric of the face
+
+ bool m_enableMetricTagging;
};
std::ostream& operator<< (std::ostream& os, const CcnxFace &face);