205 lines
5.0 KiB
HTML
205 lines
5.0 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>freenetconfigent()--Free the Netconfig Structure</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. -->
|
||
|
<!-- RPCMST SCRIPT A converted by B2H R4.1 (346) (CMS) by PMHALL at -->
|
||
|
<!-- RCHVMW2 on 7 Oct 1998 at 23:43:14 -->
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<!-- Edited by Kersten Feb 02 --><!--End Header Records -->
|
||
|
<!-- Java sync-link -->
|
||
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
||
|
</script>
|
||
|
|
||
|
<a name="Top_Of_Page"></a>
|
||
|
|
||
|
<h2>freenetconfigent()--Free the Netconfig Structure</h2>
|
||
|
|
||
|
<div class="box" style="width: 60%;">
|
||
|
<br>
|
||
|
Syntax<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
<pre>
|
||
|
#include <netconfig.h>
|
||
|
|
||
|
void freenetconfigent(struct netconfig *);
|
||
|
</pre>
|
||
|
|
||
|
<br>
|
||
|
Service Program Name: QZNFTRPC<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Default Public Authority: *USE<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Threadsafe: No<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
</div>
|
||
|
|
||
|
<p>The <strong>freenetconfigent()</strong> function frees the netconfig
|
||
|
structure that is returned from the call to the
|
||
|
<strong>getnetconfigent()</strong> function.</p>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Parameters</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong>netconfig</strong> (Input) </dt>
|
||
|
|
||
|
<dd>A pointer to a netconfig structure that is set by a call to the
|
||
|
<strong>setnetconfig()</strong> function.</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Authorities</h3>
|
||
|
|
||
|
<p>No authorization is required.</p>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Return Value</h3>
|
||
|
|
||
|
<p>None.</p>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Error Conditions</h3>
|
||
|
|
||
|
<p>If an exception occurs, <strong>freenetconfigent()</strong> fails to free
|
||
|
the netconfig structure. If <strong>freenetconfigent()</strong> is not
|
||
|
successful, <em>errno</em> indicates the following error.</p>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>[EUNKNOWN]</em></td>
|
||
|
<td align="left" valign="top">Unknown system state.
|
||
|
|
||
|
<p>The operation failed because of an unknown system state. See any messages in
|
||
|
the job log and correct any errors that are indicated. Then retry the
|
||
|
operation.</p>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Error Messages</h3>
|
||
|
|
||
|
<table width="100%" cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<th align="left" valign="top">Message ID</th>
|
||
|
<th align="left" valign="top">Error Message Text</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td width="15%" valign="top">CPF3CF2 E</td>
|
||
|
<td width="85%" valign="top">Error(s) occurred during running of &1
|
||
|
API.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9872 E</td>
|
||
|
<td align="left" valign="top">Program or service program &1 in library
|
||
|
&2 ended. Reason code &3.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Example</h3>
|
||
|
|
||
|
<p>See <a href="../apiref/aboutapis.htm#codedisclaimer">Code disclaimer information</a>
|
||
|
for information pertaining to code examples.</p>
|
||
|
|
||
|
<p>The following example shows how <strong>freenetconfigent()</strong> is
|
||
|
used:</p>
|
||
|
|
||
|
<pre>
|
||
|
#include <netconfig.h>
|
||
|
|
||
|
main()
|
||
|
{
|
||
|
struct netconfig *nconf;
|
||
|
|
||
|
/* Assuming UDP is a netid on the system, get the netconfig structure *
|
||
|
if ((nconf = getnetconfigent("UDP")) == (struct netconfig *)NULL)
|
||
|
{
|
||
|
printf("There is no information about UDP\n");
|
||
|
exit(1);
|
||
|
}
|
||
|
|
||
|
/* Print out the information associated with the transport */
|
||
|
/* identified with the netid of UDP */
|
||
|
printf("Transport provider name: %s\n", nconf->nc_netid);
|
||
|
switch(nconf->nc_semantics)
|
||
|
{
|
||
|
case NC_TPI_CLTS:
|
||
|
printf("Transport type name: TPI_CLTS\n");
|
||
|
break;
|
||
|
case NC_TPI_COTS:
|
||
|
printf("Transport type name: TPI_COTS\n");
|
||
|
break;
|
||
|
case NC_TPI_COTS_ORD:
|
||
|
printf("Transport type name: TPI_COTS_ORD\n");
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
switch(nconf->nc_flag)
|
||
|
{
|
||
|
case 0:
|
||
|
printf("Transport flag name: N\n");
|
||
|
break;
|
||
|
case 1:
|
||
|
printf("Transport flag name: V\n");
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
printf("Transport family name: %s\n", nconf->nc_protofmly);
|
||
|
printf("Transport protocol name: %s\n", nconf->nc_proto);
|
||
|
|
||
|
/* Free the netconfig structure returned by getnetconfigent() */
|
||
|
freenetconfigent(nconf);
|
||
|
}
|
||
|
|
||
|
</pre>
|
||
|
|
||
|
<br>
|
||
|
<hr>
|
||
|
API introduced: V4R2
|
||
|
|
||
|
<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=
|
||
|
"rpc1.htm">Remote Procedure Call (RPC) APIs</a> | <a href="aplist.htm">APIs by
|
||
|
category</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|
||
|
|