model: Slight modification with wire format processing
Now it is possible to convert Name from/to wire format via ndn::Face
helper method (since Face is getting configured with specific wire
format)
Refs #1008 (http://redmine.named-data.net/issues/1008)
diff --git a/model/ndn-face.h b/model/ndn-face.h
index 1fba08f..86003ff 100644
--- a/model/ndn-face.h
+++ b/model/ndn-face.h
@@ -29,7 +29,7 @@
#include "ns3/nstime.h"
#include "ns3/type-id.h"
#include "ns3/traced-callback.h"
-#include "ns3/ndn-limits.h"
+#include "ns3/ndn-name.h"
namespace ns3 {
@@ -248,6 +248,27 @@
bool
operator< (const Face &face) const;
+ ///////////////////////////////////////////////////////////////////////////////
+ // Helpers to create wire-formatted data in default wire format, since settings about
+ // the wire format belong to the face
+ /*
+ * @brief Get size of buffer to fit wire-formatted name object
+ */
+ uint32_t
+ NameToWireSize (Ptr<Name> name) const;
+
+ /**
+ * @brief Convert name to wire format
+ */
+ void
+ NameToWire (Buffer::Iterator start, Ptr<const Name> name) const;
+
+ /**
+ * @brief Convert name from wire format
+ */
+ Ptr<Name>
+ NameFromWire (Buffer::Iterator start) const;
+
protected:
/**
* @brief Send packet down to the stack (towards app or network)