getsockopt \- get the value of a socket option.
int getsockopt(int \fIsd\fP, int \fIlevel\fP, int \fIopt_name\fP, void * \fIopt_val\fP, socklen_t * \fIopt_len\fP);
getsockopt() provides an interface to get the value of a specific
option, referenced by \fIopt_name\fP, for a given socket descriptor
On success, this function returns 0. On error, -1 is returned and
The option \fIopt_name\fP is not available/supported at the \fIlevel\fP
specified for the socket \fIsd\fP.
\fIsd\fP is not a socket descriptor.