- fix system crash when failing to connect to a remote host
- Set address length in the TDI address struct
- Simplify copying the address
- Zero the sin_zero member
svn path=/branches/GSoC_2011/TcpIpDriver/; revision=52485
- Hold on to the disconnect IRP until all pending sending IRPs are sent to the transport driver if a controlled disconnect was requested (merge of r52415)
[TCPIP]
- add some mroe debug statements to track new current sync problem
- remove some old debug statements that are useless now
[lwIP]
- add some mroe debug statements to track new current sync problem
svn path=/branches/GSoC_2011/TcpIpDriver/; revision=52424
- get rid of unused OskitDumpBuffer
- make the code in AFD better conform to ROS coding guidelines
- fix some MSVC compilation errors (still not fully compiling with MSVC yet)
[IP]
- Add a sanity check in the TCPAcceptEventHandler
svn path=/branches/GSoC_2011/TcpIpDriver/; revision=52398
- Abort the connection if the socket is not in LISTEN state, instead of closing it
[TCPIP]
- move redundant socket closure where so we don't try to free uninitialized variable
- in case our socket got closed or for some reason doesn't exist return a default success
svn path=/branches/GSoC_2011/TcpIpDriver/; revision=52395
- Call the completion handler asynchronously to avoid a deadlock if AFD issues a synchronous request in its completion function
- Complete all pending requests before closing the socket
- Fixes send and receive on accepted sockets
svn path=/branches/GSoC_2011/TcpIpDriver/; revision=52307
- Implement LibTCPShutdown
[IP]
- Replace an incredibly broken implementation of TCPDisconnect which caused memory corruption with a working one using LibTCPShutdown
svn path=/branches/GSoC_2011/TcpIpDriver/; revision=52200
[FORMATTING]
This is just a code formatting phase. I reordered some of the code and put some debugging DbgPrint-s in order to help understand the control and data flow. Working on trying to stop the system from crashing when server socket gets closed.
svn path=/branches/GSoC_2011/TcpIpDriver/; revision=52042
Closing a socket while in listening state (that has not accepted any connections) no longer certainly crashes the system. There's still a tendency to crash the system sometimes, but it's related to possibly not canceling any outstanding IRPs for the listening socket.
svn path=/branches/GSoC_2011/TcpIpDriver/; revision=51962
- Removed hack from lwIP code. Now the listening pcb is obtained in a way as to not affect pllute lwIP code.
- Also there's still a little foreign code left in lwIP, but this can be easily removed as it contains no functional purpose, except debugging.
svn path=/branches/GSoC_2011/TcpIpDriver/; revision=51924
Fixed an error in the accepting code (in rostcp.c line 576). tcp_accepted was being called for the wrong pcb. Instead of the pcb belonging to the listening socket it was being called for the pcb belonging to the newly created connection socket. In order to fix this I added an extra field to the tcp_pcb structure to hold a reference to the listening socket. This is a crude method and it will be replaced by something more elegant.
Right now however there's a slight nondeterminism regarding the connection. One it's established the message either gets through to the other side or not, randomly. This could be due to a race condition of some sorts.
Also another problem is that the server side brings down the system when closing.
svn path=/branches/GSoC_2011/TcpIpDriver/; revision=51889
- Rewrite most of the lower TCP layer code to work with lwIP
[LWIP]
- Write all of the implementation-specific code and headers
[TCPIP]
- Add assertions in the object reference functions
- Remove the completion queue hack
This is still isn't totally finished yet. There are still two main issues that need to be overcome: listen/accept don't work at all and the performance is horrible.
I hope that once I tune some of the options, I can get it to perform reasonably well. If any curious testers want to try this out, be my guest but realize that not
a lot of apps will work yet. Suggestions are welcome! :)
svn path=/branches/tcp-rewrite-branch/; revision=48840