Gets a socket option.
- Parameters
-
| 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. |
- Returns
- This function returns:
- See also
- fnet_socket_setopt()
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.