xref: /onnv-gate/usr/src/lib/libbc/libc/yp/ypv1_prot.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate /*
23*0Sstevel@tonic-gate  * Copyright 1990 Sun Microsystems, Inc.  All rights reserved.
24*0Sstevel@tonic-gate  * Use is subject to license terms.
25*0Sstevel@tonic-gate  */
26*0Sstevel@tonic-gate 
27*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
28*0Sstevel@tonic-gate 
29*0Sstevel@tonic-gate /*
30*0Sstevel@tonic-gate  * This contains symbol and structure definitions used in supporting the old
31*0Sstevel@tonic-gate  * "v1" protocol.  They were previously defined in yp_prot.h.
32*0Sstevel@tonic-gate  *
33*0Sstevel@tonic-gate  * This file exists so that the NIS system can provide backward compatibility.
34*0Sstevel@tonic-gate  * Normal NIS client processes should not use this interface:  the old
35*0Sstevel@tonic-gate  * protocol will not be supported in the next release.
36*0Sstevel@tonic-gate  */
37*0Sstevel@tonic-gate #define YPOLDVERS		(YPVERS - 1)
38*0Sstevel@tonic-gate #define YPOLDPROC_NULL		((u_long)0)
39*0Sstevel@tonic-gate #define YPOLDPROC_DOMAIN	((u_long)1)
40*0Sstevel@tonic-gate #define YPOLDPROC_DOMAIN_NONACK	((u_long)2)
41*0Sstevel@tonic-gate #define YPOLDPROC_MATCH		((u_long)3)
42*0Sstevel@tonic-gate #define YPOLDPROC_FIRST		((u_long)4)
43*0Sstevel@tonic-gate #define YPOLDPROC_NEXT		((u_long)5)
44*0Sstevel@tonic-gate #define YPOLDPROC_POLL		((u_long)6)
45*0Sstevel@tonic-gate #define YPOLDPROC_PUSH		((u_long)7)
46*0Sstevel@tonic-gate #define YPOLDPROC_PULL		((u_long)8)
47*0Sstevel@tonic-gate #define YPOLDPROC_GET		((u_long)9)
48*0Sstevel@tonic-gate 
49*0Sstevel@tonic-gate enum ypreqtype {YPREQ_KEY = 1, YPREQ_NOKEY = 2, YPREQ_MAP_PARMS = 3};
50*0Sstevel@tonic-gate struct yprequest {
51*0Sstevel@tonic-gate 	enum ypreqtype yp_reqtype;
52*0Sstevel@tonic-gate 	union {
53*0Sstevel@tonic-gate 		struct ypreq_key yp_req_keytype;
54*0Sstevel@tonic-gate 		struct ypreq_nokey yp_req_nokeytype;
55*0Sstevel@tonic-gate 		struct ypmap_parms yp_req_map_parmstype;
56*0Sstevel@tonic-gate 	}yp_reqbody;
57*0Sstevel@tonic-gate };
58*0Sstevel@tonic-gate 
59*0Sstevel@tonic-gate #define YPMATCH_REQTYPE YPREQ_KEY
60*0Sstevel@tonic-gate #define ypmatch_req_domain yp_reqbody.yp_req_keytype.domain
61*0Sstevel@tonic-gate #define ypmatch_req_map yp_reqbody.yp_req_keytype.map
62*0Sstevel@tonic-gate #define ypmatch_req_keydat yp_reqbody.yp_req_keytype.keydat
63*0Sstevel@tonic-gate #define ypmatch_req_keyptr yp_reqbody.yp_req_keytype.keydat.dptr
64*0Sstevel@tonic-gate #define ypmatch_req_keysize yp_reqbody.yp_req_keytype.keydat.dsize
65*0Sstevel@tonic-gate 
66*0Sstevel@tonic-gate #define YPFIRST_REQTYPE YPREQ_NOKEY
67*0Sstevel@tonic-gate #define ypfirst_req_domain yp_reqbody.yp_req_nokeytype.domain
68*0Sstevel@tonic-gate #define ypfirst_req_map yp_reqbody.yp_req_nokeytype.map
69*0Sstevel@tonic-gate 
70*0Sstevel@tonic-gate #define YPNEXT_REQTYPE YPREQ_KEY
71*0Sstevel@tonic-gate #define ypnext_req_domain yp_reqbody.yp_req_keytype.domain
72*0Sstevel@tonic-gate #define ypnext_req_map yp_reqbody.yp_req_keytype.map
73*0Sstevel@tonic-gate #define ypnext_req_keydat yp_reqbody.yp_req_keytype.keydat
74*0Sstevel@tonic-gate #define ypnext_req_keyptr yp_reqbody.yp_req_keytype.keydat.dptr
75*0Sstevel@tonic-gate #define ypnext_req_keysize yp_reqbody.yp_req_keytype.keydat.dsize
76*0Sstevel@tonic-gate 
77*0Sstevel@tonic-gate #define YPPUSH_REQTYPE YPREQ_NOKEY
78*0Sstevel@tonic-gate #define yppush_req_domain yp_reqbody.yp_req_nokeytype.domain
79*0Sstevel@tonic-gate #define yppush_req_map yp_reqbody.yp_req_nokeytype.map
80*0Sstevel@tonic-gate 
81*0Sstevel@tonic-gate #define YPPULL_REQTYPE YPREQ_NOKEY
82*0Sstevel@tonic-gate #define yppull_req_domain yp_reqbody.yp_req_nokeytype.domain
83*0Sstevel@tonic-gate #define yppull_req_map yp_reqbody.yp_req_nokeytype.map
84*0Sstevel@tonic-gate 
85*0Sstevel@tonic-gate #define YPPOLL_REQTYPE YPREQ_NOKEY
86*0Sstevel@tonic-gate #define yppoll_req_domain yp_reqbody.yp_req_nokeytype.domain
87*0Sstevel@tonic-gate #define yppoll_req_map yp_reqbody.yp_req_nokeytype.map
88*0Sstevel@tonic-gate 
89*0Sstevel@tonic-gate #define YPGET_REQTYPE YPREQ_MAP_PARMS
90*0Sstevel@tonic-gate #define ypget_req_domain yp_reqbody.yp_req_map_parmstype.domain
91*0Sstevel@tonic-gate #define ypget_req_map yp_reqbody.yp_req_map_parmstype.map
92*0Sstevel@tonic-gate #define ypget_req_ordernum yp_reqbody.yp_req_map_parmstype.ordernum
93*0Sstevel@tonic-gate #define ypget_req_owner yp_reqbody.yp_req_map_parmstype.owner
94*0Sstevel@tonic-gate 
95*0Sstevel@tonic-gate enum ypresptype {YPRESP_VAL = 1, YPRESP_KEY_VAL = 2, YPRESP_MAP_PARMS = 3};
96*0Sstevel@tonic-gate struct ypresponse {
97*0Sstevel@tonic-gate 	enum ypresptype yp_resptype;
98*0Sstevel@tonic-gate 	union {
99*0Sstevel@tonic-gate 		struct ypresp_val yp_resp_valtype;
100*0Sstevel@tonic-gate 		struct ypresp_key_val yp_resp_key_valtype;
101*0Sstevel@tonic-gate 		struct ypmap_parms yp_resp_map_parmstype;
102*0Sstevel@tonic-gate 	} yp_respbody;
103*0Sstevel@tonic-gate };
104*0Sstevel@tonic-gate 
105*0Sstevel@tonic-gate #define YPMATCH_RESPTYPE YPRESP_VAL
106*0Sstevel@tonic-gate #define ypmatch_resp_status yp_respbody.yp_resp_valtype.status
107*0Sstevel@tonic-gate #define ypmatch_resp_valdat yp_respbody.yp_resp_valtype.valdat
108*0Sstevel@tonic-gate #define ypmatch_resp_valptr yp_respbody.yp_resp_valtype.valdat.dptr
109*0Sstevel@tonic-gate #define ypmatch_resp_valsize yp_respbody.yp_resp_valtype.valdat.dsize
110*0Sstevel@tonic-gate 
111*0Sstevel@tonic-gate #define YPFIRST_RESPTYPE YPRESP_KEY_VAL
112*0Sstevel@tonic-gate #define ypfirst_resp_status yp_respbody.yp_resp_key_valtype.status
113*0Sstevel@tonic-gate #define ypfirst_resp_keydat yp_respbody.yp_resp_key_valtype.keydat
114*0Sstevel@tonic-gate #define ypfirst_resp_keyptr yp_respbody.yp_resp_key_valtype.keydat.dptr
115*0Sstevel@tonic-gate #define ypfirst_resp_keysize yp_respbody.yp_resp_key_valtype.keydat.dsize
116*0Sstevel@tonic-gate #define ypfirst_resp_valdat yp_respbody.yp_resp_key_valtype.valdat
117*0Sstevel@tonic-gate #define ypfirst_resp_valptr yp_respbody.yp_resp_key_valtype.valdat.dptr
118*0Sstevel@tonic-gate #define ypfirst_resp_valsize yp_respbody.yp_resp_key_valtype.valdat.dsize
119*0Sstevel@tonic-gate 
120*0Sstevel@tonic-gate #define YPNEXT_RESPTYPE YPRESP_KEY_VAL
121*0Sstevel@tonic-gate #define ypnext_resp_status yp_respbody.yp_resp_key_valtype.status
122*0Sstevel@tonic-gate #define ypnext_resp_keydat yp_respbody.yp_resp_key_valtype.keydat
123*0Sstevel@tonic-gate #define ypnext_resp_keyptr yp_respbody.yp_resp_key_valtype.keydat.dptr
124*0Sstevel@tonic-gate #define ypnext_resp_keysize yp_respbody.yp_resp_key_valtype.keydat.dsize
125*0Sstevel@tonic-gate #define ypnext_resp_valdat yp_respbody.yp_resp_key_valtype.valdat
126*0Sstevel@tonic-gate #define ypnext_resp_valptr yp_respbody.yp_resp_key_valtype.valdat.dptr
127*0Sstevel@tonic-gate #define ypnext_resp_valsize yp_respbody.yp_resp_key_valtype.valdat.dsize
128*0Sstevel@tonic-gate 
129*0Sstevel@tonic-gate #define YPPOLL_RESPTYPE YPRESP_MAP_PARMS
130*0Sstevel@tonic-gate #define yppoll_resp_domain yp_respbody.yp_resp_map_parmstype.domain
131*0Sstevel@tonic-gate #define yppoll_resp_map yp_respbody.yp_resp_map_parmstype.map
132*0Sstevel@tonic-gate #define yppoll_resp_ordernum yp_respbody.yp_resp_map_parmstype.ordernum
133*0Sstevel@tonic-gate #define yppoll_resp_owner yp_respbody.yp_resp_map_parmstype.owner
134*0Sstevel@tonic-gate 
135*0Sstevel@tonic-gate 
136*0Sstevel@tonic-gate extern bool _xdr_yprequest();
137*0Sstevel@tonic-gate extern bool _xdr_ypresponse();
138*0Sstevel@tonic-gate 
139*0Sstevel@tonic-gate #define YPBINDOLDVERS 		(YPBINDVERS - 1)
140*0Sstevel@tonic-gate struct ypbind_oldsetdom {
141*0Sstevel@tonic-gate 	char ypoldsetdom_domain[YPMAXDOMAIN + 1];
142*0Sstevel@tonic-gate 	struct ypbind_binding ypoldsetdom_binding;
143*0Sstevel@tonic-gate };
144*0Sstevel@tonic-gate #define ypoldsetdom_addr ypoldsetdom_binding.ypbind_binding_addr
145*0Sstevel@tonic-gate #define ypoldsetdom_port ypoldsetdom_binding.ypbind_binding_port
146*0Sstevel@tonic-gate 
147*0Sstevel@tonic-gate extern bool _xdr_ypbind_oldsetdom();
148