[ndnSIM] Two questions about nfd Face

chavoosh ghasemi chavoosh.ghasemi.off at gmail.com
Sun Jan 7 16:41:00 PST 2018


Thanks, Alex. It works.

Just for future references, I have used the following command:
*  auto transport =
dynamic_cast<ns3::ndn::NetDeviceTransport*>(face.getTransport());*

- Chavoosh

On Sat, Jan 6, 2018 at 1:21 PM, Alex Afanasyev <aa at cs.fiu.edu> wrote:

>
>
> On Jan 4, 2018, at 5:45 PM, chavoosh ghasemi <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> wrote:
>
>>
>>
>> On Jan 4, 2018, at 1:42 PM, chavoosh ghasemi <
>> 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
>> 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 <(305)%20348-4960> (office); email: aa at cs.fiu.edu
>> <aa at cs.fiu.edu>
>> web: 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 <(305)%20348-4960> (office); email: aa at cs.fiu.edu
> <aa at cs.fiu.edu>
> web: 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"*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180107/ef49ac53/attachment.html>


More information about the ndnSIM mailing list