TCPGetSockOpt


C Specification

#include <dolphin/ip.h>
#include <dolphin/socket.h>
s32 TCPGetSockOpt( TCPInfo* info, int level, int optname,
                   void* optval, int optlen );

Description

TCPGetSockOpt() gets the options with a TCPInfo. The supported options are summarized in the following table:

Level Option name Type Description
SO_SOL_SOCKET SO_SO_REUSEADDR BOOL Allows reuse of the local address.
SO_SOL_SOCKET SO_SO_OOBINLINE BOOL Receives urgent byte in band.
SO_SOL_SOCKET SO_SO_TYPE int SO_SOCK_STREAM for TCP.
SO_SOL_IP SO_IP_TOS int Type of service.
SO_SOL_IP SO_IP_TTL int Time To Live.
SO_SOL_TCP SO_TCP_NODELAY BOOL Turn the Nagle's algorithm off.
SO_SOL_TCP SO_TCP_MAXSEG int The maximum segment size (MSS) for outgoing TCP packets.

Arguments

info Pointer to TCPInfo to get option.
level Protocol level (one of SO_SO_*).
optname Option name to get (one of SO_* shown above).
optval Option value to get.
optlen Option length.

Return Values

IP_ERR_NONE Succeeded.
IP_ERR_INVALID info is not a valid TCPInfo. Specified option data/length is invalid.
IP_ERR_INV_OPTION Specified option is not supported.

See Also