Hi Alex,<br><br>I decided to use the code you provided as the base to build my own logic. I believe the erros that I reported in the previous e-mail was due to my lack of c++ experience.<br><br>Thank you so much for your fast and precise help.<br>
<br>Igor Ribeiro. <br><br><div class="gmail_quote">2013/3/12 Alex Afanasyev <span dir="ltr"><<a href="mailto:alexander.afanasyev@ucla.edu" target="_blank">alexander.afanasyev@ucla.edu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>Hi Igor,</div><div><br></div><div>The way you started implementing is the recommended way to extend forwarding strategy behavior.  You probably have some small linking problem.  If you can show us a little bit more code, we can try to point out what can be wrong.</div>
<div><br></div><div>If you want, you can check out an example that I put up here:</div><div><br></div><div><a href="https://github.com/cawka/ndnSIM-examples/blob/master/extensions/custom-strategies/pre-process-incoming-packets.h" target="_blank">https://github.com/cawka/ndnSIM-examples/blob/master/extensions/custom-strategies/pre-process-incoming-packets.h</a></div>
<div><a href="https://github.com/cawka/ndnSIM-examples/blob/master/extensions/custom-strategies/pre-process-incoming-packets.cc" target="_blank">https://github.com/cawka/ndnSIM-examples/blob/master/extensions/custom-strategies/pre-process-incoming-packets.cc</a></div>
<div><br></div><div>and scenario that uses this new "strategy":</div><div><a href="https://github.com/cawka/ndnSIM-examples/blob/master/scenarios/ndn-simple-with-packet-preprocessing.cc" target="_blank">https://github.com/cawka/ndnSIM-examples/blob/master/scenarios/ndn-simple-with-packet-preprocessing.cc</a></div>
<div><br></div><div>(You can simply clone <a href="https://github.com/cawka/ndnSIM-examples" target="_blank">https://github.com/cawka/ndnSIM-examples</a> repo and try it out).</div><div><br></div><div>Let us know if your problem still exists or solved.</div>
<div><br></div><div>Thanks,</div><div>Alex</div><div><br></div><br><div><div><div class="h5"><div>On Mar 11, 2013, at 8:01 PM, Igor <<a href="mailto:igorcompuff@gmail.com" target="_blank">igorcompuff@gmail.com</a>> wrote:</div>
<br></div></div><blockquote type="cite"><div><div class="h5">Hi Alex,<br><br>I would like to implement a packet verification before the actions in the method <b>ForwardingStrategy::OnData(...)</b>
 to be performed. I have tried to overwrite this method in a 
ForwardingStrategy derived class but I end up with a bunch of erros like
 this:<br>
<br><b>"./libns3-dev-ndnSIM-debug.so: undefined reference to `ns3::ndn::fw::CustomFlooding::OnData(ns3::Ptr<ns3::ndn::Face>, ns3::Ptr<ns3::ndn::ContentObjectHeader const>, ns3::Ptr<ns3::Packet>, ns3::Ptr<ns3::Packet const>)"</b><br>



<br>I could implement my code on the ForwardingStrategy class directly, but I am not sure if this is the best way.<br><br>Could you helpe me?<br><br>Best Regards,<br><br></div></div>Igor Ribeiro
_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
</blockquote></div><br></div></blockquote></div><br>