[ndnSIM] How to deal with just arrived Data Packets in a custom way

Alex Afanasyev alexander.afanasyev at ucla.edu
Mon Mar 11 21:14:20 PDT 2013


Hi Igor,

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.

If you want, you can check out an example that I put up here:

https://github.com/cawka/ndnSIM-examples/blob/master/extensions/custom-strategies/pre-process-incoming-packets.h
https://github.com/cawka/ndnSIM-examples/blob/master/extensions/custom-strategies/pre-process-incoming-packets.cc

and scenario that uses this new "strategy":
https://github.com/cawka/ndnSIM-examples/blob/master/scenarios/ndn-simple-with-packet-preprocessing.cc

(You can simply clone https://github.com/cawka/ndnSIM-examples repo and try it out).

Let us know if your problem still exists or solved.

Thanks,
Alex


On Mar 11, 2013, at 8:01 PM, Igor <igorcompuff at gmail.com> wrote:

> Hi Alex,
> 
> I would like to implement a packet verification before the actions in the method ForwardingStrategy::OnData(...) 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:
> 
> "./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>)"
> 
> I could implement my code on the ForwardingStrategy class directly, but I am not sure if this is the best way.
> 
> Could you helpe me?
> 
> Best Regards,
> 
> Igor Ribeiro _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130311/0c3eada6/attachment.html>


More information about the ndnSIM mailing list