Bug 2891

Summary: Add udp.rst for UDP implementation
Product: ns-3 Reporter: Viyom Mittal <viyommittal>
Component: internetAssignee: Tommaso Pecorella <tommaso.pecorella>
Status: RESOLVED FIXED    
Severity: enhancement CC: ns-bugs, tomh
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description Viyom Mittal 2018-03-07 03:21:38 UTC
Hello,

I have prepared a udp.rst for describing the UDP implementation in ns-3.

It can be reviewed on the following link:

https://github.com/Viyom/ns-3-dev-git/blob/Documentation/src/internet/doc/udp.rst

Please let me know if any corrections are required.

Thanks,
Viyom
Comment 1 Tommaso Pecorella 2018-03-08 18:48:29 UTC
Thanks, great job.

Only a few things to fix:
1) Add all the UDP-related classes to the class list, e.g., udp-header, udp-l4-protocol, udp-socket-impl. Explain the relation between UdpSocket and UdpSocketImpl.
2) "Using the helper functions defined in src/applications/helper and src/network/helper" - actually only src/applications/helper
3) Document how to create a UdpSocket bare-hands.
4) "Please note that applications usually create the sockets automatically, and so it is not straightforward to create sockets. Please refer to the source code of your preferred application to discover how and when it creates the socket." - actually it IS straightforward.
5) BindToNetDevice is confusing.
6) Limitations: limit the discussion to UDP_CORK. MSG_DONTROUTE is an obscure and little used option, and MTU discovery *is* supported in ns-3 (just hook the right ICMP message).
7) "MTU handling is also weak in ns-3 for the moment;" - as far as I know MTU, fragmentation and PMTU are well supported.
8) "Not all socket API callbacks are supported." - which one aren't ? You can't leave the user the task to check.

Final comments, since UDP is connectionless and you talk about connecting a socket, explain what's a "connection" for UDP and ns-3 (hint, it's just an address to be used in Send(), i.e., when the user is too lazy to call SendTo()).
Comment 2 Tom Henderson 2018-03-10 12:12:42 UTC
I will push to ns-3-dev in time for ns-3.28 if comments are addressed in the next few days, thanks.
Comment 3 Viyom Mittal 2018-03-13 09:51:38 UTC
Hello,

Thank you Tommaso Sir for the comments. I have tried to address them and the updated document can be found on the following link:

https://github.com/Viyom/ns-3-dev-git/blob/Documentation/src/internet/doc/udp.rst

Please let me know if any further corrections are required.

Thanks,
Viyom
Comment 4 Tom Henderson 2018-03-15 16:11:31 UTC
Viyom, thanks for contributing; I added it in changeset 13414:af1037094f47