[ndnSIM] How to Add new face in ForwardingStragy.cc
alexander.afanasyev at ucla.edu
Thu Apr 11 10:13:10 PDT 2013
You can use ndn::L3Protocol interface (http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_l3_protocol.html#a9d1161fc700b8a4fd793c4ff5644a6af) to convert face id to Ptr<Face>, assuming that you're trying to convert node's face id to Ptr<Node> (otherwise it would not make sense). For example, you can do a following:
// input: int faceId;
Ptr<ndn::L3Protocol> ndn = ?; // depending on where you're calling, you may use this->GetObject<ndn::L3Protocol> ();
Ptr<ndn::Face> face = ndn->GetFaceById (faceId);
On Apr 10, 2013, at 7:21 PM, 王楠 <youshou_wy at 126.com> wrote:
> Hi Alex,
> I add few new bits in the Interest , and these bits are to store some Face Id. I wanna add a new FIB entry using
> m_fib->Add ((header->GetName()), inFace, metric), but how can I generate a Ptr<Face> face when i only have the
> Face ID ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM