1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../css/manpage.css" type="text/css" />
7<title>GetNameInfo</title>
8  </head>
9  <body>
10<h1><CODE>nn::socket::GetNameInfo</CODE> Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14s32 GetNameInfo(
15     const void * sa,
16     char8 * node,
17     s32 nodeLen,
18     char8 * service,
19     s32 serviceLen,
20     s32 flags
21);
22</pre>
23    </div>
24<h2>Arguments</h2>
25    <div class="section">
26      <table class="arguments">
27        <thead>
28          <tr>
29            <td width="15" />
30<th>Name</th>
31<td>Description</td>
32          </tr>
33        </thead>
34        <tr>
35<td>in</td>
36<th>sa</th>
37<td>Specifies a pointer to the socket address structure that holds address information about the host to search for.</td>
38        </tr>
39        <tr>
40<td>in</td>
41<th>node</th>
42<td>Specifies a pointer to the buffer used to get the host name.</td>
43        </tr>
44        <tr>
45<td>in</td>
46<th>nodeLen</th>
47<td>Specifies the size in bytes of the buffer used to get the host name.</td>
48        </tr>
49        <tr>
50<td>in</td>
51<th>service</th>
52<td>Specifies a pointer to the buffer used to get the service name.</td>
53        </tr>
54        <tr>
55<td>in</td>
56<th>serviceLen</th>
57<td>Specifies the size in bytes of the buffer used to get the service name.</td>
58        </tr>
59        <tr>
60<td>in</td>
61<th>flags</th>
62<td>Specifies the flags used to set search options. Specify <CODE>0</CODE> or a bitwise OR of the following values.<itemizedlist><listitem><para> <CODE>NI_NOFQDN</CODE>: Gets only the node name part of the fully qualified domain name (FQDN) as the host name.</para></listitem><BR><listitem><para> <CODE>NI_NUMERICHOST</CODE>: Gets the host name by converting the host address included in the socket address structure to a string in dot-decimal notation.</para></listitem><BR><listitem><para> <CODE>NI_NAMEREQD</CODE>: 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 (<CODE>SO_EAI_NONAME</CODE>).</para></listitem><BR><listitem><para><CODE>NI_NUMERICSERV</CODE>: Gets the service name by converting the service (port number) included in the socket address structure to a string in numeric notation.</para></listitem></itemizedlist></td>
63        </tr> </table>
64    </div>
65<h2>Return Values</h2>
66    <div class="section">
67      <br /> <br />
68      <table class="arguments">
69        <thead>
70          <tr>
71<th>Value</th>
72<td>Description</td>
73          </tr>
74        </thead>
75        <tr>
76          <th>0</th>
77<td>Process was successful.</td>
78        </tr>
79        <tr>
80<th>EAI_FAMILY</th>
81<td>The protocol family included in the socket address given by <CODE>sockAddr</CODE> is not supported.</td>
82        </tr>
83        <tr>
84<th>EAI_NONAME</th>
85<td>The size of the buffer given by <CODE>nodeLen</CODE> and <CODE>serviceLen</CODE> is invalid, or the host being searched for could not be found when calling this function with <CODE>NI_NAMEREQD</CODE> specified for <CODE>flags</CODE>.</td>
86        </tr>
87      </table> </div>
88<h2>Description</h2>
89    <div class="section">
90<p>Searches for the host name and service name based on the host's address information.</p><p>Since this function might query the DNS server, it blocks until the search is complete.</p><!-- write here --></div>
91<h2>See Also</h2>
92    <div class="section">
93<p class="reference"><a href="../../nn/socket/GetAddrInfo.html"><CODE>GetAddrInfo</CODE></a>, <a href="../../nn/socket/GetHostByAddr.html"><CODE>GetHostByAddr</CODE></a><br /> </p>
94    </div>
95<h2>Revision History</h2>
96    <div class="section">
97      <dl class="history">
98        <dt>2010/06/14</dt>
99<dd>Initial version.<br />
100        </dd>
101      </dl>
102    </div>
103  <hr><p>CONFIDENTIAL</p></body>
104</html>