[ndnSIM] Two questions about nfd Face

Alex Afanasyev aa at cs.fiu.edu
Sat Jan 6 12:21:27 PST 2018



> On Jan 4, 2018, at 5:45 PM, chavoosh ghasemi <chavoosh.ghasemi.off at gmail.com <mailto:chavoosh.ghasemi.off at gmail.com>> wrote:
> 
> Looks a good solution.
> Anyway, how do you cast <nfd::face::Transport>  to <ns3::NetDevice>? Apparently, it cannot be handled automatically (or even by using ns3::DynamicCast and dynamic_cast).

I didn't say cast Transport to NetDevice, Transport to NetDeviceTransport.  After successful dynamic cast you can get NetDevice from the NetDeviceTransport instance.

--
Alex

> 
> 
> On Thu, Jan 4, 2018 at 11:53 AM, Alex Afanasyev <aa at cs.fiu.edu <mailto:aa at cs.fiu.edu>> wrote:
> 
> 
>> On Jan 4, 2018, at 1:42 PM, chavoosh ghasemi <chavoosh.ghasemi.off at gmail.com <mailto:chavoosh.ghasemi.off at gmail.com>> wrote:
>> 
>> Hi,
>> 
>> Here are two questions about nfd Face:
>> 
>> 1- Assuming we have an nfd Face (or a PIT entry), how the node that this Face is associated to can be found?
> 
> If it is based on NetDeviceTransport, then through extracting the transport, casting it to NetDeviceTransport and calling GetNode().   If it is pure (internal) nfd Face, then depending on where exactly you're, it is either impossible or you can use simualation context (Simulator::GetContext() and then look up Node, e.g., ns3::Ptr<ns3::Node> node = ns3::NodeList::GetNode(ns3::Simulator::GetContext());)
> 
>> 2- How can we find the Face through which a given node is connected to its neighbor (e.g. A---B)?
> 
> yes. Check implementation of helpers/ndn-link-control-helper.cpp
> 
>> 
>> Thanks,
>> - Chavoosh
>> 
>> --
>> Chavoosh Ghasemi
>> 
>> Ph.D. Student in Computer Networking
>> University of Arizona - Computer Science Department
>> Address: Gould-Simpson 721B, 1040 E. 4th Street,
>>                  Tucson, AZ 85721
>> 
>> "The quieter you become, the more you can hear"
>> _______________________________________________
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu <mailto:ndnSIM at lists.cs.ucla.edu>
>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>
> 
> ______________
> Alex Afanasyev
> Assistant Professor, SCIS, Florida International University
> 11200 SW 8th Street, ECS Room 261B, Miami, FL 33199
> phone: +1.305.348.4960 <tel:(305)%20348-4960> (office); email: aa at cs.fiu.edu <mailto:aa at cs.fiu.edu>
> web: https://users.cs.fiu.edu/~afanasyev/ <https://users.cs.fiu.edu/~afanasyev/>
> 
> 
> 
> 
> 
> --
> Chavoosh Ghasemi
> 
> Ph.D. Student in Computer Networking
> University of Arizona - Computer Science Department
> Address: Gould-Simpson 721B, 1040 E. 4th Street,
>                  Tucson, AZ 85721
> 
> "The quieter you become, the more you can hear"

______________
Alex Afanasyev
Assistant Professor, SCIS, Florida International University
11200 SW 8th Street, ECS Room 261B, Miami, FL 33199
phone: +1.305.348.4960 (office); email: aa at cs.fiu.edu <mailto:aa at cs.fiu.edu>
web: https://users.cs.fiu.edu/~afanasyev/ <https://users.cs.fiu.edu/~afanasyev/>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180106/075b0d2a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 873 bytes
Desc: Message signed with OpenPGP
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180106/075b0d2a/attachment.sig>


More information about the ndnSIM mailing list