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
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]
25 * Copyright (c) 1988-1992 Sun Microsystems Inc
26 * All Rights Reserved.
29 %#pragma ident "%Z%%M% %I% %E% SMI"
32 * Protocol description file for the Network Information Services
35 const YPMAXRECORD = 1024;
36 const YPMAXDOMAIN = 256;
76 typedef string domainname<YPMAXDOMAIN>;
77 typedef string mapname<YPMAXMAP>;
78 typedef string peername<YPMAXPEER>;
79 typedef opaque keydat<YPMAXRECORD>;
80 typedef opaque valdat<YPMAXRECORD>;
86 unsigned int ordernum;
102 ypmap_parms map_parms;
103 unsigned int transid;
114 struct ypresp_key_val {
121 struct ypresp_master {
126 struct ypresp_order {
128 unsigned int ordernum;
131 union ypresp_all switch (bool more) {
139 unsigned int transid;
148 struct ypresp_maplist {
154 YPPUSH_SUCC = 1, /* Success */
155 YPPUSH_AGE = 2, /* Master's version not newer */
156 YPPUSH_NOMAP = -1, /* Can't find server for map */
157 YPPUSH_NODOM = -2, /* Domain not supported */
158 YPPUSH_RSRC = -3, /* Local resource alloc failure */
159 YPPUSH_RPC = -4, /* RPC failure talking to server */
160 YPPUSH_MADDR = -5, /* Can't get master address */
161 YPPUSH_YPERR = -6, /* NIS server/map db error */
162 YPPUSH_BADARGS = -7, /* Request arguments bad */
163 YPPUSH_DBM = -8, /* Local dbm operation failed */
164 YPPUSH_FILE = -9, /* Local file I/O operation failed */
165 YPPUSH_SKEW = -10, /* Map version skew during transfer */
166 YPPUSH_CLEAR = -11, /* Can't send "Clear" req to local ypserv */
167 YPPUSH_FORCE = -12, /* No local order number in map use -f flag. */
168 YPPUSH_XFRERR = -13, /* ypxfr error */
169 YPPUSH_REFUSED = -14 /* Transfer request refused by ypserv */
172 struct yppushresp_xfr {
174 yppush_status status;
178 * Response structure and overall result status codes. Success and failure
179 * represent two separate response message types.
182 enum ypbind_resptype {
187 struct ypbind_binding {
188 opaque ypbind_binding_addr[4]; /* In network order */
189 opaque ypbind_binding_port[2]; /* In network order */
192 union ypbind_resp switch (ypbind_resptype ypbind_status) {
193 case YPBIND_FAIL_VAL:
194 unsigned ypbind_error;
195 case YPBIND_SUCC_VAL:
196 ypbind_binding ypbind_bindinfo;
199 /* Detailed failure reason codes for response field ypbind_error*/
201 const YPBIND_ERR_ERR = 1; /* Internal error */
202 const YPBIND_ERR_NOSERV = 2; /* No bound server for passed domain */
203 const YPBIND_ERR_RESC = 3; /* System resource allocation failure */
207 * Request data structure for ypbind "Set domain" procedure.
209 struct ypbind_setdom {
210 domainname ypsetdom_domain;
211 ypbind_binding ypsetdom_binding;
212 unsigned ypsetdom_vers;
217 * NIS access protocol
222 YPPROC_NULL(void) = 0;
225 YPPROC_DOMAIN(domainname) = 1;
228 YPPROC_DOMAIN_NONACK(domainname) = 2;
231 YPPROC_MATCH(ypreq_key) = 3;
234 YPPROC_FIRST(ypreq_key) = 4;
237 YPPROC_NEXT(ypreq_key) = 5;
240 YPPROC_XFR(ypreq_xfr) = 6;
243 YPPROC_CLEAR(void) = 7;
246 YPPROC_ALL(ypreq_nokey) = 8;
249 YPPROC_MASTER(ypreq_nokey) = 9;
252 YPPROC_ORDER(ypreq_nokey) = 10;
255 YPPROC_MAPLIST(domainname) = 11;
261 * YPPUSHPROC_XFRRESP is the callback routine for result of YPPROC_XFR
263 program YPPUSH_XFRRESPPROG {
264 version YPPUSH_XFRRESPVERS {
266 YPPUSHPROC_NULL(void) = 0;
269 YPPUSHPROC_XFRRESP(void) = 1;
271 } = 0x40000000; /* transient: could be anything up to 0x5fffffff */
275 * NIS binding protocol
280 YPBINDPROC_NULL(void) = 0;
283 YPBINDPROC_DOMAIN(domainname) = 1;
286 YPBINDPROC_SETDOM(ypbind_setdom) = 2;