0 on success or -1 on failure. On failure errno is set appropriately.
Errors: EBADF - The argument sockfd is not a valid descriptor.
EFAULT - src is not in a valid part of the process address space.
EINVAL - src.length does not match the expected value length.
ENOPROTOOPT - The option is unknown at the level indicated.
ENOTSOCK - The argument sockfd is a file, not a socket.
Sets the value of a socket option, using the value data in src. The actual value data type and length depends on the particular option.