nn::socket::GetNameInfo Function

Syntax

s32 GetNameInfo(
     const void * sa,
     char8 * node,
     s32 nodeLen,
     char8 * service,
     s32 serviceLen,
     s32 flags
);

Arguments

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.

Return Values

Returns 0 if successful.

Description

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.

See Also

GetAddrInfo, GetHostByAddr

Revision History

2010/06/14
Initial version.

CONFIDENTIAL