dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / include / rpcsvc / ypclnt.h
blob6506f76ae6c5aef9358e815396e2f642c5ee9961
1 /*
2 * CDDL HEADER START
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.
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.
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]
20 * CDDL HEADER END
23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25 * Copyright 1989 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
29 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
30 /* All Rights Reserved */
33 * Portions of this source code were derived from Berkeley 4.3 BSD
34 * under license from the Regents of the University of California.
37 #ifndef _RPCSVC_YPCLNT_H
38 #define _RPCSVC_YPCLNT_H
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
45 * ypclnt.h
46 * This defines the symbols used in the c language
47 * interface to the yp client functions. A description of this interface
48 * can be read in ypclnt(3N).
52 * Failure reason codes. The success condition is indicated by a functional
53 * value of "0".
55 #define YPERR_BADARGS 1 /* Args to function are bad */
56 #define YPERR_RPC 2 /* RPC failure */
57 #define YPERR_DOMAIN 3 /* Can't bind to a server which */
58 /* serves this domain. */
59 #define YPERR_MAP 4 /* No such map in server's domain */
60 #define YPERR_KEY 5 /* No such key in map */
61 #define YPERR_YPERR 6 /* Internal yp server or client */
62 /* interface error */
63 #define YPERR_RESRC 7 /* Local resource allocation failure */
64 #define YPERR_NOMORE 8 /* No more records in map database */
65 #define YPERR_PMAP 9 /* Can't communicate with portmapper */
66 #define YPERR_YPBIND 10 /* Can't communicate with ypbind */
67 #define YPERR_YPSERV 11 /* Can't communicate with ypserv */
68 #define YPERR_NODOM 12 /* Local domain name not set */
69 #define YPERR_BADDB 13 /* yp data base is bad */
70 #define YPERR_VERS 14 /* YP version mismatch */
71 #define YPERR_ACCESS 15 /* Access violation */
72 #define YPERR_BUSY 16 /* Database is busy */
75 * Types of update operations
77 #define YPOP_CHANGE 1 /* change, do not add */
78 #define YPOP_INSERT 2 /* add, do not change */
79 #define YPOP_DELETE 3 /* delete this entry */
80 #define YPOP_STORE 4 /* add, or change */
85 * Data definitions
89 * struct ypall_callback * is the arg which must be passed to yp_all
92 struct ypall_callback {
93 int (*foreach)(); /* Return non-0 to stop getting */
94 /* called */
95 char *data; /* Opaque pointer for use of callback */
96 /* function */
100 * External yp client function references.
103 extern int yp_bind(char *);
104 extern void yp_unbind(char *);
105 extern int yp_get_default_domain(char **);
106 extern int yp_match(char *, char *, char *, int, char **, int *);
107 extern int yp_first(char *, char *, char **, int *, char **, int *);
108 extern int yp_next(char *, char *, char *, int, char **, int *, char **, int *);
109 extern int yp_master(char *, char *, char **);
110 extern int yp_order(char *, char *, unsigned long *);
111 extern int yp_all(char *, char *, struct ypall_callback *);
112 extern char *yperr_string(int);
113 extern int ypprot_err(int);
114 extern int yp_update(char *, char *, unsigned, char *, int, char *, int);
117 * Global yp data structures
120 #ifdef __cplusplus
122 #endif
124 #endif /* _RPCSVC_YPCLNT_H */