nn::socket::GetSockOpt Function
s32 GetSockOpt(
s32 s,
s32 level,
int optname,
void * optval,
int * optlen
);
| Name | Description | |
|---|---|---|
| in | s | Specifies the socket descriptor. Specify a socket descriptor created using the Socket or Accept function. |
| in | level | Specifies the target protocol layer (SocketLevel). |
| in | optname | Specifies the target options (SocketOptionType). |
| out | optval | Specifies the buffer in which to store the setting. |
| inout | optlen | Specifies the optval buffer length for optname. |
| Value | Description |
|---|---|
| 0 | Process was successful. |
EBADF |
The socket descriptor is invalid. |
EINVAL |
Indicates an illegal call of one of the following. The length of the buffer specified by optlen is invalid. |
ENETDOWN |
The network is not available. |
ENETRESET |
Socket library is not initialized. |
ENOMEM |
Cannot allocate the memory required for the process. |
ENOPROTOOPT |
Option not supported. |
Gets a socket's internal settings and internal state.
CONFIDENTIAL