You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe Jr." <wr...@rowe-clan.net> on 2011/10/11 12:53:14 UTC
mpm_winnt Sanity Checks
AcceptEx, GetAcceptExSockaddrs and even DisconnectEx each carry a caveat
similar to the following on the MSDN site;
Note The function pointer for the AcceptEx function must be obtained at
run time by making a call to the WSAIoctl function with the
SIO_GET_EXTENSION_FUNCTION_POINTER opcode specified. The input buffer
passed to the WSAIoctl function must contain WSAID_ACCEPTEX, a globally
unique identifier (GUID) whose value identifies the AcceptEx extension
function. On success, the output returned by the WSAIoctl function
contains a pointer to the AcceptEx function. The WSAID_ACCEPTEX GUID
is defined in the Mswsock.h header file.
We've never done this... should we change now?
I'm also trying to wrap my head around this call...
GetAcceptExSockaddrs(buf, len, PADDED_ADDR_SIZE, PADDED_ADDR_SIZE,
&context->sa_server, &context->sa_server_len,
&context->sa_client, &context->sa_client_len);
Everything in the MSDN docs suggest sa_server/sa_client aren't exactly
allocated, aren't expected to be preallocated, so the current code
points sa_server within buf, where buf is the AcceptEx flavor of the
host IP, and likewise sa_client over the second half off the buf.
By docs it appears this is allowable. But I'd appreciate if someone
else would give this a read through.