face: Transport::getMtu
refs #3253
Change-Id: Ia4c5cfe210a99b798ce7d05f74ebdd7cfab214f4
diff --git a/daemon/face/unicast-udp-transport.cpp b/daemon/face/unicast-udp-transport.cpp
index eb8ab66..a5fb3e7 100644
--- a/daemon/face/unicast-udp-transport.cpp
+++ b/daemon/face/unicast-udp-transport.cpp
@@ -24,6 +24,7 @@
*/
#include "unicast-udp-transport.hpp"
+#include "udp-protocol.hpp"
#ifdef __linux__
#include <cerrno> // for errno
@@ -47,8 +48,10 @@
{
this->setLocalUri(FaceUri(m_socket.local_endpoint()));
this->setRemoteUri(FaceUri(m_socket.remote_endpoint()));
+ this->setScope(ndn::nfd::FACE_SCOPE_NON_LOCAL);
this->setPersistency(persistency);
this->setLinkType(ndn::nfd::LINK_TYPE_POINT_TO_POINT);
+ this->setMtu(udp::computeMtu(m_socket.local_endpoint()));
NFD_LOG_FACE_INFO("Creating transport");