3 getsockopt \- get the value of a socket option.
6 #include <sys/socket.h>
10 int getsockopt(int \fIsd\fP, int \fIlevel\fP, int \fIopt_name\fP, void * \fIopt_val\fP, socklen_t * \fIopt_len\fP);
14 getsockopt() provides an interface to get the value of a specific
15 option, referenced by \fIopt_name\fP, for a given socket descriptor
18 On success, this function returns 0. On error, -1 is returned and
23 The option \fIopt_name\fP is not available/supported at the \fIlevel\fP
24 specified for the socket \fIsd\fP.
27 \fIsd\fP is not a socket descriptor.