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