Re: ipv6 accept() on AIX 5.1



Henrik Goldman <henrik_goldman@xxxxxxxxxxxx> wrote:
Once we hit accept() we end up with a errno 22 on the ipv6
socket. From what I could see this refers to invalid parameter.

struct sockaddr_storage ClientAddr;
SOCKET_LEN nAddrLen = sizeof(ClientAddr);
SOCKET RemoteClientSocket;
^^^^^^
Trying to also have this on Windows?-)

// First we try IPv4
RemoteClientSocket = accept(m_ListenSocket4.GetSocket(), (struct sockaddr *)
&ClientAddr, &nAddrLen);

// Then we try IPv6
if (RemoteClientSocket == INVALID_SOCKET)
{
if (m_ListenSocket6.GetSocket() != INVALID_SOCKET)
RemoteClientSocket = accept(m_ListenSocket6.GetSocket(), (struct sockaddr *)
&ClientAddr, &nAddrLen);
}

Have you tried a system call trace to see exactly what is being passed
to accept() for the IPv6 socket? Any chance the previous accept()
call against the IPv4 endpoint has set the values to something not
well liked for an IPv6 socket?

rick jones
--
denial, anger, bargaining, depression, acceptance, rebirth...
where do you want to be today?
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
.