[ndnSIM] Alter FIB entries at runtime based on Packet information

Alex Afanasyev alexander.afanasyev at ucla.edu
Thu Feb 28 11:45:06 PST 2013

Hi Joao,

For the producer/consumer applications, you may want to check out this section of ndnSIM website: http://ndnsim.net/applications.html#custom-applications

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).

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.

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 http://ndnsim.net/applications.html#dumb-requester).

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:  Ptr<ndn::Fib> fib = GetNode ()->GetObject<ndn::Fib> (); )

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).


On Feb 28, 2013, at 5:51 AM, João Torres <torres.jv at gmail.com> wrote:

> Hi,
> I would like help with three tasks:
> 1 - Customize Producer to write some information in Content Packet;
> 2 - Customize Consumer to store Content Packet information (a piece) in memory;
> 3 - Alter FIB entries at runtime based on Packet information.
> Could you give me some hints related to the best approach? Which strutures to alter?
> Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130228/6f480452/attachment.html>

More information about the ndnSIM mailing list