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

178 lines
4.5 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!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>dn_find()--Search for Compressed 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. -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- 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>
<!-- Java sync-link -->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<a name="Top_Of_Page"></a>
<h2>dn_find()--Search for Compressed Domain Name</h2>
<div class="box" style="width: 70%;">
<br>
&nbsp;&nbsp;Syntax
<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 dn_find(unsigned char *<em>expanded_domain_name</em>,
unsigned char *<em>message_pointer</em>,
unsigned char **<em>domain_name_pointers</em>,
unsigned char **<em>last_domain_name</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>dn_find()</em> function is used to search for an expanded domain
name in a list of compressed domain names.</p>
<br>
<!-- Please NOTE: DO NOT DELETE THIS SECTION if this API has no authorities and locks. -->
<!-- Instead, use the commented out coding below to indicate NONE. -->
<h3>Authorities and Locks</h3>
<!-- Use this if there are no authorities and locks. -->
<p>None.</p>
<br>
<h3>Parameters</h3>
<dl>
<dt><strong>expanded_domain_name</strong></dt>
<dd>(Input) The pointer to the expanded domain name.<br>
<br>
</dd>
<dt><strong>message_pointer_name</strong></dt>
<dd>(Input) A pointer to the DNS packet that contains the compressed names
pointed to by the elements of <strong>domain_name_pointers</strong>.<br>
<br>
</dd>
<dt><strong>domain_name_pointers</strong></dt>
<dd>(Input) The pointer to an array of pointers to previously compressed names
in the current message.<br>
<br>
</dd>
<dt><strong>last_domain_name</strong></dt>
<dd>(Input) The pointer to the end of the array of
<em>domain_name_pointers</em>.</dd>
</dl>
<br>
<h3>Return Value</h3>
<p><em>dn_find()</em> returns an integer. Possible values are: </p>
<ul>
<li>-1 (unsuccessful)<br>
<br>
</li>
<li>n (successful), where n is an offset into the <em>message_pointer</em>
where domain name was found.</li>
</ul>
<br>
<h3>Error Conditions</h3>
<p>When the <em>dn_find()</em> function fails, it does not set specific
<em>errno</em> or <em>h_errno</em> values. An error occurs under the following
conditions:</p>
<ul>
<li>NULL pointer(s) passed to the function.<br><br></li>
<li>Invalid pointer(s) passed to the function.<br><br></li>
<li>Expanded domain name not found in the DNS packet.</li>
</ul>
<br>
<h3>Usage Notes</h3>
<ol>
<li><em>dn_find()</em> locates an expanded name in an array of previously
compressed names.<br>
<br>
</li>
<li>Usually <em>dn_find()</em> is called from <em>dn_comp()</em> but can be
called directly.<br>
<br>
</li>
<li><em>dn_find()</em> expects EBCDIC data as input.</li>
</ol>
<br>
<h3>Related Information</h3>
<ul>
<li><a href="dnexp.htm">dn_expand()</a>--Expand Domain Name<br>
<br>
</li>
<li><a href="dncomp.htm">dn_comp()</a>--Compress Domain Name<br>
<br>
</li>
<li><a href="dnsknm.htm">dn_skipname()</a>--Skip over Compressed Domain
Name</li>
</ul>
<br>
<hr>
API introduced: V3R1
<hr>
<table cellpadding="2" cellspacing="2" align="center">
<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>
</body>
</html>