[ndnSIM] Identifying an interface (face?)

Alex Afanasyev aa at CS.UCLA.EDU
Sat Nov 19 22:46:23 PST 2016

> On Nov 19, 2016, at 6:04 PM, John Baugh <jpbaugh at umich.edu> wrote:
> Greetings again ndnSIM friends,
> What is the appropriate way to identify what interface a particular Data packet is received (or sent?) on?
> Here's a scenario:
> Assume there is a router, R with a Content Store, between a producer, P, and several consumers, C1, C2, C3, ..., Cn.  

This depends on your topology.  If you're using PointToPoint links (this is the case in in most of the examples), then you will have a dedicated link between producer and consumers and, consequently, a dedicated face.

If you're simulating a multi-access link (e.g., WiFi scenarios), then it is not the case.

> Will the router naturally have a single interface exposed for each consumer?  Or can multiple consumers communicate over the same interface (e.g., send Interests across the same interface/Face)?
> I'd like to be able to determine how much and which data arrives on a particular interface.  I suppose I somehow need to obtain a FaceId, and somehow determine which Data arrives on that face?  Also, I need to be able to distinguish between Faces among applications and NFD, and between NFD and the "outside world" - i.e., which are ACTUALLY network interfaces.

The answer depends on where you want to achieve this function.  If you're looking at the logs, the Face associated with the NetDevice identifies itself as netdev://[<mac-addr>]" (netdev prefix).  If you have a pointer/reference to the face and want to determine whether it is one to the outside world, you can use dynamic_cast:

Face* face = ...;
if (dynamic_cast<NetDeviceLinkService*>(face->getLinkService()) != nullptr) {
  // do stuff


> Ideas?
> Thanks,
> John
> P.S. - I am slowly, but surely, understanding this simulator much better, and I appreciate all of your patience.  I am currently working on a very thorough tutorial/reference for myself, and once somewhat refined with very good examples I will release it to the community to help people get up to speed even fast - at least that's the goal.
> _______________________________________________
> 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/20161119/187138fa/attachment-0001.html>

More information about the ndnSIM mailing list