<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Just a follow-up on this one:<div class=""><br class=""></div><div class="">Another way that probably would be simpler is to add your new fields to the name of the Interest and Data packet as new name components. Then, you can handle those components in your application using the API of the Name class provided by the ndn-cxx library:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.3.4-ndnSIM/src/name.hpp" class="">https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.3.4-ndnSIM/src/name.hpp</a></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 class=""><span class="" style="float: none; display: inline !important;"><br class=""></span></div></div></div><div class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Mar 24, 2016, at 10:53 PM, Spyridon (Spyros) Mastorakis <<a href="mailto:mastorakis@cs.ucla.edu" class="">mastorakis@CS.UCLA.EDU</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">some trivial changes off the top of my head are to add some get and set methods for the new fields (and define the new fields as well). These changes should be made here (and to the corresponding header files):</div><div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.3.4-ndnSIM/src/interest.cpp" class="">https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.3.4-ndnSIM/src/interest.cpp</a></div><div class=""><a href="https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.3.4-ndnSIM/src/data.cpp" class="">https://github.com/named-data-ndnSIM/ndn-cxx/blob/ndn-cxx-0.3.4-ndnSIM/src/data.cpp</a></div><div class=""><br class=""></div><div class="">You would also need to modify the wireEncode and wireDecode methods of the Interest and Data class (files mentioned above) to encode and decode the new fields to/from wire format.</div><div class=""><br class=""></div><div class="">When you are done with these changes, you should be able to use the new fields in your applications. You just need to get and set the fields in the way that your approach works (e.g., when you express an Interest in your consumer application set the new field of the interest packet, when you receive an Interest in your producer application read the new field of this packet and add the appropriate field to the data packet etc..).</div><div class=""><br class=""></div><div class="">Please let me know if you need any additional information.</div><div class=""><br class=""></div><div 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 class=""><br class=""></div></div></div>
</div>
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 19, 2016, at 9:49 PM, Shahid Md. Asif Iqbal <<a href="mailto:asifcsep@gmail.com" class="">asifcsep@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="">Dear All,<br class=""><pre class="">I would like to try an idea where the consumers first try to <br class="">discover the available content providers, then get the content <br class="">from one of the providers sending the actual request packets.<br class=""></pre><pre class="">Here is my thoughts:

I have added one field to the interest packet to indicate the<br class="">type of the interest : discover or request<br class=""><br class=""></pre><pre class="">I have added one field to the data packet to indicate the type<br class=""></pre><pre class="">of the data packet : content-offer or content-real<br class=""></pre>content-offer is same as content-real except the content field is empty.<br class=""><br class=""></div>Now, please help me to identify what other things do I need to do to make my changes work especially in the consumer and producer files. <br class=""><br class=""></div>Thanking in advance<br class=""></div><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">ndnSIM mailing list<br class=""><a href="mailto:ndnSIM@lists.cs.ucla.edu" class="">ndnSIM@lists.cs.ucla.edu</a><br class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim<br class=""></div></blockquote></div><br class=""></div></body></html>