nn::socket::GetNameInfo Function
s32 GetNameInfo(
const void * sa,
char8 * node,
s32 nodeLen,
char8 * service,
s32 serviceLen,
s32 flags
);
| Name | Description | |
|---|---|---|
| in | sa | Specifies a pointer to the socket address structure that holds address information about the host to search for. |
| in | node | Specifies a pointer to the buffer used to get the host name. |
| in | nodeLen | Specifies the size in bytes of the buffer used to get the host name. |
| in | service | Specifies a pointer to the buffer used to get the service name. |
| in | serviceLen | Specifies the size in bytes of the buffer used to get the service name. |
| in | flags | Specifies the flags used to set search options. Specify 0 or a bitwise OR of the following values.NI_NOFQDN: Gets only the node name part of the fully qualified domain name (FQDN) as the host name.NI_NUMERICHOST: Gets the host name by converting the host address included in the socket address structure to a string in dot-decimal notation.NI_NAMEREQD: If the search-target host is not found, does not substitute a string converted from the numeric format host address; instead, treats the situation as an error (SO_EAI_NONAME).NI_NUMERICSERV: Gets the service name by converting the service (port number) included in the socket address structure to a string in numeric notation. |
| Value | Description |
|---|---|
| 0 | Process was successful. |
| EAI_FAMILY | The protocol family included in the socket address given by sockAddr is not supported. |
| EAI_NONAME | The size of the buffer given by nodeLen and serviceLen is invalid, or the host being searched for could not be found when calling this function with NI_NAMEREQD specified for flags. |
Searches for the host name and service name based on the host's address information.
Since this function might query the DNS server, it blocks until the search is complete.
CONFIDENTIAL