[ndnSIM] How to get interest name from consumer sendpacket

Trade trade20122012 at gmail.com
Tue Apr 7 11:22:05 PDT 2015


I want to build a new routing protocol, but I need to extract interest 
name out of from consumer application and returns run-time error.

     Ptr<Interest> interest = Create<Interest> ();
     const Name prefix = interest->GetName () ;


This is from consumer.cc

Ptr<Name> nameWithSequence = Create<Name> (m_interestName 
<http://ndnsim.net/1.0/doxygen/classns3_1_1ndn_1_1_consumer.html#a11d6716730a853a7cb2ead9c50bbefbc>);
nameWithSequence->appendSeqNum (seq);
199 //
200
201 Ptr<Interest> interest = Create<Interest> ();
202 interest->SetNonce (m_rand 
<http://ndnsim.net/1.0/doxygen/classns3_1_1ndn_1_1_consumer.html#a02140ca5d187282fd6f2b029deb3a946>.GetValue 
());
203 interest->SetName (nameWithSequence);
204 interest->SetInterestLifetime (m_interestLifeTime 
<http://ndnsim.net/1.0/doxygen/classns3_1_1ndn_1_1_consumer.html#adad8e55fa1027e4c9850538e1e8622a7>);
205
206 // NS_LOG_INFO ("Requesting Interest: \n" << *interest);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20150407/f101327f/attachment.html>


More information about the ndnSIM mailing list