<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello Yali,<div class=""><br class=""></div><div class="">please use the “answer-all” option when your answer, so that the email exchange is visible to all the subscribers of the mailing list.</div><div class=""><br class=""></div><div class="">An easy way to create a special Interest packet is to include a special name prefix to your Interests. To that end, you need to specify the following to your simulation scenario (assuming a Cbr Consumer application):</div><div class=""><br class=""></div><div class=""><pre style="overflow-x: auto; overflow-y: hidden; padding: 5px; line-height: 14.399999618530273px; border-top-width: 1px; border-bottom-width: 1px; border-style: solid none; border-top-color: rgb(170, 204, 153); border-bottom-color: rgb(170, 204, 153); background-color: rgb(238, 255, 204);" class=""><span class="hll" style="background-color: rgb(255, 255, 136);"><span class="c1" style="color: rgb(64, 128, 144); font-style: italic;">// Consumer</span>
</span><span class="hll" style="background-color: rgb(255, 255, 136);">  <span class="n">ndn</span><span class="o" style="color: rgb(102, 102, 102);">::</span><span class="n">AppHelper</span> <span class="n">consumerHelper</span> <span class="p">(</span><span class="s" style="color: rgb(64, 112, 160);">"ns3::ndn::ConsumerCbr"</span><span class="p">);</span></span><span class="hll" style="background-color: rgb(255, 255, 136);">
</span><span class="hll" style="background-color: rgb(255, 255, 136);">  <span class="n">consumerHelper</span><span class="p">.</span><span class="n">SetPrefix</span> <span class="p">(</span><span class="s" style="color: rgb(64, 112, 160);">“/hello"</span><span class="p">);</span></span></pre><div class="">Then, you will need to modify the OnInterest method of the <b class="">apps/</b><a href="http://ndn-producer.cc" style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; font-size: 13px; line-height: 16px; white-space: nowrap; font-weight: bold;" class="">ndn-producer.cc</a><b style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; font-size: 13px; line-height: 16px; white-space: nowrap;" class="">, </b><font face="Lucida Grande, Verdana, Geneva, Arial, sans-serif" size="2" class=""><span style="line-height: 16px; white-space: nowrap;" class="">in order to handle this special Interest in the way that you want when it reaches a producer.</span></font></div></div><div class=""><br class=""><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">--</div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Spyridon (Spyros) Mastorakis<br class=""></div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Personal Website: <a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a></div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Internet Research Laboratory</div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">PhD Computer Science<br class="">UCLA</div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><br class=""><br class=""></div></div></div></div></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Jan 15, 2015, at 5:39 PM, Yali Wang <<a href="mailto:ylwang@soe.ucsc.edu" class="">ylwang@soe.ucsc.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p dir="ltr" class="">Thanks.<br class="">
I know what you meant, but how to reset a new interest in my hello message case? That's what I asked.<br class="">
Can you please write an example?<br class="">
There are too many new parameters, <br class="">
 difficult for me to follow without example. <br class="">
Yali</p>
<div class="gmail_quote">On Jan 15, 2015 5:32 PM, "Spyridon (Spyros) Mastorakis" <<a href="mailto:spiros.mastorakis@gmail.com" class="">spiros.mastorakis@gmail.com</a>> wrote:<br type="attribution" class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hello Yali,<div class=""><br class=""></div><div class="">I forward your email to the ndnSIM maliing list in order to be visible to all the ndnSIM users. </div><div class=""><br class=""></div><div class="">Regarding your question:</div><div class=""><br class=""></div><div class="">This error means that the packet, which is received, has a header that cannot be recognized by ndnSIM. ndnSIM implements the communication model of NDN where two types of packets are defined: The Interest and the data packet. Hello packets are not defined.</div><div class=""><br class=""></div><div class="">Therefore, if a packet is neither an Interest nor a Data packet, the communication paradigm is violated. </div><div class="">If you really want to exchange Hello packets though, you will need either to specify a special Interest packet for this purpose (i.e., change the Interest class) and handle this Interest packet in a special way or to hack somehow the wire encoding/decoding methods and the face class in order to encode, decode and accept, respectively, packets other than Interest and Data. </div><div class=""><br class=""></div><div class="">Hope this helps.</div><div class=""><br class=""></div><div class=""><div class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class="">--</div><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class="">Spyridon (Spyros) Mastorakis<br class=""></div><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class="">Personal Website: <a href="http://cs.ucla.edu/~mastorakis/" target="_blank" class="">http://cs.ucla.edu/~mastorakis/</a></div><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class="">Internet Research Laboratory</div><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class="">PhD Computer Science<br class="">UCLA</div><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><br class=""><br class=""><br class=""></div></div></div></div></div></div></div>
</div>
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 15, 2015, at 4:54 PM, Yali Wang <<a href="mailto:ylwang@soe.ucsc.edu" target="_blank" class="">ylwang@soe.ucsc.edu</a>> wrote:</div><br class=""><div class="">Hello,<br class=""><br class="">I want to send to all neighbors the periodic Hello message(regular packet) via ndn-netdevice-face class, and it works fine. but it gets stuck on header part.<br class="">I don't know what to put in header part. Here is my definition of packet:<br class=""><br class="">m_packet = Create<Packet> (reinterpret_cast<const uint8_t*> (str), size);<br class=""><br class="">Ndnsim needs the wire encoding(0x01,0xD2 as interest-ccnb) to decide if receives the interest or data.  How to solve my issue?  I only want to send hello messages.<br class="">As below, it is error message from <a href="http://ndn-face.cc/" target="_blank" class="">ndn-face.cc</a><br class=""><br class="">msg="Unknown NDN header. Should not happen", file=../src/ndnSIM/model/<a href="http://ndn-face.cc/" target="_blank" class="">ndn-face.cc</a>, line=196<br class="">libc++abi.dylib: terminating with uncaught exception of type ns3::ndn::UnknownHeaderException<br class="">Command ['/Users/yawang/ndnSIM/ns-3/build/src/ndnSIM/examples/ns3-dev-ndn-grid-topo-plugin-debug'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").<br class=""><br class=""><br class="">Thank you!<br class="">Yali<br class=""></div></blockquote></div><br class=""></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></body></html>