setdomainname()--Set Domain Name


  Syntax
 #include <sys/types.h>
 #include <sys/socket.h>

 int setdomainname(char *name,
                   int length)

  Service Program Name: QSOSRV1

  Default Public Authority: *USE

  Threadsafe: Yes

The setdomainname() function is used to set the name of the domain.


Parameters

name
(Input) The pointer to a character array where the domain name is stored.

length
(Input) The length of the name parameter. The length can be from 0 to 255 bytes.

Authorities

No authorization is required.


Return Value

setdomainname() returns an integer. Possible values are:


Error Conditions

When setdomainname() fails, errno can be set to one of the following:



Error Messages



Usage Notes

  1. A process must have the *iosyscfg special authority to use setdomainname().

  2. The name of the domain is set to NULL when the pointer to the domain name (pointed to by the name parameter) is set to NULL.

  3. setdomainname() 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.

    Note: For exceptions to the invariant character set for some CCSIDs, see globalization topic.


Related Information



API introduced: V3R1

[ Back to top | UNIX-Type APIs | APIs by category ]