<div dir="ltr"><div>
Dear 
<span style="float:none;display:inline">Spyridon</span>, <br></div><div>Thank you for your reply.</div><div><br></div><div>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><br></div><div>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><br></div><div>Thank You In advance for your help,<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Nov 3, 2018 at 8:00 PM Spyridon (Spyros) Mastorakis <<a href="mailto:mastorakis@cs.ucla.edu">mastorakis@cs.ucla.edu</a>> wrote:<br></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">And these methods still exist with another name:<div><br></div><div><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/8821d3e61095407b7f59f374e203eeb3b04c62f5/model/ndn-net-device-transport.cpp#L100-L136" target="_blank">https://github.com/named-data-ndnSIM/ndnSIM/blob/8821d3e61095407b7f59f374e203eeb3b04c62f5/model/ndn-net-device-transport.cpp#L100-L136</a></div><div><br></div><div>Thanks,</div><div><br></div><div><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/~mastorakis/</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 Nov 3, 2018, at 9:25 AM, Arash Daneshmand <<a href="mailto:arash.outline@gmail.com" target="_blank">arash.outline@gmail.com</a>> wrote:</div><br class="m_6037566028533979686Apple-interchange-newline"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear 
<span style="float:none;display:inline">Spyridon</span>,</div><div>Thank you for replying to my problem.</div><div>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><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><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n"><br></span></span></div><div><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n">    shared_ptr<Interest> interest3 = make_shared<Interest>();<br>    interest3->setNonce(6);<br>    interest3->setName("interest3");<br>    time::milliseconds interestLifeTime(2);<br>    interest3->setInterestLifetime(interestLifeTime);<br></span></span></div><div><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n"><br></span></span></div><div><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></span></span></div><div><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n"><br></span></span></div><div><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n">ns3::ndn::Convert::ToPacket< Data >(const T & pkt)     <br></span></span></div><div><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n">ns3::ndn::Convert::FromPacket< Data > (Ptr< Packet > packet)<br></span></span></div><div><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n"><br></span></span></div><div><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><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n"><br></span></span></div><div><span class="m_6037566028533979686m_-4172041086463153196gmail-hll"><span class="m_6037566028533979686m_-4172041086463153196gmail-n">Thank You In Advance for your Kind help.<br></span></span></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Nov 3, 2018 at 7:13 PM Spyridon (Spyros) Mastorakis <<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>> wrote:<br></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">Arash,<div><br></div><div>we have a number of simulation examples and applications on the ndnSIM website:</div><div><br></div><div><a href="http://ndnsim.net/current/" target="_blank">http://ndnsim.net/current/</a></div><div><br></div><div>Thanks,</div><div><br></div><div><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/~mastorakis/</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 Nov 3, 2018, at 1:33 AM, Arash Daneshmand <<a href="mailto:arash.outline@gmail.com" target="_blank">arash.outline@gmail.com</a>> wrote:</div><br class="m_6037566028533979686m_-4172041086463153196m_-4373277264480899066Apple-interchange-newline"><div><div dir="ltr"><div>Hello Again,</div><div><br></div><div>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>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></div><div><br></div><div>
some examples or pieces of c++ codes to do such a thing would help me a lot.<br></div><div><br></div><div>Is it possible to create such a scenario and do the whole thing manually? <br></div><div><br></div><div>Thanks,</div><div>Arash<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 2, 2018 at 9:27 PM Arash Daneshmand <<a href="mailto:arash.outline@gmail.com" target="_blank">arash.outline@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Dear Junxiao Shi,</div><div dir="ltr"><br></div><div>what are the required includes for these functions?</div><div>I got no 
setParameter() and 
getParameters() for my created interest.</div><div><br></div><div>Thanks,</div><div>Arash<br>



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