[ndnSIM] 回复: How to add a tag to the data?
黑客
1602883373 at qq.com
Sat Apr 15 00:08:22 PDT 2017
FwcontentCopyTag is Constructor tag of me ,but i can not add it to the data.
------------------ 原始邮件 ------------------
发件人: "Spyridon (Spyros) Mastorakis"<mastorakis at cs.ucla.edu>;
发送时间: 2017年4月15日(星期六) 上午10:55
收件人: "黑客"<1602883373 at qq.com>;
抄送: "ndnsim"<ndnsim at lists.cs.ucla.edu>;
主题: Re: [ndnSIM] How to add a tag to the data?
Hi,
I think I responded to your question yesterday too:
Please take a look here:
http://www.lists.cs.ucla.edu/pipermail/ndnsim/2016-December/003250.html
Thanks,
Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/
Internet Research Laboratory
Computer Science Department
UCLA
On Apr 14, 2017, at 6:15 PM, 黑客 <1602883373 at qq.com> wrote:
I want to add a tag to the data before the producer sent data,for examole:
void
Producer::OnInterest(shared_ptr<const Interest> interest)
{
App::OnInterest(interest); // tracing inside
NS_LOG_FUNCTION(this << interest);
if (!m_active)
return;
Name dataName(interest->getName());
auto data = make_shared<Data>();
data->setName(dataName);
data->setFreshnessPeriod(::ndn::time::milliseconds(m_freshness.GetMilliSeconds()));
data->setContent(make_shared< ::ndn::Buffer>(m_virtualPayloadSize));
Signature signature;
if (m_keyLocator.size() > 0) {
signatureInfo.setKeyLocator(m_keyLocator);
}
signature.setInfo(signatureInfo);
signature.setValue(::ndn::makeNonNegativeIntegerBlock(::ndn::tlv::SignatureValue, m_signature));
data->setSignature(signature);
NS_LOG_INFO("node(" << GetNode()->GetId() << ") responding with Data: " << data->getName());
data->wireEncode();
// FwcontentCopyTag contentCopyTag;
// data->GetPayload()->AddPacketTag(contentCopyTag);
m_transmittedDatas(data, this, m_face);
m_appLink->onReceiveData(*data);
the red sentence is the question of me ? I want use that to add a tag ,but it is Useless;
so, I want to consult a way to achieve my ideal. thankyou!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170415/c89ce646/attachment.html>
More information about the ndnSIM
mailing list