GETNET(2)
NAME
getnet − obtain the Internet (IP) address of local machine’s network
SYNOPSIS
int getnet(ip)
IPaddr ip;
DESCRIPTION
Getnet obtains the Internet (IP) address of the local machine’s primary network, and stores it in the 4-byte array specified by argument ip. Calling getnet may trigger a Reverse Address Resolution Protocol (RARP) broadcast to find the address. If RARP succeeds, the address is kept locally for successive lookup requests. If RARP fails, getnet calls panic to halt processing.
SEE ALSO
getaddr(2), getname(2), getnet(2)
BUGS
There is no provision to obtain multiple addresses for machines that connect to multiple networks.
December 01, 1986 — Xinu Programmer’s Manual