pit: add EndpointId field in in-record and out-record
refs: #4842
Change-Id: Id4bca4ad9c2d7c8a2fd975c0b052fb9271b6e47d
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index 2e49824..b1dc9ee 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -132,22 +132,22 @@
return m_inRecords.end();
}
- /** \brief get the in-record for \p face
+ /** \brief get the in-record for \p face and \p endpointId
* \return an iterator to the in-record, or .in_end() if it does not exist
*/
InRecordCollection::iterator
- getInRecord(const Face& face);
+ getInRecord(const Face& face, uint64_t endpointId);
/** \brief insert or update an in-record
* \return an iterator to the new or updated in-record
*/
InRecordCollection::iterator
- insertOrUpdateInRecord(Face& face, const Interest& interest);
+ insertOrUpdateInRecord(Face& face, uint64_t endpointId, const Interest& interest);
- /** \brief delete the in-record for \p face if it exists
+ /** \brief delete the in-record for \p face and \p endpointId if it exists
*/
void
- deleteInRecord(const Face& face);
+ deleteInRecord(const Face& face, uint64_t endpointId);
/** \brief delete all in-records
*/
@@ -199,22 +199,28 @@
return m_outRecords.end();
}
- /** \brief get the out-record for \p face
+ /** \brief get the out-record for \p face and \p endpointId
* \return an iterator to the out-record, or .out_end() if it does not exist
*/
OutRecordCollection::iterator
- getOutRecord(const Face& face);
+ getOutRecord(const Face& face, uint64_t endpointId);
/** \brief insert or update an out-record
* \return an iterator to the new or updated out-record
*/
OutRecordCollection::iterator
- insertOrUpdateOutRecord(Face& face, const Interest& interest);
+ insertOrUpdateOutRecord(Face& face, uint64_t endpointId, const Interest& interest);
- /** \brief delete the out-record for \p face if it exists
+ /** \brief delete the out-record for \p face and \p endpointId if it exists
*/
void
- deleteOutRecord(const Face& face);
+ deleteOutRecord(const Face& face, uint64_t endpointId);
+
+public: // cleanup
+ /** \brief delete all in-records and out-records for \p face if it exists
+ */
+ void
+ deleteInOutRecordsByFace(const Face& face);
public:
/** \brief expiry timer