From shakournia at ut.ac.ir Mon Mar 3 07:48:51 2025 From: shakournia at ut.ac.ir (Mohammad R. Shakournia) Date: Mon, 03 Mar 2025 15:48:51 +0000 Subject: [ndnSIM] Help Needed: Getting Node Name in Forwarder.cpp for Output Logging Message-ID: <6958b810e96da0be6074ed30cb6ab1f5124c2b79@ut.ac.ir> Dear ndnSIM community, I am currently working on measuring CS and PIT lookup times in **Forwarder.cpp** by using a clock in the **onIncomingInterest** function. I log these measurements to separate output files for each node. However, I am facing an issue: 1. The node names are **not appearing** in my output files. 2. When using tracers like **L3Tracer**, multiple faces are assigned to each node, making it difficult to map **faceId** to the corresponding **node name**, even with explicit mapping. I tried retrieving node names using ns3::Names::FindName(node), but it does not always return the expected results. Could you please guide me on how to correctly obtain the **node name** in **Forwarder.cpp** and include it in my output logs? Any insights or suggestions would be greatly appreciated. Best regards, Mohammad Reza Shakournia -------------- next part -------------- An HTML attachment was scrubbed... URL: From sirapop741 at gmail.com Mon Mar 3 17:33:14 2025 From: sirapop741 at gmail.com (Sirapop Theeranantachai) Date: Mon, 3 Mar 2025 17:33:14 -0800 Subject: [ndnSIM] Help Needed: Getting Node Name in Forwarder.cpp for Output Logging In-Reply-To: <6958b810e96da0be6074ed30cb6ab1f5124c2b79@ut.ac.ir> References: <6958b810e96da0be6074ed30cb6ab1f5124c2b79@ut.ac.ir> Message-ID: Hi Mohammad, I do not have an easy solution right now. Since the forwarder is in NFD, it's a bit tricky to access the node name from ns-3::Node. One way to pass NodeID information is to make ndnSIM (which still has access to the node name) modify the part where it converts ns-3 packets to NFD packets . You could add an NDNLPv2 tag to the packet to pass along the node name. You may need to adjust the NFD's face transport to make it easier to modify the LP. I have never tried this, but it should work in theory. I hope someone else has a better solution. On Mon, Mar 3, 2025, 7:49?AM Mohammad R. Shakournia via ndnSIM < ndnsim at lists.cs.ucla.edu> wrote: > Dear ndnSIM community, > > I am currently working on measuring CS and PIT lookup times in > *Forwarder.cpp* by using a clock in the *onIncomingInterest* function. I > log these measurements to separate output files for each node. However, I > am facing an issue: > > 1. The node names are *not appearing* in my output files. > 2. When using tracers like *L3Tracer*, multiple faces are assigned to > each node, making it difficult to map *faceId* to the corresponding *node > name*, even with explicit mapping. > > I tried retrieving node names using ns3::Names::FindName(node), but it > does not always return the expected results. Could you please guide me on > how to correctly obtain the *node name* in *Forwarder.cpp* and include it > in my output logs? > > Any insights or suggestions would be greatly appreciated. > > Best regards, > Mohammad Reza Shakournia > > _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > https://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sirapop741 at gmail.com Mon Mar 3 17:54:24 2025 From: sirapop741 at gmail.com (Sirapop Theeranantachai) Date: Mon, 3 Mar 2025 17:54:24 -0800 Subject: [ndnSIM] Help Needed: Getting Node Name in Forwarder.cpp for Output Logging In-Reply-To: References: <6958b810e96da0be6074ed30cb6ab1f5124c2b79@ut.ac.ir> Message-ID: I just realized there's a simple way. When installing NDN stack in ndnSIM, you could adjust the ndn-stack-helper to specify localURI so that the face you get is unique across all nodes. https://github.com/named-data-ndnSIM/ndnSIM/blob/90d50396654dabad54b6979f2dc8fa929ade544c/helper/ndn-stack-helper.cpp#L248 On Mon, Mar 3, 2025 at 5:33?PM Sirapop Theeranantachai wrote: > Hi Mohammad, > > I do not have an easy solution right now. Since the forwarder is in NFD, > it's a bit tricky to access the node name from ns-3::Node. > > One way to pass NodeID information is to make ndnSIM (which still has > access to the node name) modify the part where it converts ns-3 packets > to NFD packets > . > You could add an NDNLPv2 > tag to the > packet to pass along the node name. You may need to adjust the NFD's face > transport to make it easier to modify the LP. > I have never tried this, but it should work in theory. > > I hope someone else has a better solution. > > > On Mon, Mar 3, 2025, 7:49?AM Mohammad R. Shakournia via ndnSIM < > ndnsim at lists.cs.ucla.edu> wrote: > >> Dear ndnSIM community, >> >> I am currently working on measuring CS and PIT lookup times in >> *Forwarder.cpp* by using a clock in the *onIncomingInterest* function. I >> log these measurements to separate output files for each node. However, I >> am facing an issue: >> >> 1. The node names are *not appearing* in my output files. >> 2. When using tracers like *L3Tracer*, multiple faces are assigned to >> each node, making it difficult to map *faceId* to the corresponding *node >> name*, even with explicit mapping. >> >> I tried retrieving node names using ns3::Names::FindName(node), but it >> does not always return the expected results. Could you please guide me on >> how to correctly obtain the *node name* in *Forwarder.cpp* and include >> it in my output logs? >> >> Any insights or suggestions would be greatly appreciated. >> >> Best regards, >> Mohammad Reza Shakournia >> >> _______________________________________________ >> ndnSIM mailing list >> ndnSIM at lists.cs.ucla.edu >> https://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a_djemaa at esi.dz Mon Mar 3 23:18:27 2025 From: a_djemaa at esi.dz (DJEMAA Adel) Date: Tue, 4 Mar 2025 08:18:27 +0100 Subject: [ndnSIM] Help Needed: Getting Node Name in Forwarder.cpp for Output Logging In-Reply-To: <6958b810e96da0be6074ed30cb6ab1f5124c2b79@ut.ac.ir> References: <6958b810e96da0be6074ed30cb6ab1f5124c2b79@ut.ac.ir> Message-ID: Dear Mohammad, Try this code to retrieve node names in Forwader.cpp file: auto node = ns3::NodeList::GetNode(ns3::Simulator::GetContext()); std::cout<<" ************ Node ID :****************"<< node->GetId() < #include Let us know if this answers your question. kind regards; Le lun. 3 mars 2025 ? 16:49, Mohammad R. Shakournia via ndnSIM < ndnsim at lists.cs.ucla.edu> a ?crit : > Dear ndnSIM community, > > I am currently working on measuring CS and PIT lookup times in > *Forwarder.cpp* by using a clock in the *onIncomingInterest* function. I > log these measurements to separate output files for each node. However, I > am facing an issue: > > 1. The node names are *not appearing* in my output files. > 2. When using tracers like *L3Tracer*, multiple faces are assigned to > each node, making it difficult to map *faceId* to the corresponding *node > name*, even with explicit mapping. > > I tried retrieving node names using ns3::Names::FindName(node), but it > does not always return the expected results. Could you please guide me on > how to correctly obtain the *node name* in *Forwarder.cpp* and include it > in my output logs? > > Any insights or suggestions would be greatly appreciated. > > Best regards, > Mohammad Reza Shakournia > > _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > https://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > -- Mr DJAMA Adel Phd Ecole Militaire Polytechnique Algiers 16046, ALGERIA -------------- next part -------------- An HTML attachment was scrubbed... URL: From shakournia at ut.ac.ir Fri Mar 7 03:35:15 2025 From: shakournia at ut.ac.ir (Mohammad R. Shakournia) Date: Fri, 07 Mar 2025 11:35:15 +0000 Subject: [ndnSIM] Help Needed: Getting Node Name in Forwarder.cpp for Output Logging In-Reply-To: References: <6958b810e96da0be6074ed30cb6ab1f5124c2b79@ut.ac.ir> Message-ID: <98a4040fc8299eedea2eaca68b415b82d9e31e02@ut.ac.ir> I created a function to retrieve the node name by mapping an nfd::Forwarderto the corresponding ns-3 node. First, I iterate through all nodes in ns3::NodeList, find the node that is running this forwarder, and then retrieve its name. The key part of the function looks like this: ns3::Ptr l3proto = node->GetObject(); if (l3proto) { nfd::Forwarder* fwd = l3proto->getForwarder().get(); if (fwd == thisFwd) { std::string name = ns3::Names::FindName(node); }} I also made another change in the forwarder. The original function signature used FaceEndpoint ingress, which takes all faces as input. I modified it to nfd::face::Face& to allow handling individual faces of nodes. By the way, thanks for your help! Everything is working well now. March 4, 2025 at 8:18 AM, "DJEMAA Adel" wrote: > > Dear Mohammad, > Try this code to retrieve node names in Forwader.cpp file: > auto ?node = ns3::NodeList::GetNode(ns3::Simulator::GetContext()); > std::cout<<" ************ Node ID :****************"<< node->GetId() < You need to include these:? > #include > #include > Let us know if this answers your question. > kind?regards; > > Le?lun. 3 mars 2025 ??16:49, Mohammad R. Shakournia via ndnSIM a ?crit?: > > > > > Dear ndnSIM community, > > > > I am currently working on measuring CS and PIT lookup times in **Forwarder.cpp** by using a clock in the **onIncomingInterest** function. I log these measurements to separate output files for each node. However, I am facing an issue: > > > > 1. The node names are **not appearing** in my output files. > > > > 2. When using tracers like **L3Tracer**, multiple faces are assigned to each node, making it difficult to map **faceId** to the corresponding **node name**, even with explicit mapping. > > > > I tried retrieving node names using ns3::Names::FindName(node), but it does not always return the expected results. Could you please guide me on how to correctly obtain the **node name** in **Forwarder.cpp** and include it in my output logs? > > > > Any insights or suggestions would be greatly appreciated. > > > > Best regards, > > > > Mohammad Reza Shakournia > > > > _______________________________________________ > > ndnSIM mailing list > > ndnSIM at lists.cs.ucla.edu mailto:ndnSIM at lists.cs.ucla.edu > > https://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > > > > -- > Mr DJAMA Adel > Phd > Ecole Militaire Polytechnique > Algiers 16046, ALGERIA > -------------- next part -------------- An HTML attachment was scrubbed... URL: From batool0haw at gmail.com Mon Mar 17 03:16:01 2025 From: batool0haw at gmail.com (Albatool) Date: Mon, 17 Mar 2025 13:16:01 +0300 Subject: [ndnSIM] Preserving manually added origins and FIB entries when using CalculateRoutes Message-ID: Hello, In ndnSIM 2.1, I have a dynamic topology where I frequently call GlobalRoutingHelper::CalculateRoutes() to update the routing table. However, I also manually add origins and routes after calling CalculateRoutes(). My concern is that calling CalculateRoutes() again seems to overwrite these manually added origins and routes. Is there a way to preserve manually added origins and routes while still recalculating the global routes for the updated topology? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: