[ndnSIM] How can I get the contents ahout PIT.

Junxiao Shi shijunxiao at email.arizona.edu
Thu Nov 3 14:48:38 PDT 2016


Hi Runtong

Spyros has given the right way to do it. I'll address why the two snippets
are wrong.

Ptr<nfd::Pit> pit = node->GetObject<nfd::Pit> ();
>
In ns-3 object model
<https://www.nsnam.org/docs/release/3.25/manual/html/object-model.html>,
ObjectBase::GetObject can return an object aggregated into the current
object, or cast the current object as a subclass type. nfd::Pit is not
aggregated into the node, so this does not work.
If ndnSIM is designed ground-up following ns-3 principles, nfd::Pit should
be aggregated. But nfd::Pit is imported from NFD codebase that is not
designed for ns-3, so that it's not aggregated.

ns3::ndn::L3Protocol, as mentioned in Spyros's answer, is aggregated into
the node, and serves as an entrypoint to access NFD's objects.

Ptr<nfd::pit::Entry> entry = node->GetObject<nfd::pit::Entry> ();
>
ns-3 object model allows only one instance of each object to be aggregated.
Since each node has multiple Interest Table entries, it's wrong to
aggregate the entry.
Similarly, a ns3::NetDevice is not aggregated into a ns3::Node.

Yours, Junxiao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20161103/2e289e32/attachment.html>


More information about the ndnSIM mailing list