[ndnSIM] Obtaining the number of Interest packets

Zakaria SABIR zakaria.sabir at uit.ac.ma
Wed Oct 6 07:51:52 PDT 2021


Thank you Sangita and Sonia,

I'm using "ConsumerCbr", son do I have to change in the file
"ndn-consumer-cbr.cpp"?

For the commander: NS_LOG=ndn.Producer:ndn.Consumer ./waf --run="scenario",
it gives me just one type of Interest packet like this:

0s 5 ndn.Consumer:SendPacket(): [INFO ] > Interest for 0
0s 5 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 0 with
+0.0ns. already 0 items
0s 6 ndn.Consumer:SendPacket()
0s 6 ndn.Consumer:SendPacket(): [INFO ] > Interest for 0
0s 6 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 0 with
+0.0ns. already 0 items
0s 8 ndn.Consumer:SendPacket()
0s 8 ndn.Consumer:SendPacket(): [INFO ] > Interest for 0
0s 8 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 0 with
+0.0ns. already 0 items
0.000127315s 9 ndn.Producer:OnInterest(0x19f49d0, 0x1a64910)
0.000127315s 9 ndn.Producer:OnInterest(): [INFO ] node(9) responding with
Data: /*Interest1*/%FE%00
0.000324162s 1 ndn.Producer:OnInterest(0x19f3f10, 0x1a587b0)
0.000324162s 1 ndn.Producer:OnInterest(): [INFO ] node(1) responding with
Data: /*Interest1*/%FE%00
0.000810172s 4 ndn.Consumer:OnData(0x19f1060, 0x1a4d0b0)
0.000810172s 4 ndn.Consumer:OnData(): [INFO ] < DATA for 0
0.000810172s 4 ndn.Consumer:OnData(): [DEBUG] Hop count: 1
0.00102885s 2 ndn.Producer:OnInterest(0x19f4270, 0x1a40620)
0.00102885s 2 ndn.Producer:OnInterest(): [INFO ] node(2) responding with
Data: /*Interest1*/%FE%00
0.1s 0 ndn.Consumer:SendPacket()
0.1s 0 ndn.Consumer:SendPacket(): [INFO ] > Interest for 1
0.1s 0 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 1 with
+100000000.0ns. already 1 items
0.1s 3 ndn.Consumer:SendPacket()

I don't know if I have an error in specifying two names of Interest
packets. Here is a part of my code:

  ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");

  consumerHelper.SetPrefix("/Interest1");
  consumerHelper.SetAttribute("Frequency", DoubleValue(10.0));
  consumerHelper.Install(nodes.Get(0));
  consumerHelper.Install(nodes.Get(3));
  consumerHelper.Install(nodes.Get(4));
  consumerHelper.Install(nodes.Get(5))

  consumerHelper.SetPrefix("/Interest2");
  consumerHelper.Install(nodes.Get(6));
  consumerHelper.Install(nodes.Get(8));

  ndn::AppHelper producerHelper("ns3::ndn::Producer");
  producerHelper.SetPrefix("/");
  producerHelper.SetAttribute("PayloadSize", StringValue("1200"));
  producerHelper.Install(nodes.Get(1));
  producerHelper.Install(nodes.Get(2));
  producerHelper.Install(nodes.Get(7));
  producerHelper.Install(nodes.Get(9));

My best regards,
Zakaria
ᐧ

On Wed, Oct 6, 2021 at 2:40 AM sonia sabir <zohanoor67 at gmail.com> wrote:

> [image: image.gif]You can see it in the consumer log file.
>
> run your scenario with consumer and producer log enabled
>
> NS_LOG=ndn.Producer:ndn.Consumer ./waf --run="scenario"
>
> Regards
>
> Sonia
>
> On Tue, Oct 5, 2021 at 7:29 PM Zakaria SABIR <zakaria.sabir at uit.ac.ma>
> wrote:
>
>> Hi everyone, I hope you are well.
>>
>> I have created two names of Interest packets in my scenario, and I want
>> to know how many times each Interest packet has been forwarded. I tried to
>> use the "L3RateTracer", but it just gives the number of all
>> the Interest packets.
>>
>> Could you help me, please?
>> My best regards.
>>
>> Zakaria
>>>> _______________________________________________
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu
>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20211006/6cf007b1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.gif
Type: image/gif
Size: 42 bytes
Desc: not available
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20211006/6cf007b1/attachment.gif>


More information about the ndnSIM mailing list