171 lines
4.6 KiB
HTML
171 lines
4.6 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>endprotoent_r()--Close Protocol Database</title>
|
||
|
<!-- 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. -->
|
||
|
<!-- Begin Header Records ========================================== -->
|
||
|
<!-- Unix8 SCRIPT J converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
|
||
|
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
|
||
|
<!--End Header Records -->
|
||
|
<!-- Edited by Kersten Feb 02 -->
|
||
|
<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>endprotoent_r()--Close Protocol Database</h2>
|
||
|
|
||
|
<div class="box" style="width: 60%;">
|
||
|
<br>
|
||
|
Syntax<br>
|
||
|
<pre>
|
||
|
#include <netdb.h>
|
||
|
int endprotoent_r(struct protoent_data
|
||
|
*<em>protoent_data_struct_addr</em>)
|
||
|
</pre>
|
||
|
|
||
|
<br>
|
||
|
Service Program Name: QSOSRV2<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Default Public Authority: *USE<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Threadsafe: Yes<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
</div>
|
||
|
|
||
|
<p>The <em>endprotoent_r()</em> function is used to close the protocol database
|
||
|
file. The file is opened by those functions that retrieve information about a
|
||
|
protocol (for example, <em>getprotoent_r()</em>).</p>
|
||
|
|
||
|
<h3>Parameters</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt>struct protoent_data *<strong>protoent_data_struct_addr</strong>
|
||
|
(input) </dt>
|
||
|
|
||
|
<dd>Specifies the pointer to the protoent_data structure, which is used to pass
|
||
|
and preserve results between function calls. The field proto_control_blk must
|
||
|
be initialized with hexadecimal zeros before its initial use. If compatibility
|
||
|
with other platforms is required, then the entire protoent_data structure must
|
||
|
be initialized with hexadecimal zeros before initial use.</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
<h3>Authorities</h3>
|
||
|
|
||
|
<p>No authorization is required.</p>
|
||
|
|
||
|
<br>
|
||
|
<h3>Return Value</h3>
|
||
|
|
||
|
<p>The <em>endprotoent_r()</em> function returns an integer. Possible values
|
||
|
are:</p>
|
||
|
|
||
|
<ul>
|
||
|
<li>-1 (unsuccessful call)</li>
|
||
|
|
||
|
<li>0 (successful call)</li>
|
||
|
</ul>
|
||
|
|
||
|
<p>The <strong>struct protoent_data</strong> denoted by
|
||
|
<strong><em>protoent_data_struct_addr</em></strong> is defined in
|
||
|
<strong><netdb.h></strong>.</p>
|
||
|
|
||
|
<br>
|
||
|
<h3>Error Conditions</h3>
|
||
|
|
||
|
<p>When the <em>endprotoent_r()</em> function fails, <em>errno</em> can be set
|
||
|
to:</p>
|
||
|
<dl>
|
||
|
<dt><em>[EINVAL]</em></dt>
|
||
|
<dd><p>The protoent_data structure was not properly
|
||
|
initialized with hexadecimal zeros before initial use. For corrective action,
|
||
|
see the description for structure protoent_data.</p></dd>
|
||
|
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
<h3>Usage Notes</h3>
|
||
|
|
||
|
<ol>
|
||
|
<li>When the _XOPEN_SOURCE macro defined to the value 520 or greater, the protocols
|
||
|
file is always closed. When the _XOPEN_SOURCE macro is not so defined, the protocols
|
||
|
file will not be closed if a <em>setprotoent_r()</em> call with a non-zero parameter
|
||
|
value was previously done.<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li>The iSeries Navigator or the following CL commands can be
|
||
|
used to access the protocol database file:<br>
|
||
|
<br>
|
||
|
<ul>
|
||
|
<li>WRKPCLTBLE (Work with Protocol Table Entries)</li>
|
||
|
|
||
|
<li>ADDPCLTBLE (Add Protocol Table Entry)</li>
|
||
|
|
||
|
<li>RMVPCLTBLE (Remove Protocol Table Entry)</li>
|
||
|
</ul>
|
||
|
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li>When you develop in C-based languages and an application is compiled with the _XOPEN_SOURCE
|
||
|
macro defined to the value 520 or greater, the <em>endprotoent_r()</em> API is mapped to
|
||
|
<em>qso_endprotoent_r98()</em>.</li>
|
||
|
</ol>
|
||
|
|
||
|
<br>
|
||
|
<h3>Related Information</h3>
|
||
|
|
||
|
<ul>
|
||
|
<li><a href="_xopen_source.htm">_XOPEN_SOURCE</a>--Using _XOPEN_SOURCE for the UNIX 98
|
||
|
compatible interface<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="tsgprotd.htm">getprotobynumber_r()</a>--Get Protocol<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="tsgprotn.htm">getprotobyname_r()</a>--Get Protocol Information for
|
||
|
Protocol Name<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="tsgprote.htm">getprotoent_r()</a>--Get Next Entry from Protocol
|
||
|
Database<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><a href="tssprote.htm">setprotoent_r()</a>--Open Protocol Database</li>
|
||
|
</ul>
|
||
|
|
||
|
<br>
|
||
|
<hr>
|
||
|
API introduced: V4R2
|
||
|
|
||
|
<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>
|
||
|
|