*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> setdomainna (2)              


 getdomainname(2)                                           getdomainname(2)

 NAME    [Toc]    [Back]
      getdomainname, setdomainname - get/set name of current Network
      Information Service domain

 SYNOPSIS    [Toc]    [Back]
      int getdomainname(char *name, int namelen);

      int setdomainname(char *name, int namelen);

 DESCRIPTION    [Toc]    [Back]
      getdomainname() returns the name of the Network Information Service
      (NIS) 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 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    [Toc]    [Back]
      If the call succeeds, a value of 0 is returned.  If the call fails, a
      value of -1 is returned and errno is set to indicate the error.

 ERRORS    [Toc]    [Back]
      If getdomainname() or setdomainname() fail, errno is set to one of the
      following values:

           [EFAULT]       name points outside the accessible address space.

           [EPERM]        The caller is not superuser.  This error only
                          applies to setdomainname().

 WARNINGS    [Toc]    [Back]
      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
      /var/yp.  Since the NIS domain name can be as long as 64 characters,
      the domain name set with setdomainname() can exceed the maximum file
      name length allowed on the local file system.  If that length is
      exceeded, the name of the subdirectory is the truncated NIS domain

 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003

 getdomainname(2)                                           getdomainname(2)

 AUTHOR    [Toc]    [Back]
      getdomainname was developed by Sun Microsystems, Inc.

 SEE ALSO    [Toc]    [Back]
      domainname(1), ypserv(1M), ypfiles(4).

 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003
[ Back ]
 Similar pages
Name OS Title
domainname HP-UX set or display name of Network Information Service domain
whois OpenBSD Internet domain name and network number directory service
whois FreeBSD Internet domain name and network number directory service
bind_manual_setup Tru64 Describes how to manually set up the Berkeley Internet Name Domain (BIND) service on your network.
nis_intro Tru64 Network Information Service (NIS) introductory information
nis HP-UX a new version of the network information name service
NIS+ HP-UX a new version of the network information name service
nis+ HP-UX a new version of the network information name service
makedbm Tru64 Makes a Network Information Service (NIS) map file
nissetup Tru64 Sets up the Network Information Service (NIS) environment
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service