GETNAME(2)
NAME
getname − return the official Internet domain name of the local host
SYNOPSIS
int ∗getname(name)
char ∗name;
DESCRIPTION
Getname returns the least−significant component of the official Internet domain name of the local host using GETADDR(2) to obtain the host’s IP address, and IP2NAME(2) to translate the IP address into a domain name. For example, when executed on host merlin.cs.purdue.edu, getname returns the string merlin.
Argument name gives the starting address of an area in which the name should be placed. Getname writes the name as a contiguous, null−terminated byte string.
SEE ALSO
BUGS
There is no way to force getname to return the full domain name.
December 01, 1986 — Xinu Programmer’s Manual