[ndnSIM] Adding another "Name" type of field in Interest packet

Mudasir Qazi mudasirqazi00 at gmail.com
Sat May 26 12:08:50 PDT 2018

Thanks for the clarification. And thanks for reply. I really really
appreciate your time and effort on this forum.

Actually I need a std::string type of field carried in Interest,
manipulated at intermediate nodes and reach to producer. Producer will read
it and do its actions.
For this purpose, I have tired following options:
1. I created a list of Name as Interest field but it did not worked out.
Does not correctly carried to the producer.
2. I created vector of string but it also did not worked out. Gives errors
in wireEncoding and wireDecoding.
3. I created a new Name field but it also did not worked out. Gives tlv
related errors.

In total I have spent a lot of time, just a lot of time these tries.
Can you please suggest the best and easiest way?
As adding new Name type of field also did't worked, I was planning to use
the already added Name field. I will manipulate it at consumer and
transmit. Intermediate nodes and producer will read it and do their work.
Wold it work? Is there any better way?

On Sat, May 26, 2018, 11:57 PM Junxiao Shi <shijunxiao at email.arizona.edu>

> Hi Mudasir
> I have tried adding another "Name" type of field in Interest packet.
> What's the semantics of this new field?
> It's *usually* a wrong design if you need a secondary name.
> * To guide forwarding: use ForwardingHint field.
> * To give additional parameters to the producer: append those parameters
> to the name. In case producer must return a Data generated by some other
> node, encapsulate that Data into a new Data that matches the Interest.
> * To indicate who expressed the Interest: you shouldn't indicate who
> expressed the Interest, unless it changes the Data. In that case, see the
> second point.
>> *in wireDecode method:*
>> m_Name2.wireDecode(m_wire.get(tlv::Name2));
>> *Error:*
>> When I'm running scenario, its builds successfully. But after linking
>> files and before launching the simulator it gives following error:
>> terminate called after throwing an instance of
>> 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<ndn::Block::Error>
>> >'
>>   what():  (Block::get) Requested a non-existed type [10] from Block
> This error message indicates Nonce element (TLV-TYPE 0x0A ie decimal 10)
> is missing.
> Yours, Junxiao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180527/ccc1b74b/attachment.html>

More information about the ndnSIM mailing list