[comp.sys.sun] getsockopt

jdubb@bucsf.bu.edu (jay dubb) (03/19/91)

I am posting this for a friend of mine who doesn't have access to USENET,
so please respond directly to mlevin@jade.tufts.edu.

I am having problems using getsockopt() with option SO_ERROR on a
connected TCP socket.  First of all, what is supposed to be the type
(size, format, etc.) of the destination (optval) parameter? And, how does
one interpret whatever information getsockopt() puts there when it finds
an error? Secondly, my call to getsockopt with optval set to a char[100]
array, and optlen pointing to an int which equals 100, sets errno to 22 =
invalid argument, which is not on the list of things that getsockopt can
set errno to (according to the manual, anyways). Any ideas as to what's
causing this? Thanks in advance.  Please reply directly do:

			Mike Levin (mlevin@jade.tufts.edu)