220 lines
5.2 KiB
HTML
220 lines
5.2 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>setdomainname()--Set Domain Name</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>setdomainname()--Set Domain Name</h2>
|
||
|
|
||
|
<div class="box" style="width: 60%;">
|
||
|
<br>
|
||
|
Syntax<br>
|
||
|
<pre>
|
||
|
#include <sys/types.h>
|
||
|
#include <sys/socket.h>
|
||
|
|
||
|
int setdomainname(char *<em>name</em>,
|
||
|
int <em>length</em>)
|
||
|
</pre>
|
||
|
|
||
|
<br>
|
||
|
Service Program Name: QSOSRV1<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Default Public Authority: *USE<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Threadsafe: Yes<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
</div>
|
||
|
|
||
|
<p>The <em>setdomainname()</em> function is used to set the name of the
|
||
|
domain.</p>
|
||
|
|
||
|
<br>
|
||
|
<h3>Parameters</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong>name</strong></dt>
|
||
|
|
||
|
<dd>(Input) The pointer to a character array where the domain name is
|
||
|
stored.<br>
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>length</strong></dt>
|
||
|
|
||
|
<dd>(Input) The length of the <em>name</em> parameter. The length can be from 0
|
||
|
to 255 bytes.</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
<h3>Authorities</h3>
|
||
|
|
||
|
<p>No authorization is required.</p>
|
||
|
|
||
|
<br>
|
||
|
<h3>Return Value</h3>
|
||
|
|
||
|
<p><em>setdomainname()</em> returns an integer. Possible values are:</p>
|
||
|
|
||
|
<ul>
|
||
|
<li>-1 (unsuccessful)<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li>0 (successful)</li>
|
||
|
</ul>
|
||
|
|
||
|
<br>
|
||
|
<h3>Error Conditions</h3>
|
||
|
|
||
|
<p>When <em>setdomainname()</em> fails, <em>errno</em> can be set to one of the
|
||
|
following:</p>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>[EFAULT]</em></td>
|
||
|
<td align="left" valign="top">Bad address.
|
||
|
|
||
|
<p>The system detected an address which was not valid while attempting to
|
||
|
access the <em>name</em> parameter.</p>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>[EINVAL]</em></td>
|
||
|
<td align="left" valign="top">Parameter not valid.
|
||
|
|
||
|
<p>This error code indicates one of the following:</p>
|
||
|
|
||
|
<ul>
|
||
|
<li>The <em>length</em> parameter specifies a negative value or a value that is
|
||
|
greater than the allowed maximum length.<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li>The domain name pointed to by the <em>name</em> parameter contains
|
||
|
characters that do not belong to the invariant character set.</li>
|
||
|
</ul>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>[EIO]</em></td>
|
||
|
<td align="left" valign="top">Input/output error.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>[EPERM]</em></td>
|
||
|
<td align="left" valign="top">Operation not permitted.
|
||
|
|
||
|
<p>The process does not have the appropriate privileges to use
|
||
|
<em>setdomainname()</em>.</p>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>[EUNKNOWN]</em></td>
|
||
|
<td align="left" valign="top">Unknown system state.</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">CPE3418 E</td>
|
||
|
<td width="85%" valign="top">Possible APAR condition or hardware failure.</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>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPFA081 E</td>
|
||
|
<td align="left" valign="top">Unable to set return value or error code.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<br>
|
||
|
<h3>Usage Notes</h3>
|
||
|
|
||
|
<ol>
|
||
|
<li>A process must have the <samp>*iosyscfg</samp> special authority to use
|
||
|
<em>setdomainname()</em>.<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li>The name of the domain is set to NULL when the pointer to the domain name
|
||
|
(pointed to by the <em>name</em> parameter) is set to NULL.<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li><em>setdomainname()</em> only allows domain names that are made up of
|
||
|
invariant characters. In addition, the domain name is assumed to be in the
|
||
|
default coded character set identifier (CCSID) currently in effect for the job.
|
||
|
|
||
|
|
||
|
<p><strong>Note:</strong> For exceptions to the invariant character set for
|
||
|
some CCSIDs, see <a href="../nls/rbagsglobalmain.htm">globalization</a>
|
||
|
topic.</p>
|
||
|
</li>
|
||
|
</ol>
|
||
|
|
||
|
<br>
|
||
|
<h3>Related Information</h3>
|
||
|
|
||
|
<ul>
|
||
|
<li><a href="gdomn.htm">getdomainname()</a>--Retrieve Domain Name</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>
|
||
|
|