Small extension of InterestHeader API (cheat for python bindings)
diff --git a/model/ndn-interest-header.cc b/model/ndn-interest-header.cc
index 39c87e9..d0ebaab 100644
--- a/model/ndn-interest-header.cc
+++ b/model/ndn-interest-header.cc
@@ -27,6 +27,7 @@
#include "ns3/log.h"
#include "ns3/unused.h"
+#include "ns3/packet.h"
#include "../helper/ndn-encoding-helper.h"
#include "../helper/ndn-decoding-helper.h"
@@ -77,6 +78,15 @@
{
}
+Ptr<InterestHeader>
+InterestHeader::GetInterest (Ptr<Packet> packet)
+{
+ Ptr<InterestHeader> interest = Create<InterestHeader> ();
+ packet->RemoveHeader (*interest);
+
+ return interest;
+}
+
void
InterestHeader::SetName (Ptr<NameComponents> name)
{