2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
3 * unrestricted use provided that this legend is included on all tape
4 * media and as a part of the software program in whole or part. Users
5 * may copy or modify Sun RPC without charge, but are not authorized
6 * to license or distribute it to anyone else except as part of a product or
7 * program developed by the user.
9 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
10 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
11 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
13 * Sun RPC is provided with no support and without any obligation on the
14 * part of Sun Microsystems, Inc. to assist in its use, correction,
15 * modification or enhancement.
17 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
18 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
19 * OR ANY PART THEREOF.
21 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
22 * or profits or other special, indirect and consequential damages, even if
23 * Sun has been advised of the possibility of such damages.
25 * Sun Microsystems, Inc.
27 * Mountain View, California 94043
30 #ifndef __RPCSVC_YP_H__
31 #define __RPCSVC_YP_H__
36 #define YPMAXRECORD 1024
37 #define YPMAXDOMAIN 64
54 typedef enum ypstat ypstat
;
74 typedef enum ypxfrstat ypxfrstat
;
76 typedef char *domainname
;
77 typedef char *mapname
;
78 typedef char *peername
;
96 typedef struct ypmap_parms ypmap_parms
;
103 typedef struct ypreq_key ypreq_key
;
109 typedef struct ypreq_nokey ypreq_nokey
;
112 ypmap_parms map_parms
;
117 typedef struct ypreq_xfr ypreq_xfr
;
123 typedef struct ypresp_val ypresp_val
;
125 struct ypresp_key_val
{
127 #ifdef STUPID_SUN_BUG
128 /* This is the form as distributed by Sun. But even the Sun NIS
129 servers expect the values in the other order. So their
130 implementation somehow must change the order internally. We
131 don't want to follow this bad example since the user should be
132 able to use rpcgen on this file. */
140 typedef struct ypresp_key_val ypresp_key_val
;
142 struct ypresp_master
{
146 typedef struct ypresp_master ypresp_master
;
148 struct ypresp_order
{
152 typedef struct ypresp_order ypresp_order
;
160 typedef struct ypresp_all ypresp_all
;
166 typedef struct ypresp_xfr ypresp_xfr
;
170 struct ypmaplist
*next
;
172 typedef struct ypmaplist ypmaplist
;
174 struct ypresp_maplist
{
178 typedef struct ypresp_maplist ypresp_maplist
;
196 YPPUSH_REFUSED
= -14,
198 typedef enum yppush_status yppush_status
;
200 struct yppushresp_xfr
{
202 yppush_status status
;
204 typedef struct yppushresp_xfr yppushresp_xfr
;
206 enum ypbind_resptype
{
210 typedef enum ypbind_resptype ypbind_resptype
;
212 struct ypbind_binding
{
213 char ypbind_binding_addr
[4];
214 char ypbind_binding_port
[2];
216 typedef struct ypbind_binding ypbind_binding
;
219 ypbind_resptype ypbind_status
;
222 ypbind_binding ypbind_bindinfo
;
225 typedef struct ypbind_resp ypbind_resp
;
227 #define YPBIND_ERR_ERR 1
228 #define YPBIND_ERR_NOSERV 2
229 #define YPBIND_ERR_RESC 3
231 struct ypbind_setdom
{
232 domainname ypsetdom_domain
;
233 ypbind_binding ypsetdom_binding
;
236 typedef struct ypbind_setdom ypbind_setdom
;
240 #define YPPROG 100004
243 #define YPPROC_NULL 0
244 extern void *ypproc_null_2 (void *, CLIENT
*);
245 extern void *ypproc_null_2_svc (void *, struct svc_req
*);
246 #define YPPROC_DOMAIN 1
247 extern bool_t
*ypproc_domain_2 (domainname
*, CLIENT
*);
248 extern bool_t
*ypproc_domain_2_svc (domainname
*, struct svc_req
*);
249 #define YPPROC_DOMAIN_NONACK 2
250 extern bool_t
*ypproc_domain_nonack_2 (domainname
*, CLIENT
*);
251 extern bool_t
*ypproc_domain_nonack_2_svc (domainname
*, struct svc_req
*);
252 #define YPPROC_MATCH 3
253 extern ypresp_val
*ypproc_match_2 (ypreq_key
*, CLIENT
*);
254 extern ypresp_val
*ypproc_match_2_svc (ypreq_key
*, struct svc_req
*);
255 #define YPPROC_FIRST 4
256 extern ypresp_key_val
*ypproc_first_2 (ypreq_key
*, CLIENT
*);
257 extern ypresp_key_val
*ypproc_first_2_svc (ypreq_key
*, struct svc_req
*);
258 #define YPPROC_NEXT 5
259 extern ypresp_key_val
*ypproc_next_2 (ypreq_key
*, CLIENT
*);
260 extern ypresp_key_val
*ypproc_next_2_svc (ypreq_key
*, struct svc_req
*);
262 extern ypresp_xfr
*ypproc_xfr_2 (ypreq_xfr
*, CLIENT
*);
263 extern ypresp_xfr
*ypproc_xfr_2_svc (ypreq_xfr
*, struct svc_req
*);
264 #define YPPROC_CLEAR 7
265 extern void *ypproc_clear_2 (void *, CLIENT
*);
266 extern void *ypproc_clear_2_svc (void *, struct svc_req
*);
268 extern ypresp_all
*ypproc_all_2 (ypreq_nokey
*, CLIENT
*);
269 extern ypresp_all
*ypproc_all_2_svc (ypreq_nokey
*, struct svc_req
*);
270 #define YPPROC_MASTER 9
271 extern ypresp_master
*ypproc_master_2 (ypreq_nokey
*, CLIENT
*);
272 extern ypresp_master
*ypproc_master_2_svc (ypreq_nokey
*, struct svc_req
*);
273 #define YPPROC_ORDER 10
274 extern ypresp_order
*ypproc_order_2 (ypreq_nokey
*, CLIENT
*);
275 extern ypresp_order
*ypproc_order_2_svc (ypreq_nokey
*, struct svc_req
*);
276 #define YPPROC_MAPLIST 11
277 extern ypresp_maplist
*ypproc_maplist_2 (domainname
*, CLIENT
*);
278 extern ypresp_maplist
*ypproc_maplist_2_svc (domainname
*, struct svc_req
*);
279 extern int ypprog_2_freeresult (SVCXPRT
*, xdrproc_t
, caddr_t
);
282 #define YPPUSH_XFRRESPPROG (0x40000000)
283 #define YPPUSH_XFRRESPVERS 1
285 #define YPPUSHPROC_NULL 0
286 extern void *yppushproc_null_1 (void *, CLIENT
*);
287 extern void *yppushproc_null_1_svc (void *, struct svc_req
*);
288 #define YPPUSHPROC_XFRRESP 1
289 extern void *yppushproc_xfrresp_1 (yppushresp_xfr
*, CLIENT
*);
290 extern void *yppushproc_xfrresp_1_svc (yppushresp_xfr
*, struct svc_req
*);
291 extern int yppush_xfrrespprog_1_freeresult (SVCXPRT
*, xdrproc_t
, caddr_t
);
294 #define YPBINDPROG 100007
297 #define YPBINDPROC_NULL 0
298 extern void *ypbindproc_null_2 (void *, CLIENT
*);
299 extern void *ypbindproc_null_2_svc (void *, struct svc_req
*);
300 #define YPBINDPROC_DOMAIN 1
301 extern ypbind_resp
*ypbindproc_domain_2 (domainname
*, CLIENT
*);
302 extern ypbind_resp
*ypbindproc_domain_2_svc (domainname
*, struct svc_req
*);
303 #define YPBINDPROC_SETDOM 2
304 extern void *ypbindproc_setdom_2 (ypbind_setdom
*, CLIENT
*);
305 extern void *ypbindproc_setdom_2_svc (ypbind_setdom
*, struct svc_req
*);
306 extern int ypbindprog_2_freeresult (SVCXPRT
*, xdrproc_t
, caddr_t
);
309 extern bool_t
xdr_ypstat (XDR
*, ypstat
*);
310 extern bool_t
xdr_ypxfrstat (XDR
*, ypxfrstat
*);
311 extern bool_t
xdr_domainname (XDR
*, domainname
*);
312 extern bool_t
xdr_mapname (XDR
*, mapname
*);
313 extern bool_t
xdr_peername (XDR
*, peername
*);
314 extern bool_t
xdr_keydat (XDR
*, keydat
*);
315 extern bool_t
xdr_valdat (XDR
*, valdat
*);
316 extern bool_t
xdr_ypmap_parms (XDR
*, ypmap_parms
*);
317 extern bool_t
xdr_ypreq_key (XDR
*, ypreq_key
*);
318 extern bool_t
xdr_ypreq_nokey (XDR
*, ypreq_nokey
*);
319 extern bool_t
xdr_ypreq_xfr (XDR
*, ypreq_xfr
*);
320 extern bool_t
xdr_ypresp_val (XDR
*, ypresp_val
*);
321 extern bool_t
xdr_ypresp_key_val (XDR
*, ypresp_key_val
*);
322 extern bool_t
xdr_ypresp_master (XDR
*, ypresp_master
*);
323 extern bool_t
xdr_ypresp_order (XDR
*, ypresp_order
*);
324 extern bool_t
xdr_ypresp_all (XDR
*, ypresp_all
*);
325 extern bool_t
xdr_ypresp_xfr (XDR
*, ypresp_xfr
*);
326 extern bool_t
xdr_ypmaplist (XDR
*, ypmaplist
*);
327 extern bool_t
xdr_ypresp_maplist (XDR
*, ypresp_maplist
*);
328 extern bool_t
xdr_yppush_status (XDR
*, yppush_status
*);
329 extern bool_t
xdr_yppushresp_xfr (XDR
*, yppushresp_xfr
*);
330 extern bool_t
xdr_ypbind_resptype (XDR
*, ypbind_resptype
*);
331 extern bool_t
xdr_ypbind_binding (XDR
*, ypbind_binding
*);
332 extern bool_t
xdr_ypbind_resp (XDR
*, ypbind_resp
*);
333 extern bool_t
xdr_ypbind_setdom (XDR
*, ypbind_setdom
*);
337 #endif /* !__RPCSVC_YP_H__ */