jni: Upgrade to the latest version of NFD (0.4.0-3-g4100646) and ndn-cxx (0.4.0-4-g6617e49)

Change-Id: I87bf962a2ae4c156426330c4b715bb64a5cbf58f
diff --git a/app/src/main/jni/NFD b/app/src/main/jni/NFD
index 441ba21..4100646 160000
--- a/app/src/main/jni/NFD
+++ b/app/src/main/jni/NFD
@@ -1 +1 @@
-Subproject commit 441ba2175e194c45807fda4acae6f23b6dc40298
+Subproject commit 410064619292ca9551c9fdbf0aaca02061df3b54
diff --git a/app/src/main/jni/ndn-cxx b/app/src/main/jni/ndn-cxx
index 80b68e1..6617e49 160000
--- a/app/src/main/jni/ndn-cxx
+++ b/app/src/main/jni/ndn-cxx
@@ -1 +1 @@
-Subproject commit 80b68e17c484b27bf7b623f86b6c628d48466998
+Subproject commit 6617e498785ac8b8f88751a9b319308beb5e77cc
diff --git a/app/src/main/jni/ndn-cxx.mk b/app/src/main/jni/ndn-cxx.mk
index 9ebba73..2126962 100644
--- a/app/src/main/jni/ndn-cxx.mk
+++ b/app/src/main/jni/ndn-cxx.mk
@@ -27,6 +27,7 @@
     lp/nack-header.cpp \
     lp/nack.cpp \
     lp/packet.cpp \
+    lp/tags.cpp \
     management/nfd-channel-status.cpp \
     management/nfd-command-options.cpp \
     management/nfd-control-command.cpp \
diff --git a/app/src/main/jni/nfd-android/version.hpp b/app/src/main/jni/nfd-android/version.hpp
index f213551..e62d6b7 100644
--- a/app/src/main/jni/nfd-android/version.hpp
+++ b/app/src/main/jni/nfd-android/version.hpp
@@ -38,13 +38,13 @@
  *
  *  MAJOR*1000000 + MINOR*1000 + PATCH
  */
-#define NFD_VERSION 3004
+#define NFD_VERSION 4000
 
 /** \brief NFD version represented as a string
  *
  *  MAJOR.MINOR.PATCH
  */
-#define NFD_VERSION_STRING "0.3.4"
+#define NFD_VERSION_STRING "0.4.0"
 
 /** \brief NFD version string, including git commit information, if NFD is build from
  *         specific git commit
@@ -60,14 +60,14 @@
  *
  * Example, 0.1.0-rc1-1-g5c86570
  */
-#define NFD_VERSION_BUILD_STRING "0.3.4-16-g441ba21"
+#define NFD_VERSION_BUILD_STRING "0.4.0-3-g4100646"
 
 /// MAJOR version
 #define NFD_VERSION_MAJOR 0
 /// MINOR version
-#define NFD_VERSION_MINOR 3
+#define NFD_VERSION_MINOR 4
 /// PATCH version
-#define NFD_VERSION_PATCH 4
+#define NFD_VERSION_PATCH 0
 
 } // namespace nfd
 
diff --git a/app/src/main/jni/nfd-wrapper.cpp b/app/src/main/jni/nfd-wrapper.cpp
index d88413e..8bf6379 100644
--- a/app/src/main/jni/nfd-wrapper.cpp
+++ b/app/src/main/jni/nfd-wrapper.cpp
@@ -88,12 +88,17 @@
       "{\n"
       "  tcp\n"
       "  {\n"
+      "    listen yes\n"
       "    port 6363\n"
+      "    enable_v4 yes\n"
+      "    enable_v6 yes\n"
       "  }\n"
       "\n"
       "  udp\n"
       "  {\n"
       "    port 6363\n"
+      "    enable_v4 yes\n"
+      "    enable_v6 yes\n"
       "    idle_timeout 600\n"
       "    keep_alive_interval 25\n"
       "    mcast no\n"
@@ -131,12 +136,13 @@
       "    }\n"
       "  }\n"
       "\n"
-      "  remote_register\n"
+      "  auto_prefix_propagate\n"
       "  {\n"
       "    cost 15\n"
       "    timeout 10000\n"
-      "    retry 0\n"
       "    refresh_interval 300\n"
+      "    base_retry_wait 50\n"
+      "    max_retry_wait 3600\n"
       "  }\n"
       "}\n"
       "\n";
diff --git a/app/src/main/jni/nfd.mk b/app/src/main/jni/nfd.mk
index c185955..daeebb5 100644
--- a/app/src/main/jni/nfd.mk
+++ b/app/src/main/jni/nfd.mk
@@ -21,23 +21,26 @@
     \
     daemon/face/channel.cpp \
     daemon/face/face.cpp \
-    daemon/face/internal-client-face.cpp \
+    daemon/face/face-counters.cpp \
+    daemon/face/generic-link-service.cpp \
     daemon/face/internal-face.cpp \
-    daemon/face/multicast-udp-face.cpp \
-    daemon/face/ndnlp-data.cpp \
-    daemon/face/ndnlp-partial-message-store.cpp \
-    daemon/face/ndnlp-sequence-generator.cpp \
-    daemon/face/ndnlp-slicer.cpp \
+    daemon/face/internal-transport.cpp \
+    daemon/face/link-service.cpp \
+    daemon/face/lp-fragmenter.cpp \
+    daemon/face/lp-reassembler.cpp \
+    daemon/face/multicast-udp-transport.cpp \
     daemon/face/null-face.cpp \
     daemon/face/tcp-channel.cpp \
-    daemon/face/tcp-face.cpp \
     daemon/face/tcp-factory.cpp \
+    daemon/face/tcp-transport.cpp \
+    daemon/face/transport.cpp \
     daemon/face/udp-channel.cpp \
-    daemon/face/udp-face.cpp \
     daemon/face/udp-factory.cpp \
+    daemon/face/udp-protocol.cpp \
+    daemon/face/unicast-udp-transport.cpp \
     daemon/face/websocket-channel.cpp \
-    daemon/face/websocket-face.cpp \
     daemon/face/websocket-factory.cpp \
+    daemon/face/websocket-transport.cpp \
     daemon/fw/access-strategy.cpp \
     daemon/fw/best-route-strategy.cpp \
     daemon/fw/best-route-strategy2.cpp \
@@ -87,10 +90,11 @@
     daemon/table/strategy-choice.cpp \
     daemon/table/strategy-info-host.cpp \
     \
+    rib/auto-prefix-propagator.cpp \
     rib/fib-update.cpp \
     rib/fib-updater.cpp \
     rib/nrd.cpp \
-    rib/remote-registrator.cpp \
+    rib/propagated-entry.cpp \
     rib/rib-entry.cpp \
     rib/rib-manager.cpp \
     rib/rib-status-publisher.cpp \