- Fix a nasty datagram corruption bug that would result in an uninitialized buffer data being returned instead of packet data if the client read buffer was smaller than the datagram received
- Fix broken user-mode send datagram IRP completion code which didn't set the completion status
- Implement disabling/enabling event select triggers
svn path=/trunk/; revision=52723
- Fix a race condition that occurs when the socket is closed by the remote host while waiting on OSKLock to perform a socket operation and results in accessing freed memory
svn path=/trunk/; revision=52718
- Fix the broken TDI_QUERY_CONNECTION_INFO implementation
- Perform buffer size checks on TDI_QUERY_MAX_DATAGRAM_INFO requests
[AFD]
- Greatly simplify AfdGetPeerName by using the remote address stored while connecting
svn path=/trunk/; revision=52698
- Increase the default and overflow size of the TCP/IP packet pool to allow for periods of very high network load (such as using BitTorrent or hosting high load services on a network) without dropping outgoing or incoming packets
- Increase the size of the TCP/IP buffer pool for the same reason
svn path=/trunk/; revision=52641
- Fix broken TDI address functions which were causing subtle memory corruptions, wasted memory, and incorrect or uninitialized values of the address length field
- Remove some buggy code that wasn't used anywhere
- General refactoring to reduce code duplication
- Handle an invalid address type properly
svn path=/trunk/; revision=52600
- Probe and lock pages with the KernelMode access mode instead of Irp->RequestorMode (UserMode) since we're dealing with memory that we allocated in kernel-mode
- Fixes getpeername() and HTTPS browsing in Firefox
svn path=/trunk/; revision=52597
- Signal the event immediately if the select triggers have already been satisfied
- This fixes hangs with applications that wait on the select event before performing any socket operations
svn path=/trunk/; revision=52562
- Rewrite user-mode send IRP handling so send errors get returned to the user properly
- Fixes OskitTCP: ESHUTDOWN/EPIPE debug log spam when a chargen telnet session is terminated by the remote side
svn path=/trunk/; revision=52552
- Add support for AFD_INFO_INLINING_MODE
- Add support for setting AFD_INFO_RECEIVE_WINDOW_SIZE and AFD_INFO_SEND_WINDOW_SIZE
- None of this is used by our current msafd but mswsock_new uses it
svn path=/trunk/; revision=52538
- Pass the non-blocking information as a boolean (mswsock_new does this too)
[AFD]
- Don't block waiting for a connection to accept on a non-blocking listener
svn path=/trunk/; revision=52537
- Only wait to bind to a port if INADDR_ANY is specified
- Fixes EADDRNOTAVAIL when running Firefox and ws2_32_winetest sock (which now gets further but still doesn't complete)
svn path=/trunk/; revision=52511
- We really do need to count the outstanding send IRP in our pending send count (with a detailed explanation of the reason included in the code)
- Wait on an outstanding send IRP to dispatch the disconnect
- When we receive a FIN from the other side and our receive comes back with 0 data, only close receiving on the socket because sending is still legal in this state
- Fixes many bugs on the ws2_32_winetest sock and likely lots of other partial disconnect related stuff
- Retest network related hanging bugs after this please (ftp dir hang is fixed)
svn path=/trunk/; revision=52510
- Implement support for timing out disconnects
- Add debug prints for oskittcp errors
[MSAFD]
- Set a disconnect timeout value that actually makes sense (1 second vs 100 nanoseconds)
svn path=/trunk/; revision=52503
- Fix binding to an unspecified port on a connect so that it works reliably by asking the TCP library for a free port instead of assuming that one we have is free
- Fix binding to an unspecified port on a listen which previously would result in the address file not having information stored about the port number assigned
- Fix a nasty bug which resulted in us binding to an arbitrary port during a connect even when the client wanted a specific port
- Revert the hack that partially fixed this before
svn path=/trunk/; revision=52501
- Fix several bugs related to the FD_WRITE event
- We would not set the sendable poll state if the socket had data waiting to be sent even if there was buffer space
- We did not set the poll state after performing a send
- We did not clear the sendable poll state if we ran out of buffer space
svn path=/trunk/; revision=52492
- unify spec2def and add_importlib_target, thanks to cmake_parse_arguments.
- also generate stub files only when necessary.
- better precompiled header support, commented out as it wasn't tested on any other machine than mine, and it depends on cmake features which don't exist yet.
For now only for gcc toolchain
svn path=/trunk/; revision=52460
- Queue the user-mode connect IRP before calling TdiConnect to avoid a race if the TDI_CONNECT IRP is completed before we get a chance to queue the user-mode IRP to accept the connection
- Change the non-blocking TDI helper functions to always return STATUS_PENDING if the completion function will be called to avoid duplicate handling of IRPs
svn path=/trunk/; revision=52441
- Wait until the all pending sends are serviced before shutting down the socket on a graceful disconnect
- Cancel pending sends and receives on abortive disconnect
- Remove the nasty hack that was the completion queue and replace it with async completions like the lwIP implementation does
- There is a bug with the graceful disconnects which occurs if the graceful disconnect cannot be serviced immediately (a very rare case in my testing) and results in the shutdown() call stalling forever because oskittcp never indicates that send is possible again (which would allow pending send IRPs to be serviced and the shutdown IRP to be completed)
svn path=/trunk/; revision=52416
- Hold on to the disconnect IRP until all pending sending IRPs are sent to the transport driver if a controlled disconnect was requested
svn path=/trunk/; revision=52415
- Only indicate that receive is possible if there are no pending receive IRPs waiting for data
- Don't attempt to receive on a connection which has been closed in the receive direction
svn path=/trunk/; revision=52224
- FD_CLOSE is only for remote disconnects so don't send it when the app closes its own socket
- Validate the user-mode event handle properly
svn path=/trunk/; revision=52223