Bug 1283

Summary: PacketSocket::SendTo should return number of bytes
Product: ns-3 Reporter: Nicola Baldo <nicola>
Component: networkAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: mathieu.lacage
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: proposed fix

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