home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / armlinux / alpha / PARTITIONS / USR_GZ / usr / include / rpcsvc / ypclnt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-14  |  3.0 KB  |  93 lines

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