home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / bsd / rpcsvc / ypclnt.h < prev    next >
C/C++ Source or Header  |  1990-01-22  |  2KB  |  84 lines

  1. /*    @(#)ypclnt.h    1.1 88/02/17 4.0NFSSRC SMI    */
  2.  
  3. /* 
  4.  * Copyright (c) 1988 by Sun Microsystems, Inc.
  5.  *     1.12 86/12/19 
  6.  */
  7.  
  8.  
  9. /*
  10.  * ypclnt.h
  11.  * This defines the symbols used in the c language
  12.  * interface to the yp client functions.  A description of this interface
  13.  * can be read in ypclnt(3N).
  14.  */
  15.  
  16. /*
  17.  * Failure reason codes.  The success condition is indicated by a functional
  18.  * value of "0".
  19.  */
  20. #define YPERR_BADARGS 1            /* Args to function are bad */
  21. #define YPERR_RPC 2            /* RPC failure */
  22. #define YPERR_DOMAIN 3            /* Can't bind to a server which serves
  23.                      *   this domain. */
  24. #define YPERR_MAP 4            /* No such map in server's domain */
  25. #define YPERR_KEY 5            /* No such key in map */
  26. #define YPERR_YPERR 6            /* Internal yp server or client
  27.                      *   interface error */
  28. #define YPERR_RESRC 7            /* Local resource allocation failure */
  29. #define YPERR_NOMORE 8            /* No more records in map database */
  30. #define YPERR_PMAP 9            /* Can't communicate with portmapper */
  31. #define YPERR_YPBIND 10            /* Can't communicate with ypbind */
  32. #define YPERR_YPSERV 11            /* Can't communicate with ypserv */
  33. #define YPERR_NODOM 12            /* Local domain name not set */
  34. #define YPERR_BADDB 13            /*  yp data base is bad */
  35. #define YPERR_VERS 14            /* YP version mismatch */
  36. #define YPERR_ACCESS 15            /* Access violation */
  37. #define YPERR_BUSY 16            /* Database is busy */
  38.  
  39. /*
  40.  * Types of update operations
  41.  */
  42. #define YPOP_CHANGE 1            /* change, do not add */
  43. #define YPOP_INSERT 2            /* add, do not change */
  44. #define YPOP_DELETE 3            /* delete this entry */
  45. #define YPOP_STORE  4            /* add, or change */
  46.  
  47.  
  48.  
  49. /*           
  50.  * Data definitions
  51.  */
  52.  
  53. /*
  54.  * struct ypall_callback * is the arg which must be passed to yp_all
  55.  */
  56.  
  57. struct ypall_callback {
  58.     int (*foreach)();        /* Return non-0 to stop getting
  59.                      *  called */
  60.     char *data;            /* Opaque pointer for use of callback
  61.                      *   function */
  62. };
  63.  
  64. /*
  65.  * External yp client function references. 
  66.  */
  67. extern int yp_bind();
  68. extern int _yp_dobind();
  69. extern void yp_unbind();
  70. extern int yp_get_default_domain ();
  71. extern int yp_match ();
  72. extern int yp_first ();
  73. extern int yp_next();
  74. extern int yp_master();
  75. extern int yp_order();
  76. extern int yp_all();
  77. extern int yp_match();
  78. extern char *yperr_string();
  79. extern int ypprot_err();
  80.  
  81. /*
  82.  * Global yp data structures
  83.  */
  84.