Node and Host Name Sizes on HP-UX: Using the Expanded Capabilities of HP-UX

40
node name can be accessed by the uname(1) command or by the uname(2) system
function.
nodename, utsname.nodename
The nodename is the field within the utsname structure as returned by the uname(2) system
function. For programs compiled with _HPUX_API_LEVEL=20040821, it can be up to 255
bytes (plus null terminator).
re-export of interfaces
The definition of an exported interface (A) can include part of some other interface definition
(B). In this case A “re-exports” B. For example, consider the interface myfunction()
which returns a structure mystruct which contains the field myhostname char
[MAXHOSTNAMELEN]. The interface myfunction() re-exports part of the host name
interface, specifically, the MAXHOSTNAMELEN interface.
RFC 1034
The Internet specification for the Domain Name System (DNS). A copy can be found at
(http://www.rfc-archive.org/getrfc.php?rfc=1034).
_SC_HOST_NAME_MAX
A parameter to the sysconf(2) system function by which a program can obtain the
maximum size of a host name.
sethostname(2)
The API used by system administrators to set the Internet host name for the system. The name
can later be retrieved by applications via the gethostname(2) API or the hostname(1)
command. See also node name and MAXHOSTNAMELEN.
setuname(2), setuname(1m)
The API and command, respectively, used by administrators to set the UUCP node name for
the system. The name can later be retrieved by applications via the uname(2) interface.
SNLEN
See SYS_NMLN.
source name
The name of an interface as written in a program’s source code file.
SYS_NMLN, SNLEN, UTSLEN
Symbolic constants that specify the length of the fields in the utsname structure. . All three
have the value 257 in compilation environments when the 20040821 HP-UX API level is
selected. In the default compilation environment, the value is 9 (SYS_NMLN and UTSLEN) or
15 (SNLEN).
uname(2), uname(1)
The API and command, respectively, used to obtain a set of system parameters, including the
node name. The node name can be obtained from the utsname.nodename field returned
by the API, or from the command using the –n or –a option. There are two versions of the
uname(2) API a nonexpanded version compatible with previous versions of HP-UX, and an
expanded version. The version used by a program is determined by the setting of the
_HPUX_API_LEVEL compile-time symbol.