ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/resnsearch.htm

133 lines
3.5 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>res_nsearch()--Search for Domain Name</title>
<!-- Begin Header Records ========================================== -->
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- Unix8 SCRIPT J converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
<!-- Edited by Kersten Feb 02 -->
<!--End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="Top_Of_Page"></a>
<!-- Java sync-link -->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<h2>res_nsearch()--Search for Domain Name</h2>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Syntax<br>
<pre>
#include &lt;sys/types.h&gt;
#include &lt;netinet/in.h&gt;
#include &lt;arpa/nameser.h&gt;
#include &lt;resolv.h&gt;
int res_nsearch(state* <em>res</em>,
const char *<em>domain_name</em>,
int <em>class</em>,
int <em>type</em>,
unsigned char *<em>answer_buffer</em>,
int <em>answer_buffer_length</em>)
</pre>
<br>
&nbsp;&nbsp;Service Program Name: QSOSRV2<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The <em>res_nsearch()</em> function is similar to <em>res_search()</em> but
it uses a user-declared <strong>res</strong> pointer instead of the shared
<strong>_res</strong>.</p>
<p>For a description of this function and more information on the parameters,
authorities required, return values, error conditions, error messages, usage
notes, and related information, see <a href="ressch.htm">res_search()</a>--Search
for Domain Name.</p>
<h3>Parameters</h3>
<dl>
<dt><strong>res</strong></dt>
<dd>(Input/Output) The pointer to the <strong>state</strong> structure.</dd>
</dl>
<br>
<h3>Related Information</h3>
<ul>
<li><a href="ressch.htm">res_search()</a>--Search for Domain Name<br>
<br>
</li>
<li><a href="resfindzonecut.htm">res_findzonecut()</a>--Find the Enclosing Zone and
Servers<br>
<br>
</li>
<li><a href="reshostalias.htm">res_hostalias()</a>--Retrieve the host alias<br>
<br>
</li>
<li><a href="resninit.htm">res_ninit()</a>--Initialize res Structure<br>
<br>
</li>
<li><a href="resnmkquery.htm">res_nmkquery()</a>--Place Domain Query in
Buffer<br>
<br>
</li>
<li><a href="resnquery.htm">res_nquery()</a>--Send Domain Query<br>
<br>
</li>
<li><a href="resnclose.htm">res_nclose()</a>--Close Socket and Reset res
Structure<br>
<br>
</li>
<li><a href="resnsend.htm">res_nsend()</a>--Send Buffered Domain Query<br>
<br>
</li>
<li><a href="resxlt.htm">res_xlate()</a>--Translate DNS Packets</li>
</ul>
<br>
<hr>
API introduced: V3R1
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"unix.htm">UNIX-Type APIs</a> | <a href="aplist.htm">APIs by category</a> </td>
</tr>
</table>
</center>
</body>
</html>