xref: /titanic_50/usr/src/lib/libbc/libc/yp/yp_prot.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 1997 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
28*7c478bd9Sstevel@tonic-gate 
29*7c478bd9Sstevel@tonic-gate /*
30*7c478bd9Sstevel@tonic-gate  * This file contains symbols and structures defining the rpc protocol
31*7c478bd9Sstevel@tonic-gate  * between the NIS clients and the NIS servers.  The servers
32*7c478bd9Sstevel@tonic-gate  * are the NIS database servers, and the NIS binders.
33*7c478bd9Sstevel@tonic-gate  */
34*7c478bd9Sstevel@tonic-gate 
35*7c478bd9Sstevel@tonic-gate /*
36*7c478bd9Sstevel@tonic-gate  * The following procedures are supported by the protocol:
37*7c478bd9Sstevel@tonic-gate  *
38*7c478bd9Sstevel@tonic-gate  * YPPROC_NULL() returns () takes nothing, returns nothing.  This indicates
39*7c478bd9Sstevel@tonic-gate  * that the NIS server is alive.
40*7c478bd9Sstevel@tonic-gate  *
41*7c478bd9Sstevel@tonic-gate  * YPPROC_DOMAIN (char *) returns (bool_t) TRUE.  Indicates that the
42*7c478bd9Sstevel@tonic-gate  * responding NIS server does serve the named domain; FALSE indicates no
43*7c478bd9Sstevel@tonic-gate  * support.
44*7c478bd9Sstevel@tonic-gate  *
45*7c478bd9Sstevel@tonic-gate  * YPPROC_DOMAIN_NONACK (char *) returns (TRUE) if the NIS server does serve
46*7c478bd9Sstevel@tonic-gate  * the named domain, otherwise does not return.  Used in the broadcast case.
47*7c478bd9Sstevel@tonic-gate  *
48*7c478bd9Sstevel@tonic-gate  * YPPROC_MATCH (struct ypreq_key) returns (struct ypresp_val).  Returns the
49*7c478bd9Sstevel@tonic-gate  * right-hand value for a passed left-hand key, within a named map and
50*7c478bd9Sstevel@tonic-gate  * domain.
51*7c478bd9Sstevel@tonic-gate  *
52*7c478bd9Sstevel@tonic-gate  * YPPROC_FIRST (struct ypreq_nokey) returns (struct ypresp_key_val).
53*7c478bd9Sstevel@tonic-gate  * Returns the first key-value pair from a named domain and map.
54*7c478bd9Sstevel@tonic-gate  *
55*7c478bd9Sstevel@tonic-gate  * YPPROC_NEXT (struct ypreq_key) returns (struct ypresp_key_val).  Returns
56*7c478bd9Sstevel@tonic-gate  * the key-value pair following a passed key-value pair within a named
57*7c478bd9Sstevel@tonic-gate  * domain and map.
58*7c478bd9Sstevel@tonic-gate  *
59*7c478bd9Sstevel@tonic-gate  * YPPROC_XFR (struct ypreq_xfr) returns nothing.  Indicates to a server that
60*7c478bd9Sstevel@tonic-gate  * a map should be updated.
61*7c478bd9Sstevel@tonic-gate  *
62*7c478bd9Sstevel@tonic-gate  * YPPROC_CLEAR	takes nothing, returns nothing.  Instructs a NIS server to
63*7c478bd9Sstevel@tonic-gate  * close the current map, so that old versions of the disk file don't get
64*7c478bd9Sstevel@tonic-gate  * held open.
65*7c478bd9Sstevel@tonic-gate  *
66*7c478bd9Sstevel@tonic-gate  * YPPROC_ALL (struct ypreq_nokey), returns
67*7c478bd9Sstevel@tonic-gate  * 	union switch (bool more) {
68*7c478bd9Sstevel@tonic-gate  *		TRUE:	(struct ypresp_key_val);
69*7c478bd9Sstevel@tonic-gate  *		FALSE:	(struct) {};
70*7c478bd9Sstevel@tonic-gate  *	}
71*7c478bd9Sstevel@tonic-gate  *
72*7c478bd9Sstevel@tonic-gate  * YPPROC_MASTER (struct ypreq_nokey), returns (ypresp_master)
73*7c478bd9Sstevel@tonic-gate  *
74*7c478bd9Sstevel@tonic-gate  * YPPROC_ORDER (struct ypreq_nokey), returns (ypresp_order)
75*7c478bd9Sstevel@tonic-gate  *
76*7c478bd9Sstevel@tonic-gate  * YPPROC_MAPLIST (char *), returns (struct ypmaplist *)
77*7c478bd9Sstevel@tonic-gate  */
78*7c478bd9Sstevel@tonic-gate #ifndef BOOL_DEFINED
79*7c478bd9Sstevel@tonic-gate typedef unsigned int bool;
80*7c478bd9Sstevel@tonic-gate #define BOOL_DEFINED
81*7c478bd9Sstevel@tonic-gate #endif
82*7c478bd9Sstevel@tonic-gate 
83*7c478bd9Sstevel@tonic-gate extern bool xdr_datum();
84*7c478bd9Sstevel@tonic-gate extern bool xdr_ypdomain_wrap_string();
85*7c478bd9Sstevel@tonic-gate extern bool xdr_ypmap_wrap_string();
86*7c478bd9Sstevel@tonic-gate extern bool xdr_ypreq_key();
87*7c478bd9Sstevel@tonic-gate extern bool xdr_ypreq_nokey();
88*7c478bd9Sstevel@tonic-gate extern bool xdr_ypreq_xfr();
89*7c478bd9Sstevel@tonic-gate extern bool xdr_ypresp_val();
90*7c478bd9Sstevel@tonic-gate extern bool xdr_ypresp_key_val();
91*7c478bd9Sstevel@tonic-gate extern bool xdr_ypbind_resp();
92*7c478bd9Sstevel@tonic-gate extern bool xdr_ypbind_setdom();
93*7c478bd9Sstevel@tonic-gate extern bool xdr_yp_inaddr();
94*7c478bd9Sstevel@tonic-gate extern bool xdr_ypmap_parms();
95*7c478bd9Sstevel@tonic-gate extern bool xdr_ypowner_wrap_string();
96*7c478bd9Sstevel@tonic-gate extern bool xdr_yppushresp_xfr();
97*7c478bd9Sstevel@tonic-gate extern bool xdr_ypresp_order();
98*7c478bd9Sstevel@tonic-gate extern bool xdr_ypresp_master();
99*7c478bd9Sstevel@tonic-gate extern bool xdr_ypall();
100*7c478bd9Sstevel@tonic-gate extern bool xdr_ypresp_maplist();
101*7c478bd9Sstevel@tonic-gate 
102*7c478bd9Sstevel@tonic-gate /* Program and version symbols, magic numbers */
103*7c478bd9Sstevel@tonic-gate 
104*7c478bd9Sstevel@tonic-gate #define YPPROG		((u_long)100004)
105*7c478bd9Sstevel@tonic-gate #define YPVERS		((u_long)2)
106*7c478bd9Sstevel@tonic-gate #define YPVERS_ORIG	((u_long)1)
107*7c478bd9Sstevel@tonic-gate #define YPMAXRECORD	((u_long)1024)
108*7c478bd9Sstevel@tonic-gate #define YPMAXDOMAIN	((u_long)256)
109*7c478bd9Sstevel@tonic-gate #define YPMAXMAP	((u_long)64)
110*7c478bd9Sstevel@tonic-gate #define YPMAXPEER	((u_long)256)
111*7c478bd9Sstevel@tonic-gate 
112*7c478bd9Sstevel@tonic-gate /* byte size of a large NIS packet */
113*7c478bd9Sstevel@tonic-gate #define YPMSGSZ		1600
114*7c478bd9Sstevel@tonic-gate 
115*7c478bd9Sstevel@tonic-gate #ifndef DATUM
116*7c478bd9Sstevel@tonic-gate typedef struct {
117*7c478bd9Sstevel@tonic-gate 	char	*dptr;
118*7c478bd9Sstevel@tonic-gate 	int	dsize;
119*7c478bd9Sstevel@tonic-gate } datum;
120*7c478bd9Sstevel@tonic-gate #define DATUM
121*7c478bd9Sstevel@tonic-gate #endif
122*7c478bd9Sstevel@tonic-gate 
123*7c478bd9Sstevel@tonic-gate struct ypmap_parms {
124*7c478bd9Sstevel@tonic-gate 	char *domain;			/* Null string means not available */
125*7c478bd9Sstevel@tonic-gate 	char *map;			/* Null string means not available */
126*7c478bd9Sstevel@tonic-gate 	unsigned long int ordernum;	/* 0 means not available */
127*7c478bd9Sstevel@tonic-gate 	char *owner;			/* Null string means not available */
128*7c478bd9Sstevel@tonic-gate };
129*7c478bd9Sstevel@tonic-gate 
130*7c478bd9Sstevel@tonic-gate /*
131*7c478bd9Sstevel@tonic-gate  * Request parameter structures
132*7c478bd9Sstevel@tonic-gate  */
133*7c478bd9Sstevel@tonic-gate 
134*7c478bd9Sstevel@tonic-gate struct ypreq_key {
135*7c478bd9Sstevel@tonic-gate 	char *domain;
136*7c478bd9Sstevel@tonic-gate 	char *map;
137*7c478bd9Sstevel@tonic-gate 	datum keydat;
138*7c478bd9Sstevel@tonic-gate };
139*7c478bd9Sstevel@tonic-gate 
140*7c478bd9Sstevel@tonic-gate struct ypreq_nokey {
141*7c478bd9Sstevel@tonic-gate 	char *domain;
142*7c478bd9Sstevel@tonic-gate 	char *map;
143*7c478bd9Sstevel@tonic-gate };
144*7c478bd9Sstevel@tonic-gate 
145*7c478bd9Sstevel@tonic-gate struct ypreq_xfr {
146*7c478bd9Sstevel@tonic-gate 	struct ypmap_parms map_parms;
147*7c478bd9Sstevel@tonic-gate 	unsigned long transid;
148*7c478bd9Sstevel@tonic-gate 	unsigned long proto;
149*7c478bd9Sstevel@tonic-gate 	unsigned short port;
150*7c478bd9Sstevel@tonic-gate };
151*7c478bd9Sstevel@tonic-gate #define ypxfr_domain map_parms.domain
152*7c478bd9Sstevel@tonic-gate #define ypxfr_map map_parms.map
153*7c478bd9Sstevel@tonic-gate #define ypxfr_ordernum map_parms.ordernum
154*7c478bd9Sstevel@tonic-gate #define ypxfr_owner map_parms.owner
155*7c478bd9Sstevel@tonic-gate 
156*7c478bd9Sstevel@tonic-gate /*
157*7c478bd9Sstevel@tonic-gate  * Response parameter structures
158*7c478bd9Sstevel@tonic-gate  */
159*7c478bd9Sstevel@tonic-gate 
160*7c478bd9Sstevel@tonic-gate struct ypresp_val {
161*7c478bd9Sstevel@tonic-gate 	long unsigned status;
162*7c478bd9Sstevel@tonic-gate 	datum valdat;
163*7c478bd9Sstevel@tonic-gate };
164*7c478bd9Sstevel@tonic-gate 
165*7c478bd9Sstevel@tonic-gate struct ypresp_key_val {
166*7c478bd9Sstevel@tonic-gate 	long unsigned status;
167*7c478bd9Sstevel@tonic-gate 	datum keydat;
168*7c478bd9Sstevel@tonic-gate 	datum valdat;
169*7c478bd9Sstevel@tonic-gate };
170*7c478bd9Sstevel@tonic-gate 
171*7c478bd9Sstevel@tonic-gate struct ypresp_master {
172*7c478bd9Sstevel@tonic-gate 	long unsigned status;
173*7c478bd9Sstevel@tonic-gate 	char *master;
174*7c478bd9Sstevel@tonic-gate };
175*7c478bd9Sstevel@tonic-gate 
176*7c478bd9Sstevel@tonic-gate struct ypresp_order {
177*7c478bd9Sstevel@tonic-gate 	long unsigned status;
178*7c478bd9Sstevel@tonic-gate 	unsigned long int ordernum;
179*7c478bd9Sstevel@tonic-gate };
180*7c478bd9Sstevel@tonic-gate 
181*7c478bd9Sstevel@tonic-gate struct ypmaplist {
182*7c478bd9Sstevel@tonic-gate 	char ypml_name[YPMAXMAP + 1];
183*7c478bd9Sstevel@tonic-gate 	struct ypmaplist *ypml_next;
184*7c478bd9Sstevel@tonic-gate };
185*7c478bd9Sstevel@tonic-gate 
186*7c478bd9Sstevel@tonic-gate struct ypresp_maplist {
187*7c478bd9Sstevel@tonic-gate 	long unsigned status;
188*7c478bd9Sstevel@tonic-gate 	struct ypmaplist *list;
189*7c478bd9Sstevel@tonic-gate };
190*7c478bd9Sstevel@tonic-gate 
191*7c478bd9Sstevel@tonic-gate /*
192*7c478bd9Sstevel@tonic-gate  * Procedure symbols.  YPPROC_NULL, YPPROC_DOMAIN, and YPPROC_DOMAIN_NONACK
193*7c478bd9Sstevel@tonic-gate  * must keep the same values (0, 1, and 2) that they had in the first version
194*7c478bd9Sstevel@tonic-gate  * of the protocol.
195*7c478bd9Sstevel@tonic-gate  */
196*7c478bd9Sstevel@tonic-gate 
197*7c478bd9Sstevel@tonic-gate #define YPPROC_NULL	((u_long)0)
198*7c478bd9Sstevel@tonic-gate #define YPPROC_DOMAIN	((u_long)1)
199*7c478bd9Sstevel@tonic-gate #define YPPROC_DOMAIN_NONACK ((u_long)2)
200*7c478bd9Sstevel@tonic-gate #define YPPROC_MATCH	((u_long)3)
201*7c478bd9Sstevel@tonic-gate #define YPPROC_FIRST	((u_long)4)
202*7c478bd9Sstevel@tonic-gate #define YPPROC_NEXT	((u_long)5)
203*7c478bd9Sstevel@tonic-gate #define YPPROC_XFR	((u_long)6)
204*7c478bd9Sstevel@tonic-gate #define YPPROC_CLEAR	((u_long)7)
205*7c478bd9Sstevel@tonic-gate #define YPPROC_ALL	((u_long)8)
206*7c478bd9Sstevel@tonic-gate #define YPPROC_MASTER	((u_long)9)
207*7c478bd9Sstevel@tonic-gate #define YPPROC_ORDER	((u_long)10)
208*7c478bd9Sstevel@tonic-gate #define YPPROC_MAPLIST	((u_long)11)
209*7c478bd9Sstevel@tonic-gate 
210*7c478bd9Sstevel@tonic-gate /* Return status values */
211*7c478bd9Sstevel@tonic-gate 
212*7c478bd9Sstevel@tonic-gate #define YP_TRUE	 	((long)1)	/* General purpose success code */
213*7c478bd9Sstevel@tonic-gate #define YP_NOMORE 	((long)2)	/* No more entries in map */
214*7c478bd9Sstevel@tonic-gate #define YP_FALSE 	((long)0)	/* General purpose failure code */
215*7c478bd9Sstevel@tonic-gate #define YP_NOMAP 	((long)-1)	/* No such map in domain */
216*7c478bd9Sstevel@tonic-gate #define YP_NODOM 	((long)-2)	/* Domain not supported */
217*7c478bd9Sstevel@tonic-gate #define YP_NOKEY 	((long)-3)	/* No such key in map */
218*7c478bd9Sstevel@tonic-gate #define YP_BADOP 	((long)-4)	/* Invalid operation */
219*7c478bd9Sstevel@tonic-gate #define YP_BADDB 	((long)-5)	/* Server data base is bad */
220*7c478bd9Sstevel@tonic-gate #define YP_YPERR 	((long)-6)	/* NIS server error */
221*7c478bd9Sstevel@tonic-gate #define YP_BADARGS 	((long)-7)	/* Request arguments bad */
222*7c478bd9Sstevel@tonic-gate #define YP_VERS		((long)-8)	/* NIS server version mismatch - server
223*7c478bd9Sstevel@tonic-gate 					 *   can't supply requested service. */
224*7c478bd9Sstevel@tonic-gate 
225*7c478bd9Sstevel@tonic-gate /*
226*7c478bd9Sstevel@tonic-gate  * Domain binding data structure, used by ypclnt package and ypserv modules.
227*7c478bd9Sstevel@tonic-gate  * Users of the ypclnt package (or of this protocol) don't HAVE to know about
228*7c478bd9Sstevel@tonic-gate  * it, but it must be available to users because _yp_dobind is a public
229*7c478bd9Sstevel@tonic-gate  * interface.
230*7c478bd9Sstevel@tonic-gate  */
231*7c478bd9Sstevel@tonic-gate 
232*7c478bd9Sstevel@tonic-gate struct dom_binding {
233*7c478bd9Sstevel@tonic-gate 	struct dom_binding *dom_pnext;
234*7c478bd9Sstevel@tonic-gate 	char dom_domain[YPMAXDOMAIN + 1];
235*7c478bd9Sstevel@tonic-gate 	struct sockaddr_in dom_server_addr;
236*7c478bd9Sstevel@tonic-gate 	unsigned short int dom_server_port;
237*7c478bd9Sstevel@tonic-gate 	int dom_socket;
238*7c478bd9Sstevel@tonic-gate 	CLIENT *dom_client;
239*7c478bd9Sstevel@tonic-gate 	unsigned short int dom_local_port;
240*7c478bd9Sstevel@tonic-gate 	long int dom_vers;
241*7c478bd9Sstevel@tonic-gate };
242*7c478bd9Sstevel@tonic-gate 
243*7c478bd9Sstevel@tonic-gate 
244*7c478bd9Sstevel@tonic-gate /*
245*7c478bd9Sstevel@tonic-gate  *		Protocol between clients and NIS binder servers
246*7c478bd9Sstevel@tonic-gate  */
247*7c478bd9Sstevel@tonic-gate 
248*7c478bd9Sstevel@tonic-gate /*
249*7c478bd9Sstevel@tonic-gate  * The following procedures are supported by the protocol:
250*7c478bd9Sstevel@tonic-gate  *
251*7c478bd9Sstevel@tonic-gate  * YPBINDPROC_NULL() returns ()
252*7c478bd9Sstevel@tonic-gate  * 	takes nothing, returns nothing
253*7c478bd9Sstevel@tonic-gate  *
254*7c478bd9Sstevel@tonic-gate  * YPBINDPROC_DOMAIN takes (char *) returns (struct ypbind_resp)
255*7c478bd9Sstevel@tonic-gate  *
256*7c478bd9Sstevel@tonic-gate  * YPBINDPROC_SETDOM takes (struct ypbind_setdom) returns nothing
257*7c478bd9Sstevel@tonic-gate  */
258*7c478bd9Sstevel@tonic-gate 
259*7c478bd9Sstevel@tonic-gate /* Program and version symbols, magic numbers */
260*7c478bd9Sstevel@tonic-gate 
261*7c478bd9Sstevel@tonic-gate #define YPBINDPROG		((u_long)100007)
262*7c478bd9Sstevel@tonic-gate #define YPBINDVERS		((u_long)2)
263*7c478bd9Sstevel@tonic-gate #define YPBINDVERS_ORIG		((u_long)1)
264*7c478bd9Sstevel@tonic-gate 
265*7c478bd9Sstevel@tonic-gate /* Procedure symbols */
266*7c478bd9Sstevel@tonic-gate 
267*7c478bd9Sstevel@tonic-gate #define YPBINDPROC_NULL		((u_long)0)
268*7c478bd9Sstevel@tonic-gate #define YPBINDPROC_DOMAIN	((u_long)1)
269*7c478bd9Sstevel@tonic-gate #define YPBINDPROC_SETDOM	((u_long)2)
270*7c478bd9Sstevel@tonic-gate /*
271*7c478bd9Sstevel@tonic-gate  * Response structure and overall result status codes.  Success and failure
272*7c478bd9Sstevel@tonic-gate  * represent two separate response message types.
273*7c478bd9Sstevel@tonic-gate  */
274*7c478bd9Sstevel@tonic-gate 
275*7c478bd9Sstevel@tonic-gate enum ypbind_resptype {YPBIND_SUCC_VAL = 1, YPBIND_FAIL_VAL = 2};
276*7c478bd9Sstevel@tonic-gate 
277*7c478bd9Sstevel@tonic-gate struct ypbind_binding {
278*7c478bd9Sstevel@tonic-gate 	struct in_addr ypbind_binding_addr;	/* In network order */
279*7c478bd9Sstevel@tonic-gate 	unsigned short int ypbind_binding_port;	/* In network order */
280*7c478bd9Sstevel@tonic-gate };
281*7c478bd9Sstevel@tonic-gate struct ypbind_resp {
282*7c478bd9Sstevel@tonic-gate 	enum ypbind_resptype ypbind_status;
283*7c478bd9Sstevel@tonic-gate 	union {
284*7c478bd9Sstevel@tonic-gate 		unsigned long ypbind_error;
285*7c478bd9Sstevel@tonic-gate 		struct ypbind_binding ypbind_bindinfo;
286*7c478bd9Sstevel@tonic-gate 	} ypbind_respbody;
287*7c478bd9Sstevel@tonic-gate };
288*7c478bd9Sstevel@tonic-gate 
289*7c478bd9Sstevel@tonic-gate 
290*7c478bd9Sstevel@tonic-gate /* Detailed failure reason codes for response field ypbind_error*/
291*7c478bd9Sstevel@tonic-gate 
292*7c478bd9Sstevel@tonic-gate #define YPBIND_ERR_ERR 1		/* Internal error */
293*7c478bd9Sstevel@tonic-gate #define YPBIND_ERR_NOSERV 2		/* No bound server for passed domain */
294*7c478bd9Sstevel@tonic-gate #define YPBIND_ERR_RESC 3		/* System resource allocation failure */
295*7c478bd9Sstevel@tonic-gate 
296*7c478bd9Sstevel@tonic-gate /*
297*7c478bd9Sstevel@tonic-gate  * Request data structure for ypbind "Set domain" procedure.
298*7c478bd9Sstevel@tonic-gate  */
299*7c478bd9Sstevel@tonic-gate struct ypbind_setdom {
300*7c478bd9Sstevel@tonic-gate 	char ypsetdom_domain[YPMAXDOMAIN + 1];
301*7c478bd9Sstevel@tonic-gate 	struct ypbind_binding ypsetdom_binding;
302*7c478bd9Sstevel@tonic-gate 	unsigned short ypsetdom_vers;
303*7c478bd9Sstevel@tonic-gate };
304*7c478bd9Sstevel@tonic-gate #define ypsetdom_addr ypsetdom_binding.ypbind_binding_addr
305*7c478bd9Sstevel@tonic-gate #define ypsetdom_port ypsetdom_binding.ypbind_binding_port
306*7c478bd9Sstevel@tonic-gate 
307*7c478bd9Sstevel@tonic-gate /*
308*7c478bd9Sstevel@tonic-gate  *		Protocol between clients (ypxfr, only) and yppush
309*7c478bd9Sstevel@tonic-gate  *		yppush speaks a protocol in the transient range, which
310*7c478bd9Sstevel@tonic-gate  *		is supplied to ypxfr as a command-line parameter when it
311*7c478bd9Sstevel@tonic-gate  *		is activated by ypserv.
312*7c478bd9Sstevel@tonic-gate  */
313*7c478bd9Sstevel@tonic-gate #define YPPUSHVERS		((u_long) 1)
314*7c478bd9Sstevel@tonic-gate #define YPPUSHVERS_ORIG		((u_long)1)
315*7c478bd9Sstevel@tonic-gate 
316*7c478bd9Sstevel@tonic-gate /* Procedure symbols */
317*7c478bd9Sstevel@tonic-gate 
318*7c478bd9Sstevel@tonic-gate #define YPPUSHPROC_NULL		((u_long)0)
319*7c478bd9Sstevel@tonic-gate #define YPPUSHPROC_XFRRESP	((u_long)1)
320*7c478bd9Sstevel@tonic-gate 
321*7c478bd9Sstevel@tonic-gate struct yppushresp_xfr {
322*7c478bd9Sstevel@tonic-gate 	unsigned long transid;
323*7c478bd9Sstevel@tonic-gate 	unsigned long status;
324*7c478bd9Sstevel@tonic-gate };
325*7c478bd9Sstevel@tonic-gate 
326*7c478bd9Sstevel@tonic-gate /* Status values for yppushresp_xfr.status */
327*7c478bd9Sstevel@tonic-gate 
328*7c478bd9Sstevel@tonic-gate #define YPPUSH_SUCC	((long)1)	/* Success */
329*7c478bd9Sstevel@tonic-gate #define YPPUSH_AGE	((long)2)	/* Master's version not newer */
330*7c478bd9Sstevel@tonic-gate #define YPPUSH_NOMAP 	((long)-1)	/* Can't find server for map */
331*7c478bd9Sstevel@tonic-gate #define YPPUSH_NODOM 	((long)-2)	/* Domain not supported */
332*7c478bd9Sstevel@tonic-gate #define YPPUSH_RSRC 	((long)-3)	/* Local resouce alloc failure */
333*7c478bd9Sstevel@tonic-gate #define YPPUSH_RPC 	((long)-4)	/* RPC failure talking to server */
334*7c478bd9Sstevel@tonic-gate #define YPPUSH_MADDR	((long)-5)	/* Can't get master address */
335*7c478bd9Sstevel@tonic-gate #define YPPUSH_YPERR 	((long)-6)	/* NIS server/map db error */
336*7c478bd9Sstevel@tonic-gate #define YPPUSH_BADARGS 	((long)-7)	/* Request arguments bad */
337*7c478bd9Sstevel@tonic-gate #define YPPUSH_DBM	((long)-8)	/* Local dbm operation failed */
338*7c478bd9Sstevel@tonic-gate #define YPPUSH_FILE	((long)-9)	/* Local file I/O operation failed */
339*7c478bd9Sstevel@tonic-gate #define YPPUSH_SKEW	((long)-10)	/* Map version skew during transfer */
340*7c478bd9Sstevel@tonic-gate #define YPPUSH_CLEAR	((long)-11)	/* Can't send "Clear" req to local
341*7c478bd9Sstevel@tonic-gate 					 *   ypserv */
342*7c478bd9Sstevel@tonic-gate #define YPPUSH_FORCE	((long)-12)	/* No local order number in map -
343*7c478bd9Sstevel@tonic-gate 					 *   use -f flag. */
344*7c478bd9Sstevel@tonic-gate #define YPPUSH_XFRERR	((long)-13)	/* ypxfr error */
345*7c478bd9Sstevel@tonic-gate #define YPPUSH_REFUSED	((long)-14)	/* Transfer request refused by ypserv */
346*7c478bd9Sstevel@tonic-gate 
347*7c478bd9Sstevel@tonic-gate 
348