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

Igor igorcompuff at gmail.com
Tue Mar 12 09:10:50 PDT 2013


Hi Alex,

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.

Thank you so much for your fast and precise help.

Igor Ribeiro.

2013/3/12 Alex Afanasyev <alexander.afanasyev at ucla.edu>

> 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/20130312/4a0ba5e9/attachment.html>


More information about the ndnSIM mailing list