[ndnSIM] [EXT] help about getting all the node out faces

Junxiao Shi shijunxiao at email.arizona.edu
Sat Aug 1 09:30:22 PDT 2020


Hi Sofia

The FIB nexthop list only contains the routes added to the FIB.
If the routing helper is configured to insert only the shortest route,
you'll see only one nexthop in the FIB nexthop list.
To see multiple nexthops, you need to configure the routing helper to
insert multiple routes.

Yours, Junxiao

On Sat, Aug 1, 2020 at 10:20 AM sofia sophie via ndnSIM <
ndnsim at lists.cs.ucla.edu> wrote:

> *External Email*
> 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:
> "<<outFace.getMetric()<<std::endl;
>
> if ((outFace.getId() == inFace.getId() && outFace.getLinkType() !=
> ndn::nfd::LINK_TYPE_AD_HOC) ||
> wouldViolateScope(inFace, interest, outFace)) {
> continue;
> }
> std::cout <<"outFace.getId: "<<outFace.getId()<<" outFace.getMetric:
> "<<outFace.getMetric()<<std::endl;
> }
>
>
> 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
> _______________________________________________
> 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/20200801/f7662bd3/attachment.html>


More information about the ndnSIM mailing list