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