Re: Problem with sockets

Alan Cox (
Tue, 3 Dec 1996 19:59:27 +0000 (GMT)

> getsockopt(i, SOL_SOCKET, SO_REUSEADDR, (caddr_t)&on, (int *) sizeof on);
> printf("SO_REUSEADDR value is %d\n",on);

That code is broken. You are taking a constant and passing it to the system
to write to. The kernel doesnt want to do that and then you forget to check
the error.

Please ask whoever wrote the code to fix it