Xinu7/man/man2/getaddr.doc




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



NAME
     getaddr - obtain the local machine's Internet (IP) address

SYNOPSIS
     int getaddr(ip)
     IPaddr ip;

DESCRIPTION
     _G_e_t_a_d_d_r obtains the local machine's primary Internet (IP)
     address and places it in the 4-byte array specified by argu-
     ment _i_p.  Calling _g_e_t_a_d_d_r 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_a_d_d_r calls _p_a_n_i_c to halt
     processing.

SEE ALSO
     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