model: Another set of refactoring/renaming to make code compile (not tested yet)
Refs #1005 (http://redmine.named-data.net/)
diff --git a/apps/ndn-consumer-zipf-mandelbrot.cc b/apps/ndn-consumer-zipf-mandelbrot.cc
index e15cf3a..866eb48 100644
--- a/apps/ndn-consumer-zipf-mandelbrot.cc
+++ b/apps/ndn-consumer-zipf-mandelbrot.cc
@@ -179,19 +179,12 @@
(*nameWithSequence) (seq);
//
- Interest interestHeader;
- interestHeader.SetNonce (m_rand.GetValue ());
- interestHeader.SetName (nameWithSequence);
+ Ptr<Interest> interest = Create<Interest> ();
+ interest->SetNonce (m_rand.GetValue ());
+ interest->SetName (nameWithSequence);
- // NS_LOG_INFO ("Requesting Interest: \n" << interestHeader);
+ // NS_LOG_INFO ("Requesting Interest: \n" << *interest);
NS_LOG_INFO ("> Interest for " << seq<<", Total: "<<m_seq<<", face: "<<m_face->GetId());
-
- Ptr<Packet> packet = Create<Packet> ();
-
- //NS_LOG_DEBUG ("= Interest for " << seq<<", Total: "<<m_seq<<", face: "<<m_face->GetId());
- packet->AddHeader (interestHeader);
- //NS_LOG_DEBUG ("Interest packet size: " << packet->GetSize ());
-
NS_LOG_DEBUG ("Trying to add " << seq << " with " << Simulator::Now () << ". already " << m_seqTimeouts.size () << " items");
m_seqTimeouts.insert (SeqTimeout (seq, Simulator::Now ()));
@@ -202,14 +195,13 @@
m_seqRetxCounts[seq] ++;
- m_transmittedInterests (&interestHeader, this, m_face);
-
m_rtt->SentSeq (SequenceNumber32 (seq), 1);
FwHopCountTag hopCountTag;
- packet->AddPacketTag (hopCountTag);
+ interest->GetPayload ()->AddPacketTag (hopCountTag);
- m_protocolHandler (packet);
+ m_transmittedInterests (interest, this, m_face);
+ m_face->ReceiveInterest (interest);
ConsumerZipfMandelbrot::ScheduleNextPacket ();
}