Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getdomainna(2) — HP-UX 6.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

domainname(1)

ypserv(1M)

ypfiles(4)

GETDOMAINNAME(2)  —  Series 300 Only

NAME

getdomainname, setdomainname − get/set name of current Yellow Pages domain

SYNOPSIS

int getdomainname(name, namelen)
char *name;
int namelen;

int setdomainname(name, namelen)
char *name;
int namelen;

DESCRIPTION

Getdomainname returns the name of the Yellow Pages domain for the current processor, as previously set by setdomainname. The parameter namelen specifies the size of the name array.  The returned value is null-terminated unless the area pointed to by name is not large enough to hold the domain name plus the null byte.  In this case, only the namelen number of bytes is returned. 

Setdomainname sets the domain of the host machine to name, which has a length of namelen. This call is restricted to the super-user and is normally used only when the system is booted.

These Yellow Pages domains enable two distinct networks with common host names to merge.  Each network is distinguished by having a different domain name.  Currently, only the Yellow Pages service uses these domains. 

RETURN VALUE

If the call succeeds, a value of 0 is returned.  If the call fails, a value of −1 is returned and an error code is placed in the global location errno. 

ERRORS

The following errors may be returned by these calls. 

[EFAULT] Name points outside the accessible address space. 

[EPERM] The caller is not the super-user.  This error only applies to setdomainname . 

WARNINGS

The length of the name array should be at least 65; Yellow Pages domain names can be up to 64 characters long. 

AUTHOR

Sun Microsystems, Inc. 

SEE ALSO

domainname(1), ypserv(1M), ypfiles(4). 

Hewlett-Packard Company  —  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026