[ndnSIM] Inconsistent Face IDs showing up in a topology
Anil Jangam
anilj.mailing at gmail.com
Tue Jan 19 02:08:29 PST 2016
Hi Alex/Spyros,
In my example, I have created a triangle topology of 3 nodes (Node0, Node1
and Node2).
I believe the nodes and the links are being created correctly (see the
attached logs); however, when I try to get the face to reach the adjacent
node from the given network node, I get same face Id each time, which I
think is not consistent with the topology.
I have attached both the function (code) and logs, which fetches the face
Id from the device - using L3Protocol - installed on the node.I am puzzled
as I am getting the same faceIds on all three nodes. I think I should be
unique faceIds or at lease there should be three unique faceIds.
Can you please help resolve this problem?
/anil.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160119/e09ffcdd/attachment.html>
-------------- next part --------------
97 uint64_t
98 FaceController::getFaceFromP2PLink(std::string faceUri)
99 {
100 ns3::Ptr<ns3::Node> thisNode;
102 ns3::Ptr<ns3::ndn::L3Protocol> ndn1;
104 ns3::PointToPointNetDevice *netDevice_0;
105 ns3::PointToPointNetDevice *netDevice_1;
106
107 uint32_t size = ns3::NodeList::GetNNodes();
108 thisNode = ns3::NodeList::GetNode(ns3::Simulator::GetContext());
109 ns3::Ptr<ns3::ndn::MyApp> myApp = thisNode->GetApplication(0)->GetObject<ns3::ndn::MyApp> ();
110 NS_ASSERT (myApp != 0);
111 std::string nodeName = myApp->GetNodeName();
112 _LOG_DEBUG("@ THIS node is: " << nodeName);
113 netDevice_0 = dynamic_cast<ns3::PointToPointNetDevice*>(&(*(thisNode->GetDevice(0))));
114 netDevice_1 = dynamic_cast<ns3::PointToPointNetDevice*>(&(*(thisNode->GetDevice(1))));
115 _LOG_DEBUG("@ THIS node (" << thisNode->GetId() << ")" << " # of devices: (" << thisNode->GetNDevices() << ")");
116 _LOG_DEBUG("@ THIS node (" << thisNode->GetId() << ")" << " device ID: (" << netDevice_0 << ")");
117 _LOG_DEBUG("@ THIS node (" << thisNode->GetId() << ")" << " device ID: (" << netDevice_1 << ")");
118
119 ndn1 = thisNode->GetObject<ns3::ndn::L3Protocol>();
120 NS_ASSERT(ndn1 != nullptr);
121 _LOG_DEBUG("@ THIS node (" << thisNode->GetId() << ")" << " face ID: (" << ndn1->getFaceByNetDevice(netDevice_0)->getId() << ")");
122 _LOG_DEBUG("@ THIS node (" << thisNode->GetId() << ")" << " face ID: (" << ndn1->getFaceByNetDevice(netDevice_1)->getId() << ")");
123
124 return 0;
125 }
-------------- next part --------------
Node & Link creation:
=====================
26 ndn.MyConfReader:CreateNode(0x7ffc459ca370, Node0, 25, -75)
27 0s ndn.MyConfReader:CreateNode(0x7ffc459ca370, Node1, 25, -75)
28 0s ndn.MyConfReader:CreateNode(0x7ffc459ca370, Node2, 25, -75)
29 0s ndn.MyConfReader:BuildTopology(): New link Node0 <==> Node1 / 10 with 1 metric (10, 20)
30 0s ndn.MyConfReader:BuildTopology(): New link Node0 <==> Node2 / 10 with 1 metric (10, 20)
31 0s ndn.MyConfReader:BuildTopology(): New link Node1 <==> Node2 / 10 with 1 metric (10, 20)
32 0s ndn.MyConfReader:BuildTopology(): My topology created with 3 nodes and 3 links
L3 Protocol details:
====================
42 0s ndn.L3Protocol:L3Protocol(0x2295760)
43 0s ndn.StackHelper:PointToPointNetDeviceCallback(): Creating point-to-point NetDeviceFace on node 0
44 0s ndn.NetDeviceFace:NetDeviceFace(0x22a49d8, 0x2296f90)
45 0s ndn.L3Protocol:addFace(0x2295760, 0x22a49d8)
46 0s ndn.StackHelper:PointToPointNetDeviceCallback(): Node 0: added NetDeviceFace as face #netDeviceFace://
47 0s ndn.StackHelper:PointToPointNetDeviceCallback(): Creating point-to-point NetDeviceFace on node 0
48 0s ndn.NetDeviceFace:NetDeviceFace(0x22b8e78, 0x229d6c0)
49 0s ndn.L3Protocol:addFace(0x2295760, 0x22b8e78)
50 0s ndn.StackHelper:PointToPointNetDeviceCallback(): Node 0: added NetDeviceFace as face #netDeviceFace://
51 0s ndn.L3Protocol:L3Protocol(0x22bcef0)
52 0s ndn.StackHelper:PointToPointNetDeviceCallback(): Creating point-to-point NetDeviceFace on node 1
53 0s ndn.NetDeviceFace:NetDeviceFace(0x22ca668, 0x2295ac0)
54 0s ndn.L3Protocol:addFace(0x22bcef0, 0x22ca668)
55 0s ndn.StackHelper:PointToPointNetDeviceCallback(): Node 1: added NetDeviceFace as face #netDeviceFace://
56 0s ndn.StackHelper:PointToPointNetDeviceCallback(): Creating point-to-point NetDeviceFace on node 1
57 0s ndn.NetDeviceFace:NetDeviceFace(0x22d7078, 0x229f590)
58 0s ndn.L3Protocol:addFace(0x22bcef0, 0x22d7078)
59 0s ndn.StackHelper:PointToPointNetDeviceCallback(): Node 1: added NetDeviceFace as face #netDeviceFace://
60 0s ndn.L3Protocol:L3Protocol(0x22de6e0)
61 0s ndn.StackHelper:PointToPointNetDeviceCallback(): Creating point-to-point NetDeviceFace on node 2
62 0s ndn.NetDeviceFace:NetDeviceFace(0x22e8028, 0x2295390)
63 0s ndn.L3Protocol:addFace(0x22de6e0, 0x22e8028)
64 0s ndn.StackHelper:PointToPointNetDeviceCallback(): Node 2: added NetDeviceFace as face #netDeviceFace://
65 0s ndn.StackHelper:PointToPointNetDeviceCallback(): Creating point-to-point NetDeviceFace on node 2
66 0s ndn.NetDeviceFace:NetDeviceFace(0x22fbf08, 0x2290080)
67 0s ndn.L3Protocol:addFace(0x22de6e0, 0x22fbf08)
Topology Details:
=================
11s FaceController:getFaceFromP2PLink(): @ THIS node is: Node0
11s FaceController:getFaceFromP2PLink(): @ THIS node (0) # of devices: (2)
11s FaceController:getFaceFromP2PLink(): @ THIS node (0) device ID: (0x243df90)
11s FaceController:getFaceFromP2PLink(): @ THIS node (0) device ID: (0x24446c0)
11s FaceController:getFaceFromP2PLink(): @ THIS node (0) face ID: (256)
11s FaceController:getFaceFromP2PLink(): @ THIS node (0) face ID: (257)
11s FaceController:getFaceFromP2PLink(): @ THIS node is: Node1
11s FaceController:getFaceFromP2PLink(): @ THIS node (1) # of devices: (2)
11s FaceController:getFaceFromP2PLink(): @ THIS node (1) device ID: (0x243cac0)
11s FaceController:getFaceFromP2PLink(): @ THIS node (1) device ID: (0x2446590)
11s FaceController:getFaceFromP2PLink(): @ THIS node (1) face ID: (256)
11s FaceController:getFaceFromP2PLink(): @ THIS node (1) face ID: (257)
11s FaceController:getFaceFromP2PLink(): @ THIS node is: Node2
11s FaceController:getFaceFromP2PLink(): @ THIS node (2) # of devices: (2)
11s FaceController:getFaceFromP2PLink(): @ THIS node (2) device ID: (0x243c390)
11s FaceController:getFaceFromP2PLink(): @ THIS node (2) device ID: (0x2437080)
11s FaceController:getFaceFromP2PLink(): @ THIS node (2) face ID: (256)
11s FaceController:getFaceFromP2PLink(): @ THIS node (2) face ID: (257)
More information about the ndnSIM
mailing list