Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!sdd.hp.com!spool.mu.edu!uunet!bu.edu!bucsf.bu.edu!jdubb From: jdubb@bucsf.bu.edu (jay dubb) Newsgroups: comp.unix.programmer Subject: getsockopt with SO_ERROR: help! Message-ID: <76009@bu.edu.bu.edu> Date: 2 Mar 91 18:24:32 GMT Sender: news@bu.edu.bu.edu Distribution: usa Organization: Computer Science Department, Boston University, Boston, MA, USA Lines: 15 Originator: jdubb@bucsf.bu.edu 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. Mike Levin (mlevin@jade.tufts.edu)