src: Recreating face in case of face deletion by NFD
Change-Id: Idd1d0b7f521e574ace38d6f671a682622d98209d
diff --git a/src/adjacent.hpp b/src/adjacent.hpp
index 90a0460..dd2c2e2 100644
--- a/src/adjacent.hpp
+++ b/src/adjacent.hpp
@@ -43,7 +43,7 @@
Adjacent(const ndn::Name& an);
Adjacent(const ndn::Name& an, const std::string& cfu, double lc,
- uint32_t s, uint32_t iton);
+ uint32_t s, uint32_t iton, uint64_t faceId);
const ndn::Name&
getName() const
@@ -105,11 +105,32 @@
m_interestTimedOutNo = iton;
}
+ void
+ setFaceId(uint64_t faceId)
+ {
+ m_faceId = faceId;
+ }
+
+ uint64_t
+ getFaceId()
+ {
+ return m_faceId;
+ }
+
bool
operator==(const Adjacent& adjacent) const;
- bool
- compare(const ndn::Name& adjacencyName);
+ inline bool
+ compare(const ndn::Name& adjacencyName)
+ {
+ return m_name == adjacencyName;
+ }
+
+ inline bool
+ compareFaceId(uint64_t faceId)
+ {
+ return m_faceId == faceId;
+ }
void
writeLog();
@@ -123,6 +144,7 @@
double m_linkCost;
uint32_t m_status;
uint32_t m_interestTimedOutNo;
+ uint64_t m_faceId;
};
} // namespace nlsr