xref: /titanic_44/usr/src/lib/libbc/libc/yp/ypclnt.h (revision 0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02b)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1991 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 /*
30  * ypclnt.h
31  * This defines the symbols used in the c language
32  * interface to the NIS client functions.  A description of this interface
33  * can be read in ypclnt(3N).
34  */
35 
36 /*
37  * Failure reason codes.  The success condition is indicated by a functional
38  * value of "0".
39  */
40 #define YPERR_BADARGS 1			/* Args to function are bad */
41 #define YPERR_RPC 2			/* RPC failure */
42 #define YPERR_DOMAIN 3			/* Can't bind to a server which serves
43 					 *   this domain. */
44 #define YPERR_MAP 4			/* No such map in server's domain */
45 #define YPERR_KEY 5			/* No such key in map */
46 #define YPERR_YPERR 6			/* Internal NIS server or client
47 					 *   interface error */
48 #define YPERR_RESRC 7			/* Local resource allocation failure */
49 #define YPERR_NOMORE 8			/* No more records in map database */
50 #define YPERR_PMAP 9			/* Can't communicate with portmapper */
51 #define YPERR_YPBIND 10			/* Can't communicate with ypbind */
52 #define YPERR_YPSERV 11			/* Can't communicate with ypserv */
53 #define YPERR_NODOM 12			/* Local domain name not set */
54 #define YPERR_BADDB 13			/* NIS data base is bad */
55 #define YPERR_VERS 14			/* NIS version mismatch */
56 #define YPERR_ACCESS 15			/* Access violation */
57 #define YPERR_BUSY 16			/* Database is busy */
58 
59 /*
60  * Types of update operations
61  */
62 #define YPOP_CHANGE 1			/* change, do not add */
63 #define YPOP_INSERT 2			/* add, do not change */
64 #define YPOP_DELETE 3			/* delete this entry */
65 #define YPOP_STORE  4			/* add, or change */
66 
67 
68 
69 /*
70  * Data definitions
71  */
72 
73 /*
74  * struct ypall_callback * is the arg which must be passed to yp_all
75  */
76 
77 struct ypall_callback {
78 	int (*foreach)();		/* Return non-0 to stop getting
79 					 *  called */
80 	char *data;			/* Opaque pointer for use of callback
81 					 *   function */
82 };
83 
84 /*
85  * External NIS client function references.
86  */
87 extern int yp_bind();
88 extern int _yp_dobind();
89 extern void yp_unbind();
90 extern int yp_get_default_domain ();
91 extern int yp_match ();
92 extern int yp_first ();
93 extern int yp_next();
94 extern int yp_master();
95 extern int yp_order();
96 extern int yp_all();
97 extern int yp_match();
98 extern char *yperr_string();
99 extern int ypprot_err();
100 
101 /*
102  * Global NIS data structures
103  */
104