<div dir="ltr">Hello,<div><br></div><div>I faced this a few days ago, here's a link that helped me: <a href="https://lo.calho.st/networks/adding-custom-packet-fields-to-packets-in-ndnsim-2-3-without-forking-the-entire-repository/" target="_blank">https://lo.calho.st/networ<wbr>ks/adding-custom-packet-fields<wbr>-to-packets-in-ndnsim-2-3-<wbr>without-forking-the-entire-rep<wbr>ository/</a></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 17, 2017 at 7:11 AM, Spyridon (Spyros) Mastorakis <span dir="ltr"><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div>I would suggest that you start with the basics of object oriented programming in C++ before using ndnSIM:</div><div><br></div><div><a href="https://www.tutorialspoint.com/cplusplus/cpp_object_oriented.htm" target="_blank">https://www.tutorialspoint.com<wbr>/cplusplus/cpp_object_oriented<wbr>.htm</a></div><div><br></div><div>Thanks,</div><div><span><br><div>
<div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~m<wbr>astorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div><div><br></div></div></div></div></span><div><div class="m_2076753450381461596m_7171327766197588758h5"><div><blockquote type="cite"><div>On Apr 15, 2017, at 12:08 AM, 黑客 <<a href="mailto:1602883373@qq.com" target="_blank">1602883373@qq.com</a>> wrote:</div><br class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-interchange-newline"><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">FwcontentCopyTag  is<span class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-converted-space"> </span></span><span id="m_2076753450381461596m_7171327766197588758m_4713138833738635018result_box" class="m_2076753450381461596m_7171327766197588758m_4713138833738635018short_text" lang="en" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span>Constructor<span class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-converted-space"> </span></span></span><span id="m_2076753450381461596m_7171327766197588758m_4713138833738635018result_box" class="m_2076753450381461596m_7171327766197588758m_4713138833738635018short_text" lang="en" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span>tag  of me  ,but i can not add it to the data.<br></span></span><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-family:'Arial Narrow';padding:2px 0px">------------------ 原始邮件 ------<wbr>------------</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(239,239,239);padding:8px"><div><b>发件人:</b><span class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-converted-space"> </span>"Spyridon (Spyros) Mastorakis"<<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla<wbr>.edu</a>>;<span class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-converted-space"> </span></div><div><b>发送时间:</b><span class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-converted-space"> </span>2017年4月15日(星期六) 上午10:55</div><div><b>收件人:</b><span class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-converted-space"> </span>"黑客"<<a href="mailto:1602883373@qq.com" target="_blank">1602883373@qq.com</a>>;<span class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-converted-space"> </span></div><div><b>抄送:</b><span class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-converted-space"> </span>"ndnsim"<<a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.u<wbr>cla.edu</a>>;<span class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-converted-space"> </span></div><div><b>主题:</b><span class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-converted-space"> </span>Re: [ndnSIM] How to add a tag to the data?</div></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Hi,</span><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">I think I responded to your question yesterday too:</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><br></div><div>Please take a look here:</div><div><br></div><div><a href="http://www.lists.cs.ucla.edu/pipermail/ndnsim/2016-December/003250.html" target="_blank">http://www.lists.cs.ucla.edu/p<wbr>ipermail/ndnsim/2016-December/<wbr>003250.html</a></div><div><br></div><div>Thanks,</div></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website:<span class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-converted-space"> </span></span><a href="http://cs.ucla.edu/%7Emastorakis/" target="_blank">http://cs.ucla.edu/~m<wbr>astorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div><div><br></div></div></div></div><div><blockquote type="cite"><div>On Apr 14, 2017, at 6:15 PM, 黑客 <<a href="mailto:1602883373@qq.com" target="_blank">1602883373@qq.com</a>> wrote:</div><br class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-interchange-newline"><div>I want to add a tag to the data before the producer sent data,for examole:<br><br><br>void<br>Producer::OnInterest(shared_pt<wbr>r<const Interest> interest)<br>{<br>  App::OnInterest(interest); // tracing inside<br>  NS_LOG_FUNCTION(this << interest);<br>  if (!m_active)<br>    return;<br>  Name dataName(interest->getName());<br>  auto data = make_shared<Data>();<br>  data->setName(dataName);<br>  data->setFreshnessPeriod(::ndn<wbr>::time::milliseconds(m_freshne<wbr>ss.GetMilliSeconds()));<br>  data->setContent(make_shared< ::ndn::Buffer>(m_virtualPayloa<wbr>dSize));<br>  Signature signature;<br>    if (m_keyLocator.size() > 0) {<br>    signatureInfo.setKeyLocator(m_<wbr>keyLocator);<br>  }<br>  signature.setInfo(signatureInf<wbr>o);<br>  signature.setValue(::ndn::make<wbr>NonNegativeIntegerBlock(::ndn:<wbr>:tlv::SignatureValue, m_signature));<br>  data->setSignature(signature);<br>  NS_LOG_INFO("node(" << GetNode()->GetId() << ") responding with Data: " << data->getName());<br>  data->wireEncode();<br> <span class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-converted-space"> </span><span style="color:rgb(255,0,0)">// FwcontentCopyTag contentCopyTag;<br> // data->GetPayload()->AddPacketT<wbr>ag(contentCopyTag);</span><br>  m_transmittedDatas(data, this, m_face);<br>  m_appLink->onReceiveData(*data<wbr>);<br>   <span class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-converted-space"> </span><br><br>the red sentence is the question of me  ?  I want use that to add a tag ,but it is Useless;<br>so, I want to consult a way to achieve my ideal. thankyou!<br></div></blockquote></div><br></div><br class="m_2076753450381461596m_7171327766197588758m_4713138833738635018Apple-interchange-newline"></div></blockquote></div><br></div></div></div></div><br>______________________________<wbr>_________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/m<wbr>ailman/listinfo/ndnsim</a><br>
<br></blockquote></div><br></div></div>