Here are the functions for examining and modifying socket options. They are declared in `sys/socket.h'.
getsockoptfunction gets information about the value of option optname at level level for socket socket.
The option value is stored in a buffer that optval points to.
Before the call, you should supply in
size of this buffer; on return, it contains the number of bytes of
information actually stored in the buffer.
Most options interpret the optval buffer as a single
The actual return value of
0 on success
-1 on failure. The following
errno error conditions
The return value and error codes for
setsockopt are the same as
Go to the first, previous, next, last section, table of contents.