150 lines
3.7 KiB
HTML
150 lines
3.7 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>endservent()--Close Service Database</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>endservent()--Close Service Database</h2>
|
|
|
|
<div class="box" style="width: 60%;">
|
|
<br>
|
|
Syntax<br>
|
|
<pre>
|
|
#include <netdb.h>
|
|
|
|
void endservent()
|
|
</pre>
|
|
|
|
<br>
|
|
Service Program Name: QSOSRV1<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: No; see <a href="#USAGE_NOTES">Usage Notes</a>.<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>The <em>endservent()</em> function is used to close the services database
|
|
file. The file is opened by those functions that retrieve information about
|
|
services (for example, <em>getservent()</em>).</p>
|
|
|
|
<br>
|
|
<h3>Authorities</h3>
|
|
|
|
<p>No authorization is required.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3><a name="USAGE_NOTES">Usage Notes</a></h3>
|
|
|
|
<ol>
|
|
<li> When the _XOPEN_SOURCE
|
|
macro defined to the value 520 or greater, the services file is always closed.
|
|
When the _XOPEN_SOURCE macro is not so defined, the services file is not closed if a <em>setservent()</em>
|
|
with a nonzero parameter value was previously completed.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>The iSeries Navigator or the
|
|
following CL commands can be
|
|
used to access the services database file:
|
|
|
|
<ul>
|
|
<li>WRKSRVTBLE (Work with Service Table Entries)<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>ADDSRVTBLE (Add Service Table Entry)<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>RMVSRVTBLE (Remove Service Table Entry)</li>
|
|
</ul>
|
|
|
|
<br>
|
|
|
|
</li>
|
|
|
|
<li>Do not use the <em>endservent()</em> function in a multithreaded
|
|
environment. See the multithread alternative <em>endservent_r()</em>
|
|
function.<br>
|
|
<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>endservent()</em> API is mapped to
|
|
<em>qso_endservent98()</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="gsrvnt.htm">getservent()</a>--Get Next Entry from Service
|
|
Database<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="ssrvnt.htm">setservent()</a>--Open Service Database<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="gsrvnm.htm">getservbyname()</a>--Get Port Number for Service
|
|
Name<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="gsrvprt.htm">getservbyport()</a>--Get Service Name for Port
|
|
Number</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>
|
|
|