Bug 1283 - PacketSocket::SendTo should return number of bytes
PacketSocket::SendTo should return number of bytes
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: network
ns-3-dev
All All
: P5 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-19 12:35 UTC by Nicola Baldo
Modified: 2012-03-07 11:28 UTC (History)
1 user (show)

See Also:


Attachments
proposed fix (300 bytes, patch)
2011-10-19 12:35 UTC, Nicola Baldo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicola Baldo 2011-10-19 12:35:14 UTC
Created attachment 1259 [details]
proposed fix

according to the doxygen documentation of Socket::SendTo

http://www.nsnam.org/docs/release/3.12/doxygen/classns3_1_1_socket.html#af898fce6a58e0dbba23c1c6de1d4220e

if successful, should return "the number of bytes copied in the internal buffer and accepted for transmission" 

however PacketSocket::SendTo does not comply with this.

I am attaching a patch that fixes this issue.
Comment 1 Mathieu Lacage 2012-03-06 06:00:00 UTC
This seems obviously right. +1 for commit.
Comment 2 Tommaso Pecorella 2012-03-06 13:21:33 UTC
Obviously +1
Comment 3 Nicola Baldo 2012-03-07 11:28:35 UTC
changeset:   7755:0e50e485b38b
tag:         tip
user:        Nicola Baldo <nbaldo@cttc.es>
date:        Wed Mar 07 17:14:41 2012 +0100
summary:     fixed bug 1283: PacketSocket::SendTo should return number of bytes