<div dir="ltr">Hi John<div><br></div><div>I would say looking at the face scope attribute is a more reliable solution than testing for the exact type:</div><div><br></div><div><font face="monospace, monospace">switch (face->getScope()) {</font></div><div><font face="monospace, monospace">  case ndn::nfd::FACE_SCOPE_LOCAL:</font></div><div><font face="monospace, monospace">    // application</font></div><div><font face="monospace, monospace">    break;</font></div><div><font face="monospace, monospace">  case ndn::nfd::FACE_SCOPE_NON_LOCAL:</font></div><div><font face="monospace, monospace">    // network</font></div><div><font face="monospace, monospace">    break;</font></div><div><font face="monospace, monospace">  default:</font></div><div><font face="monospace, monospace">    NS_ASSERT(false);</font></div><div><font face="monospace, monospace">    break;</font></div><div><font face="monospace, monospace">}</font></div><div><br></div><div><br></div><div>Yours, Junxiao<br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 19, 2016 at 11:46 PM, Alex Afanasyev <span dir="ltr"><<a href="mailto:aa@cs.ucla.edu" target="_blank">aa@cs.ucla.edu</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span class=""><blockquote type="cite"><div><div dir="ltr"><div>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.</div></div></div></blockquote><div><br></div></span><div>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 <a>netdev://[<mac-addr></a>]" (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:</div><div><br></div><div>Face* face = ...;</div><div>if (dynamic_cast<<wbr>NetDeviceLinkService*>(face-><wbr>getLinkService()) != nullptr) {</div><div>  // do stuff</div><div>}</div><div><br></div></div></div></blockquote></div></div></div></div>