Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rhost(3N) — GL2 W2.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rsh(1C)

rlogin(1C)

socket(3N)

RHOST(3N)  —  Silicon Graphics

NAME

rhost, raddr − look up internet hosts by name or address

SYNOPSIS

iaddr = rhost(aname);
long iaddr;
char **aname; name = raddr(iaddr);
long iaddr;

DESCRIPTION

rhost uses the pointer to an Internet host name (aname) and returns the 32-bit Internet address in network byte order.  This is used as the sockaddr_in Internet address as sockaddr_in.sin_addr.s_addr.  If the host name is unknown, rhost returns −1.  If the host name is known, *aname points to the standard name of the specified host (the first name in its entry in /etc/hosts).  The return value is saved with malloc and is not destroyed on subsequent calls. 

raddr works similarly, looking up the name for an Internet address. 

FILES

/etc/hosts

SEE ALSO

rsh(1C), rlogin(1C), socket(3N)

Version 2.4  —  September 29, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026