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