[ndnSIM] how to add private member variable in class Intererst
呂建德
v0918732669 at gmail.com
Tue Mar 28 08:14:31 PDT 2017
Hi
I also had the same problem , and happened that "TLV length doesn't match
buffer length".
I add the length of my value to the "totallength" , and it pops up that
messages.
Anyone knows how to fixed it step by step , I will appreciate very much
2017-03-28 17:19 GMT+08:00 lahmer ilyas <ilyaslahmer93 at gmail.com>:
> Hi, I had the same problem, but I added a string rather than int in the
> interest. My solution was to recreate the interest at each hop with the new
> string value. I don't know why but this fixed the problem.
>
>
>
> Sent from BlueMail <http://www.bluemail.me/r>
>
> On Mar 28, 2017, at 3:26 AM, gc199211 <gc199211 at mail.ustc.edu.cn> wrote:
>>
>>
>> Hi sir :
>> I find out that my last email is incomplete in maillist, so I
>> finish it and send again.
>> I am trying to add hop information in Interest recently on *ndnSIM
>> 2.2*. Here is my code.
>> 1). I add a private member variable which is named hop in
>> ndnSIM/ndn-cxx/src/interest.h
>> private:
>> Name m_name;
>> ......
>> mutable Block m_wire;
>> *int hop;* // a new private member
>> variable
>>
>> 2). I increace the value of hop in the nfd::Forwarder::
>> onOutgoingInterest(shared_ptr<pit::Entry> pitEntry, Face& outFace,bool wantNewNonce),so
>> as to caculate the hop .
>>
>> * int tmpHop=interest->getHop();*
>> * tmpHop++;*
>> * interest->setHop(tmpHop);*
>>
>> Here is my problem,It seems that the hop value is always 0 no matter how
>> many nodes it is forwarded.How to solve the problem? I know there is a ns3::ndn::FwHopCountTag
>> a to caculate the hop in ns3::ndn::NetDeviceLinkService ,But I want to
>> caculate the hop value directly in Interest. If it works ,I can add other
>> member variable in Interest which is quite important for my research.Thank
>> you very much .
>>
>>
>> ! &nb sp;
>> 2016-12-20
>> ------------------------------
>> gc199211
>>
>> ------------------------------
>>
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu
>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>
>>
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170328/84e51bca/attachment-0001.html>
More information about the ndnSIM
mailing list