xref: /titanic_52/usr/src/cmd/ypcmd/ypv1_prot.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
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 1990 Sun Microsystems, Inc.
24  */
25 
26 #ifndef	__YPV1_PROT_H
27 #define	__YPV1_PROT_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 /*
36  * This contains symbol and structure definitions used in supporting the old
37  * "v1" protocol.  They were previously defined in yp_prot.h.
38  *
39  * This file exists so that the NIS system can provide backward compatibility.
40  * Normal NIS client processes should not use this interface:  the old
41  * protocol will not be supported in the next release.
42  */
43 #define YPOLDVERS		(YPVERS - 1)
44 #define YPOLDPROC_NULL		((u_long)0)
45 #define YPOLDPROC_DOMAIN	((u_long)1)
46 #define YPOLDPROC_DOMAIN_NONACK	((u_long)2)
47 #define YPOLDPROC_MATCH		((u_long)3)
48 #define YPOLDPROC_FIRST		((u_long)4)
49 #define YPOLDPROC_NEXT		((u_long)5)
50 #define YPOLDPROC_POLL		((u_long)6)
51 #define YPOLDPROC_PUSH		((u_long)7)
52 #define YPOLDPROC_PULL		((u_long)8)
53 #define YPOLDPROC_GET		((u_long)9)
54 
55 #define YPMATCH_REQTYPE YPREQ_KEY
56 #define ypmatch_req_domain yp_reqbody.yp_req_keytype.domain
57 #define ypmatch_req_map yp_reqbody.yp_req_keytype.map
58 #define ypmatch_req_keydat yp_reqbody.yp_req_keytype.keydat
59 #define ypmatch_req_keyptr yp_reqbody.yp_req_keytype.keydat.dptr
60 #define ypmatch_req_keysize yp_reqbody.yp_req_keytype.keydat.dsize
61 
62 #define YPFIRST_REQTYPE YPREQ_NOKEY
63 #define ypfirst_req_domain yp_reqbody.yp_req_nokeytype.domain
64 #define ypfirst_req_map yp_reqbody.yp_req_nokeytype.map
65 
66 #define YPNEXT_REQTYPE YPREQ_KEY
67 #define ypnext_req_domain yp_reqbody.yp_req_keytype.domain
68 #define ypnext_req_map yp_reqbody.yp_req_keytype.map
69 #define ypnext_req_keydat yp_reqbody.yp_req_keytype.keydat
70 #define ypnext_req_keyptr yp_reqbody.yp_req_keytype.keydat.dptr
71 #define ypnext_req_keysize yp_reqbody.yp_req_keytype.keydat.dsize
72 
73 #define YPPUSH_REQTYPE YPREQ_NOKEY
74 #define yppush_req_domain yp_reqbody.yp_req_nokeytype.domain
75 #define yppush_req_map yp_reqbody.yp_req_nokeytype.map
76 
77 #define YPPULL_REQTYPE YPREQ_NOKEY
78 #define yppull_req_domain yp_reqbody.yp_req_nokeytype.domain
79 #define yppull_req_map yp_reqbody.yp_req_nokeytype.map
80 
81 #define YPPOLL_REQTYPE YPREQ_NOKEY
82 #define yppoll_req_domain yp_reqbody.yp_req_nokeytype.domain
83 #define yppoll_req_map yp_reqbody.yp_req_nokeytype.map
84 
85 #define YPGET_REQTYPE YPREQ_MAP_PARMS
86 #define ypget_req_domain yp_reqbody.yp_req_map_parmstype.domain
87 #define ypget_req_map yp_reqbody.yp_req_map_parmstype.map
88 #define ypget_req_ordernum yp_reqbody.yp_req_map_parmstype.ordernum
89 #define ypget_req_owner yp_reqbody.yp_req_map_parmstype.owner
90 
91 #define YPMATCH_RESPTYPE YPRESP_VAL
92 #define ypmatch_resp_status yp_respbody.yp_resp_valtype.status
93 #define ypmatch_resp_valdat yp_respbody.yp_resp_valtype.valdat
94 #define ypmatch_resp_valptr yp_respbody.yp_resp_valtype.valdat.dptr
95 #define ypmatch_resp_valsize yp_respbody.yp_resp_valtype.valdat.dsize
96 
97 #define YPFIRST_RESPTYPE YPRESP_KEY_VAL
98 #define ypfirst_resp_status yp_respbody.yp_resp_key_valtype.status
99 #define ypfirst_resp_keydat yp_respbody.yp_resp_key_valtype.keydat
100 #define ypfirst_resp_keyptr yp_respbody.yp_resp_key_valtype.keydat.dptr
101 #define ypfirst_resp_keysize yp_respbody.yp_resp_key_valtype.keydat.dsize
102 #define ypfirst_resp_valdat yp_respbody.yp_resp_key_valtype.valdat
103 #define ypfirst_resp_valptr yp_respbody.yp_resp_key_valtype.valdat.dptr
104 #define ypfirst_resp_valsize yp_respbody.yp_resp_key_valtype.valdat.dsize
105 
106 #define YPNEXT_RESPTYPE YPRESP_KEY_VAL
107 #define ypnext_resp_status yp_respbody.yp_resp_key_valtype.status
108 #define ypnext_resp_keydat yp_respbody.yp_resp_key_valtype.keydat
109 #define ypnext_resp_keyptr yp_respbody.yp_resp_key_valtype.keydat.dptr
110 #define ypnext_resp_keysize yp_respbody.yp_resp_key_valtype.keydat.dsize
111 #define ypnext_resp_valdat yp_respbody.yp_resp_key_valtype.valdat
112 #define ypnext_resp_valptr yp_respbody.yp_resp_key_valtype.valdat.dptr
113 #define ypnext_resp_valsize yp_respbody.yp_resp_key_valtype.valdat.dsize
114 
115 #define YPPOLL_RESPTYPE YPRESP_MAP_PARMS
116 #define yppoll_resp_domain yp_respbody.yp_resp_map_parmstype.domain
117 #define yppoll_resp_map yp_respbody.yp_resp_map_parmstype.map
118 #define yppoll_resp_ordernum yp_respbody.yp_resp_map_parmstype.ordernum
119 #define yppoll_resp_owner yp_respbody.yp_resp_map_parmstype.owner
120 
121 
122 extern bool _xdr_yprequest();
123 extern bool _xdr_ypresponse();
124 
125 /* XXX - excess baggage? - georgn */
126 #if 0
127 #define YPBINDOLDVERS 		(YPBINDVERS - 1)
128 struct ypbind_oldsetdom {
129     char ypoldsetdom_domain[YPMAXDOMAIN + 1];
130     struct ypbind_binding {
131 	opaque ypbind_binding_addr[4]; /* In network order */
132 	opaque ypbind_binding_port[2]; /* In network order */
133     } ypoldsetdom_binding;
134 };
135 #define ypoldsetdom_addr ypoldsetdom_binding.ypbind_binding_addr
136 #define ypoldsetdom_port ypoldsetdom_binding.ypbind_binding_port
137 #endif
138 
139 extern bool _xdr_ypbind_oldsetdom();
140 
141 #ifdef	__cplusplus
142 }
143 #endif
144 
145 #endif	/* __YPV1_PROT_H */
146