[ndnSIM] Full name requested, but Data packet does not have wire format (e.g., not signed)

Spyridon (Spyros) Mastorakis mastorakis at cs.ucla.edu
Fri May 4 18:47:08 PDT 2018


Hi,

encode the data before sending the packet out:

https://github.com/named-data-ndnSIM/ndnSIM/blob/master/apps/ndn-producer.cpp#L128 <https://github.com/named-data-ndnSIM/ndnSIM/blob/master/apps/ndn-producer.cpp#L128>

Thanks,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA

> On May 4, 2018, at 3:46 AM, Qian Wang <qwang at research.ait.ie> wrote:
> 
> Hi everyone,
> 
> I'm running my tests on ndnSIM. It could run a few seconds and then terminated with the following error:
> 
> terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<ndn::Data::Error> >'
>   what():  Full name requested, but Data packet does not have wire format (e.g., not signed)
> 
> I'm wondering anyone has idea about this error?  
> Thanks a lot.
> 
> 
> My code for creating the Data packet is at below:
> 
> Name replyNackDataName(replyNackName);
> auto replyNackData = make_shared<Data>();
> replyNackData->setName(replyNackDataName);
> replyNackData->setFreshnessPeriod(::ndn::time::milliseconds(m_freshness.GetMilliSeconds()));
> 
> std::string rawData("no");
> auto rawDataString = rawData.c_str();
> const uint8_t* p = reinterpret_cast<const uint8_t*>(rawDataString);
> auto buffer = make_shared< ::ndn::Buffer>(p, rawData.size());
> replyNackData->setContent(buffer);
>         
> Signature signature;
> SignatureInfo signatureInfo(static_cast< ::ndn::tlv::SignatureTypeValue>(255));
> if (m_keyLocator.size() > 0) {
>  signatureInfo.setKeyLocator(m_keyLocator);
>  }
> signature.setInfo(signatureInfo);
> signature.setValue(::ndn::makeNonNegativeIntegerBlock(::ndn::tlv::SignatureValue, m_signature));
> replyNackData->setSignature(signature);
> NS_LOG_INFO("node(" << GetNode()->GetId() << ") responding with Data: " << replyNackData->getName());
> 
> m_transmittedDatas(replyNackData, this, m_face);
> m_appLink->onReceiveData(*replyNackData);
> 
> 
> Best Regards,
> Qian
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180504/ddc6181e/attachment.html>


More information about the ndnSIM mailing list