model: Enabling serialization/deserialization of Exclude filter in ndnSIM wire format
Refs #1009 (http://redmine.named-data.net/issues/1009)
diff --git a/model/wire/ndnsim/wire-ndnsim.h b/model/wire/ndnsim/wire-ndnsim.h
index 6e4b1e5..4ddfb3e 100644
--- a/model/wire/ndnsim/wire-ndnsim.h
+++ b/model/wire/ndnsim/wire-ndnsim.h
@@ -16,7 +16,8 @@
#include "ns3/buffer.h"
#include "ns3/ndn-common.h"
-#include "ns3/ndn-name.h"
+#include "ns3/ndnSIM/ndn.cxx/name.h"
+#include "ns3/ndnSIM/ndn.cxx/exclude.h"
NDN_NAMESPACE_BEGIN
@@ -53,6 +54,42 @@
*/
static Ptr<Name>
DeserializeName (Buffer::Iterator &start);
+
+
+ enum Selectors {
+ SelectorExclude = 0x01
+ };
+
+ enum ExcludeTypes {
+ ExcludeNameType = 0x01,
+ ExcludeAnyType = 0x02
+ };
+
+ /**
+ * @brief Append Exclude in ndnSIM encoding
+ * @param start Buffer to store serialized Interest
+ * @param exclude constant reference to Exclude object
+ *
+ * @returns written length
+ */
+ static size_t
+ SerializeExclude (Buffer::Iterator &start, const Exclude &exclude);
+
+ /**
+ * @brief Estimate size of Exclude in ndnSIM encoding
+ * @param exclude constant reference to Exclude object
+ * @returns estimated length
+ */
+ static size_t
+ SerializedSizeExclude (const Exclude &exclude);
+
+ /**
+ * @brief Deserialize Exclude from ndnSIM encodeing
+ * @param start Buffer that stores serialized Interest
+ * @param exclude Exclude object
+ */
+ static Ptr<Exclude>
+ DeserializeExclude (Buffer::Iterator &start);
}; // NdnSim
} // wire