[ndnSIM] help about getting all the node out faces

sofia sophie sofiasophie001 at gmail.com
Sat Aug 1 08:19:32 PDT 2020

Hi all,
I need your help. if it is possible.
In the forwarding strategy file, when we use a loop to get the node out
Faces. It should return a list of all the node out faces, Isn't it?
In my case, it return just one out face for each node in the network. I
don't  know why.
In my topology, each network node has at least two connected faces.
However, I need to get all the node outFaces.

I use the code below to get the node out faces:

for (const auto& nexthop : nexthops) {
Face& outFace = nexthop.getFace();
std::cout <<"outFace.getId: "<<outFace.getId()<<" outFace.getMetric:

if ((outFace.getId() == inFace.getId() && outFace.getLinkType() !=
ndn::nfd::LINK_TYPE_AD_HOC) ||
wouldViolateScope(inFace, interest, outFace)) {
std::cout <<"outFace.getId: "<<outFace.getId()<<" outFace.getMetric:

you find below the out put:

Node Id : 0
outFace.getId: 257 outFace.getMetric: 1*
Node Id : 1
outFace.getId: 257 outFace.getMetric: 1
Node Id : 4
outFace.getId: 258 outFace.getMetric: 30
Node Id : 12
outFace.getId: 258 outFace.getMetric: 1
Node Id : 13
outFace.getId: 258 outFace.getMetric: 1
Node Id : 14
outFace.getId: 258 outFace.getMetric: 4

I will be thankful for your help.
Best Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20200801/d60e82d4/attachment.html>

More information about the ndnSIM mailing list