[ndnSIM] How to get interest name from consumer sendpacket
Spyridon (Spyros) Mastorakis
spiros.mastorakis at gmail.com
Tue Apr 7 20:18:37 PDT 2015
Hello,
the first line of the code that you mentioned creates an empty interest and returns a pointer to this empty interest. In the second line, you are requesting the name of this empty interest. This name does not exist.
I guess that this is the problem.
--
Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/
Internet Research Laboratory
PhD Computer Science
UCLA
> On Apr 7, 2015, at 11:22 AM, Trade <trade20122012 at gmail.com> wrote:
>
> 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);
>
> nameWithSequence->appendSeqNum (seq);
>
> 199 //
> 200
> 201
>
> Ptr<Interest> interest = Create<Interest> ();
>
> 202
>
> interest->SetNonce (
> m_rand.GetValue ());
> 203
>
> interest->SetName (nameWithSequence);
>
> 204
>
> interest->SetInterestLifetime (
> m_interestLifeTime);
> 205
> 206
> // NS_LOG_INFO
> ("Requesting Interest: \n" << *interest);
>
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
More information about the ndnSIM
mailing list