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

140 lines
4.1 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>ns_ntoa()--Translate Network Services Address from 12-byte
Address</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>ns_ntoa()--Translate Network Services Address from 12-byte
Address/h2&gt;</h2>
<div class="box" style="width: 70%;">
<br>
&nbsp;&nbsp;Syntax<br>
<pre>
#include &lt;sys/types.h&gt;
#include &lt;netns/ns.h&gt;
char *ns_ntoa
(struct ns_addr <em>network_services_address</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: No; see <a href="#USAGE_NOTES">Usage Notes</a>.<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The <em>ns_ntoa()</em> function is used to translate a network services
address from a 12-byte address to a human readable format.</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>struct ns_addr <strong><em>network_services_address</em></strong></dt>
<dd>(Input) The 12-byte network services address that is to be converted to
human readable format.</dd>
</dl>
<br>
<h3>Return Value</h3>
<p>The <em>ns_ntoa()</em> function returns:</p>
<ul>
<li>NULL (unsuccessful call)<br>
<br>
</li>
<li>s (where s is the pointer to the network services address in human readable
format)</li>
</ul>
<br>
<h3><a name="USAGE_NOTES">Usage Notes</a></h3>
<ol>
<li>The network services address consists of three fields, the network field,
the host field, and the port number field. <em>ns_ntoa()</em> returns these
fields as a single character string with the fields separated by the period (.)
character. The character string is always terminated with a NULL character.<br>
<br>
</li>
<li>The fields are always returned in hexadecimal notation. <em>ns_ntoa()</em>
inserts an H character at the end of each field that does not contain an
a,b,c,d,e,f,A,B,C,D,E or F character, in order to make it obvious that the
notation is in hexadecimal.<br>
<br>
</li>
<li>Not all fields need be returned. For example, if the host field and the
port number field of the network services address both contain hexadecimal
zeros, <em>ns_ntoa()</em> returns a character string that only contains the
network field.<br>
<br>
</li>
<li>The pointer returned by <em>ns_ntoa()</em> points to static storage that is
overridden on subsequent calls to <em>ns_ntoa()</em>.<br>
<br>
</li>
<li>Do not use the ns_ntoa() function in a multithread environment. See the
multithread alternative <a href="tsnsntoa.htm">ns_ntoa_r()</a> function.</li>
</ol>
<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>