[Ns-bugs] [Bug 708] SendCallback does not work with NSC
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Wed Nov 25 03:49:19 PST 2009
http://www.nsnam.org/bugzilla/show_bug.cgi?id=708
--- Comment #2 from Alberto Blanc <alberto.blanc at gmail.com> 2009-11-25 06:49:19 EDT ---
Mathieu, actually the only work I've done on this specific problem is to
implement the modification you suggested. In NscTcpSocketImpl::SendPendingData
I have replaced the call to NotifyDataSent with a call to NotifySend as
follows:
Simulator::ScheduleNow(&NscTcpSocketImpl::NotifySend, this, GetTxAvailable ()
);
I'm not sure the value returned by GetTxAvailable is the right number in this
case but it seems to work. I'm not 100% sure about the consequences of these
changes and I doubt they should be widely adopted.
As you suggested the "right" solution would be to have nsc inform ns when
buffer space (in nsc) is available. I was hoping it could be possible to
re-use the mechanisms used for the select/poll system calls but, at least for
the moment, I wasn't able to understand how these are implemented. I was at
least able to find where Linux does free its buffers when ACK are received. It
shouldn't be too complicated to add a function call in the Linux code to notify
ns of this event but this would require explicitly adding some lines in
tcp_input.c as well as adding a new function to the interface between nsc and
ns. The part I'm more concerned about is the need to modify the Linux code,
modifications that would be needed every time a new version is "ported" to nsc.
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs
mailing list