Embedded TCP/IP stack  4.7.0

◆ fnet_socket_getopt()

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.

Parameters
sDescriptor identifying a socket.
levelLevel, at which the option is defined. The supported levels are the SOL_SOCKET, IPPROTO_IP, IPPROTO_IPV6 or IPPROTO_TCP.
optnameSocket option, for which the value is to be retrievied.
optvalPointer to a buffer in which the value for the requested option has to be returned.
optvallenPointer 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.


© 2005-2020 by Andrej Butok. http://fnet.sourceforge.net