<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Arash,<div class=""><br class=""></div><div class="">ndnSIM is a platform that supports research and evolves as the research and understanding of NDN advances (it is not a product!). Therefore, changes will happen. This specific change has to do with the way that the NFD codebase and design evolves over time.</div><div class=""><br class=""></div><div class="">NFD uses NDNLP (NDN Link Protocol) that converts Interests and Data to Packets of the NDNLP layer. This is where the whole process is happening:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.6.2-ndnSIM/daemon/face/generic-link-service.cpp" class="">https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.6.2-ndnSIM/daemon/face/generic-link-service.cpp</a></div><div class=""><br class=""></div><div class="">Since you talked about documentation: Figure 6 and the related text explains the process: <a href="https://users.cs.fiu.edu/~afanasyev/assets/papers/mastorakis2017ndnsim.pdf" class="">https://users.cs.fiu.edu/~afanasyev/assets/papers/mastorakis2017ndnsim.pdf</a></div><div class=""><br class=""></div><div class="">The link to this paper is at multiple places on the ndnSIM website.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div></div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Nov 3, 2018, at 2:34 PM, Arash Daneshmand <<a href="mailto:arash.outline@gmail.com" class="">arash.outline@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">
Dear 
<span style="float:none;display:inline" class="">Spyridon</span>, <br class=""></div><div class="">Thank you for your reply.</div><div class=""><br class=""></div><div class="">The Function 
<span class="gmail-pl-en">NetDeviceTransport::doSend</span>(Packet&& packet) gets a NFD packet as an input and convert it to a ns3 Packet and has nothing to do with INTEREST.</div><div class=""><br class=""></div><div class="">How Can I convert an interest to a ns3 packet?? It can't be that hard ! Either I'm a slow learner or ndnSim has lack of documentation.</div><div class=""><br class=""></div><div class="">Thank You In advance for your help,<br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Sat, Nov 3, 2018 at 8:00 PM Spyridon (Spyros) Mastorakis <<a href="mailto:mastorakis@cs.ucla.edu" class="">mastorakis@cs.ucla.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">And these methods still exist with another name:<div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/8821d3e61095407b7f59f374e203eeb3b04c62f5/model/ndn-net-device-transport.cpp#L100-L136" target="_blank" class="">https://github.com/named-data-ndnSIM/ndnSIM/blob/8821d3e61095407b7f59f374e203eeb3b04c62f5/model/ndn-net-device-transport.cpp#L100-L136</a></div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class=""><div class="">
<div class=""><div class=""><div class=""><span style="float:none;display:inline!important" class="">Spyridon (Spyros) Mastorakis</span><br class=""><span style="float:none;display:inline!important" class="">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span style="float:none;display:inline!important" class="">Internet Research Laboratory</span><br class=""><span style="float:none;display:inline!important" class="">Computer Science Department</span><br class=""><span style="float:none;display:inline!important" class="">UCLA</span></div><div class=""><br class=""></div></div></div></div><div class=""><blockquote type="cite" class=""><div class="">On Nov 3, 2018, at 9:25 AM, Arash Daneshmand <<a href="mailto:arash.outline@gmail.com" target="_blank" class="">arash.outline@gmail.com</a>> wrote:</div><br class="m_6037566028533979686Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Dear 
<span style="float:none;display:inline" class="">Spyridon</span>,</div><div class="">Thank you for replying to my problem.</div><div class="">I've checked the example section in ndnSim website and all of them use the class<span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n"> ndn</span><span class="m_6037566028533979686m_-4172041086463153196gmail-o">::</span><span class="m_6037566028533979686m_-4172041086463153196gmail-n">AppHelper to create a consumer and producer.</span></span></div><div class=""><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n">what I'm trying to do is build a custom interest ,convert it to a packet and send it to the network. I've made the interest using these commands :</span></span></div><div class=""><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n"><br class=""></span></span></div><div class=""><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n">    shared_ptr<Interest> interest3 = make_shared<Interest>();<br class="">    interest3->setNonce(6);<br class="">    interest3->setName("interest3");<br class="">    time::milliseconds interestLifeTime(2);<br class="">    interest3->setInterestLifetime(interestLifeTime);<br class=""></span></span></div><div class=""><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n"><br class=""></span></span></div><div class=""><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n">now I want to convert the interest to a packet. ndnSim used to have a class (in versions 2.2 & before) called 
ns3::ndn::Convert that did the job using these functions : <br class=""></span></span></div><div class=""><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n"><br class=""></span></span></div><div class=""><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n">ns3::ndn::Convert::ToPacket< Data >(const T & pkt)     <br class=""></span></span></div><div class=""><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n">ns3::ndn::Convert::FromPacket< Data > (Ptr< Packet > packet)<br class=""></span></span></div><div class=""><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n"><br class=""></span></span></div><div class=""><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n">what I need now is these exact functions to convert interest to packets.</span></span></div><div class=""><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n"><br class=""></span></span></div><div class=""><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n">Thank You In Advance for your Kind help.<br class=""></span></span></div></div></div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Sat, Nov 3, 2018 at 7:13 PM Spyridon (Spyros) Mastorakis <<a href="mailto:mastorakis@cs.ucla.edu" target="_blank" class="">mastorakis@cs.ucla.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">Arash,<div class=""><br class=""></div><div class="">we have a number of simulation examples and applications on the ndnSIM website:</div><div class=""><br class=""></div><div class=""><a href="http://ndnsim.net/current/" target="_blank" class="">http://ndnsim.net/current/</a></div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class=""><div class="">
<div class=""><div class=""><div class=""><span style="float:none;display:inline!important" class="">Spyridon (Spyros) Mastorakis</span><br class=""><span style="float:none;display:inline!important" class="">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span style="float:none;display:inline!important" class="">Internet Research Laboratory</span><br class=""><span style="float:none;display:inline!important" class="">Computer Science Department</span><br class=""><span style="float:none;display:inline!important" class="">UCLA</span></div><div class=""><br class=""></div></div></div></div><div class=""><blockquote type="cite" class=""><div class="">On Nov 3, 2018, at 1:33 AM, Arash Daneshmand <<a href="mailto:arash.outline@gmail.com" target="_blank" class="">arash.outline@gmail.com</a>> wrote:</div><br class="m_6037566028533979686m_-4172041086463153196m_-4373277264480899066Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hello Again,</div><div class=""><br class=""></div><div class="">What I'm trying to do is create a custom interest with a prefix in the consumer, convert it to a packet, send it through a socket connection to the producer.</div><div class="">when the producer received the custom interest packet, extract it's prefix and check if the requested data is available , and then create a custom data , convert it to a packet and send it back to the consumer through a socket connection.<br class=""></div><div class=""><br class=""></div><div class="">
some examples or pieces of c++ codes to do such a thing would help me a lot.<br class=""></div><div class=""><br class=""></div><div class="">Is it possible to create such a scenario and do the whole thing manually? <br class=""></div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Arash<br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri, Nov 2, 2018 at 9:27 PM Arash Daneshmand <<a href="mailto:arash.outline@gmail.com" target="_blank" class="">arash.outline@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div dir="ltr" class="">Dear Junxiao Shi,</div><div dir="ltr" class=""><br class=""></div><div class="">what are the required includes for these functions?</div><div class="">I got no 
setParameter() and 
getParameters() for my created interest.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Arash<br class="">



</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri, Nov 2, 2018 at 4:09 PM Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu" target="_blank" class="">shijunxiao@email.arizona.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><div dir="auto" class="">Hi Arash</div></div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Interest interest("/A"); // create Interest</div><div dir="auto" class="">interest.setParameters("C0C1C2C3"_block); // add payload</div><div dir="auto" class="">face.expressInterest(interest, onData, onNack, onTimeout); // send Interest</div><div dir="auto" class="">std::cout << interest.getParameters(); // examine payload</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Yours, Junxiao</div><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri, Nov 2, 2018 at 08:25 Arash Daneshmand <<a href="mailto:arash.outline@gmail.com" target="_blank" class="">arash.outline@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="">Greetings,</div><div class=""><br class=""></div><div class="">I want to create a custom interest packet with my custom payload and send it through the consumer. I want to be able to examine the interest and response packets in the consumer and producer. <br class=""></div><div class="">I was hoping you could help me with some examples or pieces of c++ codes.</div><div class=""><br class=""></div><div class="">Thank You In Advance,</div><div class="">Arash Daneshmand<br class=""></div></div></blockquote></div></div></blockquote></div></blockquote></div><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></body></html>