Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getdomainname(2) [hpux man page]

getdomainname(2)						System Calls Manual						  getdomainname(2)

NAME
getdomainname, setdomainname - get or set name of current Network Information Service domain SYNOPSIS
DESCRIPTION
returns the name of the Network Information Service (NIS) domain for the current processor, as previously set by 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. sets the domain of the host machine to name, which has a length of namelen. This call is restricted to the superuser and is normally used only when the system is booted. These Network Information Service domains enable two distinct networks with common host names to merge. Each network is distinguished by having a different domain name. Currently, only the Network Information 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 is set to indicate the error. ERRORS
If or fail, is set to one of the following values: name points outside the accessible address space. The caller is not superuser. This error only applies to WARNINGS
The length of the name array should be at least 65; NIS domain names can be up to 64 characters long. NIS servers use the NIS domain name as the name of a subdirectory of Since the NIS domain name can be as long as 64 characters, the domain name set with can exceed the maximum file name length allowed on the local file system. If that length is exceeded, the name of the subdi- rectory is the truncated NIS domain name. AUTHOR
getdomainname was developed by Sun Microsystems, Inc. SEE ALSO
domainname(1), ypserv(1M), ypfiles(4). getdomainname(2)

Check Out this Related Man Page

GETDOMAINNAME(3)					   BSD Library Functions Manual 					  GETDOMAINNAME(3)

NAME
getdomainname, setdomainname -- get/set the NIS domain name of current host LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> int getdomainname(char *name, int namelen); int setdomainname(const char *name, int namelen); DESCRIPTION
The getdomainname() function returns the standard NIS domain name for the current host, as previously set by setdomainname(). The namelen argument specifies the size of the name array. The returned name is null-terminated unless insufficient space is provided. The setdomainname() function sets the NIS domain name of the host machine to be name, which has length namelen. This call is restricted to the super-user and is normally used only when the system is bootstrapped. RETURN VALUES
Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
The following errors may be returned by these calls: [EFAULT] The name or namelen argument gave an invalid address. [EPERM] The caller tried to set the hostname and was not the super-user. SEE ALSO
gethostid(3), gethostname(3), sysctl(3) HISTORY
The getdomainname() function appeared in 4.2BSD. BUGS
Domain names are limited to MAXHOSTNAMELEN (from <sys/param.h>) characters, currently 256. BSD
May 6, 1994 BSD
Man Page

3 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Booting off of a cd on a Sun Box

I have a Sun box that I am trying to get started up, but everytime it will crap out because it is bound to an NIS domain that no longer exists. The Master for that domain was put out of commission. It was suggested to me that I could boot off of the Installation cd for the OS (Solaris 8) and... (4 Replies)
Discussion started by: Jody
4 Replies

2. UNIX for Dummies Questions & Answers

NameServer not accessible

Hi everybody I am facing a little problem with names servers. I have a VPS with Kloxo installed on it I have registered 2 name servers (i.e. ns1.domain.com and ns2.domain.com) past one month. These nameservers are not accessible yet. I have check the nameserver on internic site and they are... (3 Replies)
Discussion started by: rizwan65
3 Replies

3. IP Networking

Question about blocking incomming traffic

Hello, Like many others, I have continued to get attempts to connect to my local net router from the Asia Pacific Network Information Centre and from RIPE Network Coordination Centre, Amsterdam. I would say that 90% of attempted connections come from these two locations. The originating IP... (5 Replies)
Discussion started by: LMHmedchem
5 Replies