getsockopt(), setsockopt()
get and set options on sockets
#include 'sys/socket.h'
#include 'sys/type.h'
int getsockopt (int sockfd, int level, int optname, void *optval , socklen_t *optlen);
int setsockopt ( int sockfd, int level, int optname, const void *optval , socklen_t optlen);

Description

getsockopt() and setsockopt() manipulate options for the socket referred to by the file descriptor sockfd. Options may exist at multiple protocol levels; they are always present at the uppermost socket level.

Return Value

On success, 0 is returned, on error, -1 is returned, and errno is set approprately