httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe Jr." <>
Subject mpm_winnt Sanity Checks
Date Tue, 11 Oct 2011 10:53:14 GMT
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.

View raw message