[Ns-bugs] [Bug 132] TCP does not notify server side sockets of new connections

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Fri Feb 8 14:54:52 PST 2008


http://www.nsnam.org/bugzilla/show_bug.cgi?id=132





------- Comment #3 from raj.b at gatech.edu  2008-02-08 17:54 -------
Implemented in tree:
http://code.nsnam.org/raj/ns-3-dev/

Quick link to the file:
http://code.nsnam.org/raj/ns-3-dev/file/d66ffafd78c9/src/internet-node/tcp-socket.cc

The basic logic is that when a SYN comes in, the listening socket performs a
stateful clone of itself using the copy constructor (eventually the "virtual
constructor"/copy/clone pattern, but not yet), and then calls into the newly
cloned socket to send back the reply and notify the application that a
connection was requested.  When it completes the handshake, the cloned socket
fires a notify up to the application that a new socket has been created and
passes up itself and the remote end's IP address.

There are some memory management/smart pointer issues to figure out yet (very
likely that the refcount of the cloned socket is not correct), but the code
appears to work albeit with leaks.  See examples/tcp-full-duplex.cc in my tree
from above as it is the only TCP example scripts that uses the newly
implemented semantics.  All the rest need slight modification to support the
change.  I'll try to get this done over the weekend.


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list