use FaceUri and NetworkMonitor from ndn-cxx/net
This commit also contains a quick fix in LpReliability to avoid
ndn::lp::Packet::wireEncode(EncodingEstimator&).
refs #3940, #4156
Change-Id: Ice8e3649be21dd023ed1f6562c185f9e6721e45e
diff --git a/daemon/face/lp-reliability.cpp b/daemon/face/lp-reliability.cpp
index aee7357..584e6bd 100644
--- a/daemon/face/lp-reliability.cpp
+++ b/daemon/face/lp-reliability.cpp
@@ -141,8 +141,7 @@
if (mtu > 0) {
// Ack Type (3 octets) + Ack Length (1 octet) + sizeof(lp::Sequence)
size_t ackSize = 3 + 1 + sizeof(lp::Sequence);
- ndn::EncodingEstimator estimator;
- maxAcks = (mtu - pkt.wireEncode(estimator)) / ackSize;
+ maxAcks = (mtu - pkt.wireEncode().size()) / ackSize;
}
ssize_t nAcksInPkt = 0;
diff --git a/daemon/nfd.cpp b/daemon/nfd.cpp
index 2f2861d..8c58034 100644
--- a/daemon/nfd.cpp
+++ b/daemon/nfd.cpp
@@ -46,13 +46,13 @@
static const std::string INTERNAL_CONFIG = "internal://nfd.conf";
-static inline ndn::util::NetworkMonitor*
+static inline ndn::net::NetworkMonitor*
makeNetworkMonitor()
{
try {
- return new ndn::util::NetworkMonitor(getGlobalIoService());
+ return new ndn::net::NetworkMonitor(getGlobalIoService());
}
- catch (const ndn::util::NetworkMonitor::Error& e) {
+ catch (const ndn::net::NetworkMonitor::Error& e) {
NFD_LOG_WARN(e.what());
return nullptr;
}
diff --git a/daemon/nfd.hpp b/daemon/nfd.hpp
index 8082bf3..8f83644 100644
--- a/daemon/nfd.hpp
+++ b/daemon/nfd.hpp
@@ -29,8 +29,8 @@
#include "core/config-file.hpp"
#include "core/scheduler.hpp"
+#include <ndn-cxx/net/network-monitor.hpp>
#include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/util/network-monitor.hpp>
namespace ndn {
class Face;
@@ -119,7 +119,7 @@
unique_ptr<FibManager> m_fibManager;
unique_ptr<StrategyChoiceManager> m_strategyChoiceManager;
- unique_ptr<ndn::util::NetworkMonitor> m_networkMonitor;
+ unique_ptr<ndn::net::NetworkMonitor> m_networkMonitor;
scheduler::ScopedEventId m_reloadConfigEvent;
};