model: Adding ability to select desired default wire format
ndnSIM will accept and process (if no modifications required) packets in
any supported wire format (right now it is only ndnSIM and ccnb).
Wire format for creating of new packets can be selected (per-face)
thorough ns3::ndn::Face::WireFormat variable.
Refs #1008 (http://redmine.named-data.net/)
diff --git a/model/ndn-face.h b/model/ndn-face.h
index 5f6c884..1fba08f 100644
--- a/model/ndn-face.h
+++ b/model/ndn-face.h
@@ -59,6 +59,12 @@
public Object
{
public:
+ enum
+ {
+ WIRE_FORMAT_NDNSIM = 0,
+ WIRE_FORMAT_CCNB = 1
+ };
+
static TypeId
GetTypeId ();
@@ -190,7 +196,7 @@
{
APPLICATION = 1 ///< @brief An application face
};
-
+
/**
* @brief Print information about the face into the stream
* @param os stream to write information to
@@ -248,7 +254,7 @@
*/
virtual bool
Send (Ptr<Packet> packet);
-
+
/**
* @brief Send packet up to the stack (towards forwarding strategy)
*/
@@ -269,6 +275,8 @@
Ptr<Node> m_node; ///< \brief Smart pointer to Node
private:
+ uint32_t m_wireFormat;
+
InterestHandler m_upstreamInterestHandler;
DataHandler m_upstreamDataHandler;
bool m_ifup;