Computer Science


GETDOMAINNAME(2)    Linux Programmer's Manual    GETDOMAINNAME(2)

NAME
       getdomainname, setdomainname - get/set domain name

SYNOPSIS
       #include <unistd.h>

       int getdomainname(char *name, size_t len);
       int setdomainname(const char *name, size_t len);

DESCRIPTION
       These functions are used to access or to change the domain
       name of the current processor.

RETURN VALUE
       On success, zero is returned.  On error, -1  is  returned,
       and errno is set appropriately.

ERRORS
       EINVAL For  getdomainname,  name points to NULL or name is
              longer than len.

       EPERM  For setdomainname, the caller  was  not  the  supe-
              ruser.

       EINVAL For setdomainname, len was too long.

CONFORMING TO
       POSIX does not specify these calls.

BUGS
       getdomainname is not compliant with other implementations,
       since they always  return  len  bytes,  even  if  name  is
       longer.   Linux,  however, returns EINVAL in this case (as
       of DLL 4.4.1 libraries).

NOTES
       Under Linux, getdomainname is implemented at  the  library
       level by calling uname(2).

SEE ALSO
       gethostname(2), sethostname(2), uname(2)

Linux 0.99.11              22 July 1993                         1

Back to the index


Apply now!


Handbook

Postgraduate study options

Computer Science Blog



Please give us your feedback or ask us a question

This message is...


My feedback or question is...


My email address is...

(Only if you need a reply)

A to Z Directory | Site map | Accessibility | Copyright | Privacy | Disclaimer | Feedback on this page