[WiFi] Ping packet size

83 views
Skip to first unread message

Matteo Danieletto

unread,
Apr 23, 2015, 12:47:00 PM4/23/15
to ns-3-...@googlegroups.com
Hi All,

I have a WiFi mesh scenario and following your past suggestion I created a simple node through V4PingHelper that ping another one.
Is there any possibility to change the ICMP packet size (with a Llinux terminal I can do: ping -s 1000 IP ADDRESS )? 


Thanks a lot
Matteo


Tommaso Pecorella

unread,
Apr 23, 2015, 12:52:35 PM4/23/15
to ns-3-...@googlegroups.com
Assuming that you named v4PingHelper your V4PingHelper...
v4PingHelper.SetAttribute ("Size", UintegerValue (whatever));

Astonishing, isn't it ?

Cheers,

T.

PS: always check the application attributes...

Tommaso Pecorella

unread,
Apr 23, 2015, 12:55:27 PM4/23/15
to ns-3-...@googlegroups.com
As a side note: what the hell have to do the question with the [WiFi] tag in the subject ?
I mean, the question is about Ping, WiFi is just a detail. More or less like "I drank a coke in my car and now I have to burp". Is the car relevant ?

Cheers,

T.


On Thursday, April 23, 2015 at 6:47:00 PM UTC+2, Matteo Danieletto wrote:

Matteo Danieletto

unread,
Apr 24, 2015, 4:24:27 AM4/24/15
to ns-3-...@googlegroups.com
Thank you for the suggestion.
However, IMO the Doxygen documentation does not describe well methods, fields, attributes and other stuffs. 

You suggested to check application attributes: 

I checked if I could find any info about the Attributes and there is not any information. (Yes maybe I looking in the wrong place )
Yesterday before to open a post I checked here:
and I looked in SetAttributes and there is not any info about the attributes that I can setup.

Maybe, you can suggest where is the list of attributes that can be setup.

Thank you
Matteo

Konstantinos

unread,
Apr 24, 2015, 4:49:40 AM4/24/15
to ns-3-...@googlegroups.com
Hi Matteo,

The Helper classes do not have any attributes. They are there to "help" you with the underlying classes, V4Ping in this case.
So, you should have looked at the V4Ping class here https://www.nsnam.org/doxygen/classns3_1_1_v4_ping.html, for which you are actually configuring the attributes.
And voila... 
  • Size: The number of data bytes to be sent, real packet will be 8 (ICMP) + 20 (IP) bytes longer.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 16:4294967295
    • Initial value: 56
    • Flags: construct write read

Regards,
K.
Reply all
Reply to author
Forward
0 new messages