face: Throw Face::Error if supplied Interest or Data exceeds maximum packet size
Maximum packet size is defined as MAX_NDN_PACKET_SIZE constant and does
not include any link-layer overhead.
Change-Id: I4c2787d38894096b43fb4e8ffc3175fa7ed24738
Refs: #1774
diff --git a/src/common.hpp b/src/common.hpp
index a35addb..9d15e49 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -37,6 +37,12 @@
#define DEPRECATED(func) func
#endif
+namespace ndn {
+
+const size_t MAX_NDN_PACKET_SIZE = 8800;
+
+} // namespace ndn
+
#ifdef NDN_CXX_HAVE_CXX11
#if defined(__GNUC__)
@@ -49,7 +55,6 @@
# error "NDN-CXX library is configured and compiled in C++11 mode, but the current compiler is not C++11 enabled"
#endif // defined(__clang__) && (__cplusplus < 201103L)
-
#include <memory>
#include <functional>