<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Joao,</div><div><br></div><div>For the producer/consumer applications, you may want to check out this section of ndnSIM website: <a href="http://ndnsim.net/applications.html#custom-applications">http://ndnsim.net/applications.html#custom-applications</a></div><div><br></div><div>1/ Implementing your custom Producer should be straightforward.  You just need to create a class derived from ndn::App and override onInterest method, in which you implement your logic what to put into content object  (you can use apps/ndn-producer.cc as a reference).</div><div><br></div><div>2/ For Consumer, depending on how smart you want your consumer be (e.g., does it need to detect not satisfied interest and reexpress interest or not), implementation can be simple or a little bit more complex.   If you need advanced functionality, you may want to create your custom class derived from ndn::ConsumerCbr/ndn::ConsumerBatches/ndn::ConsumerZipfMandelbrot and override OnContentObject method to store the incoming data.</div><div><br></div><div>You can also create a class derived just from ndn::App, but then you'll have to implement your own logic when to express Interest and whether or not to detect not satisfied Interests (like in here <a href="http://ndnsim.net/applications.html#dumb-requester">http://ndnsim.net/applications.html#dumb-requester</a>).</div><div><br></div><div>3/ If you want modify FIB entry on the node, which has your Consumer app installed, then you can do FIB updates from your overridden onContentObject method  (to get pointer to FIB, use can use this:  <span class="n" style="font-size: 12px; line-height: 14px; text-align: left; ">Ptr</span><span class="o" style="font-size: 12px; line-height: 14px; text-align: left; color: rgb(102, 102, 102); "><</span><span class="n" style="font-size: 12px; line-height: 14px; text-align: left; ">ndn</span><span class="o" style="font-size: 12px; line-height: 14px; text-align: left; color: rgb(102, 102, 102); ">::</span><span class="n" style="font-size: 12px; line-height: 14px; text-align: left; ">Fib</span><span class="o" style="font-size: 12px; line-height: 14px; text-align: left; color: rgb(102, 102, 102); ">></span><span style="font-size: 12px; line-height: 14px; text-align: left; "> </span><span class="n" style="font-size: 12px; line-height: 14px; text-align: left; ">fib</span><span style="font-size: 12px; line-height: 14px; text-align: left; "> </span><span class="o" style="font-size: 12px; line-height: 14px; text-align: left; color: rgb(102, 102, 102); ">=</span><span style="font-size: 12px; line-height: 14px; text-align: left; "> </span><span class="n" style="font-size: 12px; line-height: 14px; text-align: left; ">GetNode</span><span style="font-size: 12px; line-height: 14px; text-align: left; "> </span><span class="p" style="font-size: 12px; line-height: 14px; text-align: left; ">()</span><span class="o" style="font-size: 12px; line-height: 14px; text-align: left; color: rgb(102, 102, 102); ">-></span><span class="n" style="font-size: 12px; line-height: 14px; text-align: left; ">GetObject</span><span class="o" style="font-size: 12px; line-height: 14px; text-align: left; color: rgb(102, 102, 102); "><</span><span class="n" style="font-size: 12px; line-height: 14px; text-align: left; ">ndn</span><span class="o" style="font-size: 12px; line-height: 14px; text-align: left; color: rgb(102, 102, 102); ">::</span><span class="n" style="font-size: 12px; line-height: 14px; text-align: left; ">Fib</span><span class="o" style="font-size: 12px; line-height: 14px; text-align: left; color: rgb(102, 102, 102); ">></span><span style="font-size: 12px; line-height: 14px; text-align: left; "> </span><span class="p" style="font-size: 12px; line-height: 14px; text-align: left; ">(); </span>)</div><div><br></div><div>If you want to modify FIBs when a packet just passes by, then you would need to create your own forwarding strategy, that implements FIB modification logic in one of the overridden methods/events (OnInterest or OnData).</div><div><br></div><div>Sincerely,</div><div>Alex</div><div><br></div><div><div>On Feb 28, 2013, at 5:51 AM, Joćo Torres <<a href="mailto:torres.jv@gmail.com">torres.jv@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi,<div><br></div><div style="">I would like help with three tasks:</div><div style=""><br></div><div style="">1 - Customize Producer to write some information in Content Packet;</div><div style=""><br></div><div style="">
2 - Customize Consumer to store Content Packet information (a piece) in memory;</div><div style=""><br></div><div style="">3 - Alter FIB entries at runtime based on Packet information.</div><div style=""><br></div><div style=""><br></div>
<div style="">Could you give me some hints related to the best approach? Which strutures to alter?</div><div style=""><br></div><div style="">Thanks in advance.</div></div></blockquote></div></body></html>