Function lrs::syscall::getsockopt

Retrieves a socket option.

Syntax

fn getsockopt(sockfd: i32, level: i32, optname: i32, optval: &mut [u8], optlen: &mut usize) -> i32

Arguments

NameDescription
sockfd

The socket.

level

The level of the option.

optname

The name of the option.

optval

The buffer in which the value will be stored.

optlen

A place into which the length of the value will be stored.

Return value

Returns success or an error value.

See also