Replace hardcoded values in ndn-cxx by MAX_NDN_PACKET_SIZE

Change-Id: I0e116cd2a39781f0d56e156ac517ecadd49b8741
Refs: #3407
diff --git a/src/encoding/block.cpp b/src/encoding/block.cpp
index 7306276..3e2d518 100644
--- a/src/encoding/block.cpp
+++ b/src/encoding/block.cpp
@@ -43,7 +43,7 @@
               "Block must be MoveAssignable with noexcept");
 #endif // NDN_CXX_HAVE_IS_NOTHROW_MOVE_ASSIGNABLE
 
-const size_t MAX_SIZE_OF_BLOCK_FROM_STREAM = 8800;
+const size_t MAX_SIZE_OF_BLOCK_FROM_STREAM = MAX_NDN_PACKET_SIZE;
 
 Block::Block()
   : m_type(std::numeric_limits<uint32_t>::max())
diff --git a/src/encoding/encoder.cpp b/src/encoding/encoder.cpp
index 4b32c10..3c15943 100644
--- a/src/encoding/encoder.cpp
+++ b/src/encoding/encoder.cpp
@@ -24,7 +24,7 @@
 namespace ndn {
 namespace encoding {
 
-Encoder::Encoder(size_t totalReserve/* = 8800*/, size_t reserveFromBack/* = 400*/)
+Encoder::Encoder(size_t totalReserve/* = MAX_NDN_PACKET_SIZE*/, size_t reserveFromBack/* = 400*/)
   : m_buffer(new Buffer(totalReserve))
 {
   m_begin = m_end = m_buffer->end() - (reserveFromBack < totalReserve ? reserveFromBack : 0);
diff --git a/src/encoding/encoder.hpp b/src/encoding/encoder.hpp
index a8092d1..540329f 100644
--- a/src/encoding/encoder.hpp
+++ b/src/encoding/encoder.hpp
@@ -42,7 +42,7 @@
    * @param reserveFromBack number of bytes to reserve for append* operations
    */
   explicit
-  Encoder(size_t totalReserve = 8800, size_t reserveFromBack = 400);
+  Encoder(size_t totalReserve = MAX_NDN_PACKET_SIZE, size_t reserveFromBack = 400);
 
   Encoder(const Encoder&) = delete;
 
diff --git a/src/encoding/encoding-buffer.hpp b/src/encoding/encoding-buffer.hpp
index 67cc4bb..9ab9239 100644
--- a/src/encoding/encoding-buffer.hpp
+++ b/src/encoding/encoding-buffer.hpp
@@ -38,7 +38,7 @@
 {
 public:
   explicit
-  EncodingImpl(size_t totalReserve = 8800, size_t reserveFromBack = 400)
+  EncodingImpl(size_t totalReserve = MAX_NDN_PACKET_SIZE, size_t reserveFromBack = 400)
     : Encoder(totalReserve, reserveFromBack)
   {
   }