Embedded TCP/IP stack
4.7.0
|
fnet_return_t fnet_socket_getopt | ( | fnet_socket_t | s, |
fnet_protocol_t | level, | ||
fnet_socket_options_t | optname, | ||
void * | optval, | ||
fnet_size_t * | optvallen | ||
) |
Gets a socket option.
s | Descriptor identifying a socket. |
level | Level, at which the option is defined. The supported levels are the SOL_SOCKET, IPPROTO_IP, IPPROTO_IPV6 or IPPROTO_TCP. |
optname | Socket option, for which the value is to be retrievied. |
optval | Pointer to a buffer in which the value for the requested option has to be returned. |
optvallen | Pointer to the size of the optval buffer. |
This function retrieves the current value for a socket option associated with the socket s
, and stores the result in the optval
.
The various socket options are described by the fnet_socket_options_t.