management: Finalizing LocalControlHeader implementation
IncomingFaceId and NextHopFaceId are now fully supported for specifying
to be efficiently sent towards the forwarding daemon, and to be
automatically decoded from incoming packet from the forwarding daemon.
The current implementation limits exactly one LocalControlHeader for
Interest/Data packet instance. This is not exactly correct (especially
inside NFD), where the same Interest is expected to have multiple
LocalControlHeader (for each individual local face). The following
commits will fix this problem.
Change-Id: Ia6b124ed12271136d071f4822f13634897ce3228
refs: #1170
diff --git a/src/face.hpp b/src/face.hpp
index 29f80fd..3dd0456 100644
--- a/src/face.hpp
+++ b/src/face.hpp
@@ -203,20 +203,20 @@
typedef std::list<shared_ptr<RegisteredPrefix> > RegisteredPrefixTable;
void
- asyncExpressInterest(const shared_ptr<const Interest> &interest,
+ asyncExpressInterest(const shared_ptr<const Interest>& interest,
const OnData& onData, const OnTimeout& onTimeout);
void
- asyncRemovePendingInterest(const PendingInterestId *pendingInterestId);
+ asyncRemovePendingInterest(const PendingInterestId* pendingInterestId);
void
- asyncUnsetInterestFilter(const RegisteredPrefixId *registeredPrefixId);
+ asyncUnsetInterestFilter(const RegisteredPrefixId* registeredPrefixId);
void
finalizeUnsertInterestFilter(RegisteredPrefixTable::iterator item);
void
- onReceiveElement(const Block &wire);
+ onReceiveElement(const Block& wire);
static void
@@ -242,26 +242,6 @@
void
checkPitExpire();
- /**
- * @brief Encode local control header.
- *
- * @param blockWithoutHeader Encoded block of interest or data packet.
- * @param nextHopFaceId Id of the face from which packet will be sent.
- * @return The encoded block with local control header.
- */
- static Block
- wireEncodeLocalControlHeader(const Block& blockWithoutHeader, uint64_t nextHopFaceId);
-
- /**
- * @brief Decode local control header.
- *
- * @param blockWithHeader Encoded block with local control header.
- * @param incomingFaceId On return, the id of the face from which packet is received.
- * @return The encoded block of interest or data packet.
- */
- static Block
- wireDecodeLocalControlHeader(const Block& blockWithHeader, uint64_t& incomingFaceId);
-
private:
shared_ptr<boost::asio::io_service> m_ioService;
shared_ptr<boost::asio::io_service::work> m_ioServiceWork; // needed if thread needs to be preserved