home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / source / kboot22.zoo / kboot22.2 / getaa.c < prev    next >
C/C++ Source or Header  |  1991-02-22  |  787b  |  42 lines

  1. #ifndef lint
  2. static char    *RCSid="$Header: /tmp_mnt/home/src/rand/etc/kboot/RCS/getaa.c,v 1.1 91/01/29 17:37:21 root Exp $";
  3. #endif lint
  4.  
  5. /*
  6.  * $Log:    getaa.c,v $
  7.  * Revision 1.1  91/01/29  17:37:21  root
  8.  * Initial revision
  9.  * 
  10.  */
  11.  
  12. #include <stdio.h>
  13. #include <rpc/rpc.h>
  14. #include "aarpd.h"
  15.  
  16. /*
  17.  * getaa - Return appletalk address of "host".  If host is NULL get
  18.  *   local host address.  Makes RPC call to aarpd on host.
  19.  */
  20. int getaa (host, aa)
  21.  
  22. char    *host;
  23. int    *aa;
  24.  
  25. {
  26.   int    i;
  27.   int    s;
  28.  
  29.   if (host == NULL)
  30.       host = "localhost";
  31. /*
  32.  * Give aarpd a chance to register with portmap...
  33.  */
  34.   for (i = 0; i < 3; i++)
  35.       if ((s = callrpc (host, GETAAPROG, GETAAVERS, GETAAPROC,
  36.                    xdr_void, 0, xdr_u_long, aa)) == 0)
  37.       break;
  38.       else
  39.       sleep (2);
  40.   return (s);
  41. }
  42.