Xinu7/man/man2/getnet.doc




GETNET(2)           Xinu Programmer's Manual            GETNET(2)



NAME
     getnet - obtain the Internet (IP) address of local machine's
     network

SYNOPSIS
     int getnet(ip)
     IPaddr ip;

DESCRIPTION
     _G_e_t_n_e_t obtains the Internet (IP) address of the local
     machine's primary network, and stores it in the 4-byte array
     specified by argument _i_p.  Calling _g_e_t_n_e_t 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, _g_e_t_n_e_t calls
     _p_a_n_i_c 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.
































Version 6b               Printed 1/12/87                        1