Annotation of cci/usr/src/man/man2/gethostname.2, revision 1.1

1.1     ! root        1: .TH GETHOSTNAME 2 "12 February 1983"
        !             2: .UC 4
        !             3: .SH NAME
        !             4: gethostname, sethostname \- get/set name of current host
        !             5: .SH SYNOPSIS
        !             6: .nf
        !             7: .ft B
        !             8: gethostname(name, namelen)
        !             9: char *name;
        !            10: int namelen;
        !            11: .PP
        !            12: .ft B
        !            13: sethostname(name, namelen)
        !            14: char *name;
        !            15: int namelen;
        !            16: .fi
        !            17: .SH DESCRIPTION
        !            18: .I Gethostname
        !            19: returns the standard host name for the current processor, as
        !            20: previously set by
        !            21: .IR sethostname . 
        !            22: The parameter
        !            23: .I namelen
        !            24: specifies the size of the 
        !            25: .I name
        !            26: array.  The returned name is null-terminated unless insufficient
        !            27: space is provided.
        !            28: .PP
        !            29: .I Sethostname
        !            30: sets the name of the host machine to be
        !            31: .IR name ,
        !            32: which has length
        !            33: .IR namelen .
        !            34: This call is restricted to the super-user and
        !            35: is normally used only when the system is bootstrapped.
        !            36: .SH "RETURN VALUE
        !            37: If the call succeeds a value of 0 is returned.  If the call
        !            38: fails, then a value of \-1 is returned and an error code is
        !            39: placed int the global location \fIerrno\fP.
        !            40: .SH "ERRORS
        !            41: The following errors may be returned by these calls:
        !            42: .TP 15
        !            43: [EFAULT]
        !            44: The \fIname\fP or \fInamelen\fP parameter gave an
        !            45: invalid address.
        !            46: .TP 15
        !            47: [EPERM]
        !            48: The caller was not the super-user.
        !            49: .SH SEE ALSO
        !            50: gethostid(2)
        !            51: .SH BUGS
        !            52: Host names are limited to 255 characters.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.