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__
35 #define YPMAXRECORD 1024
36 #define YPMAXDOMAIN 64
53 typedef enum ypstat ypstat
;
55 extern "C" bool_t
xdr_ypstat(XDR
*, ypstat
*);
57 extern bool_t
xdr_ypstat(XDR
*, ypstat
*);
58 #else /* Old Style C */
60 #endif /* Old Style C */
81 typedef enum ypxfrstat ypxfrstat
;
83 extern "C" bool_t
xdr_ypxfrstat(XDR
*, ypxfrstat
*);
85 extern bool_t
xdr_ypxfrstat(XDR
*, ypxfrstat
*);
86 #else /* Old Style C */
87 bool_t
xdr_ypxfrstat();
88 #endif /* Old Style C */
91 typedef char *domainname
;
93 extern "C" bool_t
xdr_domainname(XDR
*, domainname
*);
95 extern bool_t
xdr_domainname(XDR
*, domainname
*);
96 #else /* Old Style C */
97 bool_t
xdr_domainname();
98 #endif /* Old Style C */
101 typedef char *mapname
;
103 extern "C" bool_t
xdr_mapname(XDR
*, mapname
*);
105 extern bool_t
xdr_mapname(XDR
*, mapname
*);
106 #else /* Old Style C */
107 bool_t
xdr_mapname();
108 #endif /* Old Style C */
111 typedef char *peername
;
113 extern "C" bool_t
xdr_peername(XDR
*, peername
*);
115 extern bool_t
xdr_peername(XDR
*, peername
*);
116 #else /* Old Style C */
117 bool_t
xdr_peername();
118 #endif /* Old Style C */
126 extern "C" bool_t
xdr_keydat(XDR
*, keydat
*);
128 extern bool_t
xdr_keydat(XDR
*, keydat
*);
129 #else /* Old Style C */
131 #endif /* Old Style C */
139 extern "C" bool_t
xdr_valdat(XDR
*, valdat
*);
141 extern bool_t
xdr_valdat(XDR
*, valdat
*);
142 #else /* Old Style C */
144 #endif /* Old Style C */
153 typedef struct ypmap_parms ypmap_parms
;
155 extern "C" bool_t
xdr_ypmap_parms(XDR
*, ypmap_parms
*);
157 extern bool_t
xdr_ypmap_parms(XDR
*, ypmap_parms
*);
158 #else /* Old Style C */
159 bool_t
xdr_ypmap_parms();
160 #endif /* Old Style C */
168 typedef struct ypreq_key ypreq_key
;
170 extern "C" bool_t
xdr_ypreq_key(XDR
*, ypreq_key
*);
172 extern bool_t
xdr_ypreq_key(XDR
*, ypreq_key
*);
173 #else /* Old Style C */
174 bool_t
xdr_ypreq_key();
175 #endif /* Old Style C */
182 typedef struct ypreq_nokey ypreq_nokey
;
184 extern "C" bool_t
xdr_ypreq_nokey(XDR
*, ypreq_nokey
*);
186 extern bool_t
xdr_ypreq_nokey(XDR
*, ypreq_nokey
*);
187 #else /* Old Style C */
188 bool_t
xdr_ypreq_nokey();
189 #endif /* Old Style C */
193 ypmap_parms map_parms
;
198 typedef struct ypreq_xfr ypreq_xfr
;
200 extern "C" bool_t
xdr_ypreq_xfr(XDR
*, ypreq_xfr
*);
202 extern bool_t
xdr_ypreq_xfr(XDR
*, ypreq_xfr
*);
203 #else /* Old Style C */
204 bool_t
xdr_ypreq_xfr();
205 #endif /* Old Style C */
212 typedef struct ypresp_val ypresp_val
;
214 extern "C" bool_t
xdr_ypresp_val(XDR
*, ypresp_val
*);
216 extern bool_t
xdr_ypresp_val(XDR
*, ypresp_val
*);
217 #else /* Old Style C */
218 bool_t
xdr_ypresp_val();
219 #endif /* Old Style C */
222 struct ypresp_key_val
{
224 #ifdef STUPID_SUN_BUG
225 /* This is the form as distributed by Sun. But even the Sun NIS
226 servers expect the values in the other order. So their
227 implementation somehow must change the order internally. We
228 don't want to follow this bad example since the user should be
229 able to use rpcgen on this file. */
237 typedef struct ypresp_key_val ypresp_key_val
;
239 extern "C" bool_t
xdr_ypresp_key_val(XDR
*, ypresp_key_val
*);
241 extern bool_t
xdr_ypresp_key_val(XDR
*, ypresp_key_val
*);
242 #else /* Old Style C */
243 bool_t
xdr_ypresp_key_val();
244 #endif /* Old Style C */
247 struct ypresp_master
{
251 typedef struct ypresp_master ypresp_master
;
253 extern "C" bool_t
xdr_ypresp_master(XDR
*, ypresp_master
*);
255 extern bool_t
xdr_ypresp_master(XDR
*, ypresp_master
*);
256 #else /* Old Style C */
257 bool_t
xdr_ypresp_master();
258 #endif /* Old Style C */
261 struct ypresp_order
{
265 typedef struct ypresp_order ypresp_order
;
267 extern "C" bool_t
xdr_ypresp_order(XDR
*, ypresp_order
*);
269 extern bool_t
xdr_ypresp_order(XDR
*, ypresp_order
*);
270 #else /* Old Style C */
271 bool_t
xdr_ypresp_order();
272 #endif /* Old Style C */
281 typedef struct ypresp_all ypresp_all
;
283 extern "C" bool_t
xdr_ypresp_all(XDR
*, ypresp_all
*);
285 extern bool_t
xdr_ypresp_all(XDR
*, ypresp_all
*);
286 #else /* Old Style C */
287 bool_t
xdr_ypresp_all();
288 #endif /* Old Style C */
295 typedef struct ypresp_xfr ypresp_xfr
;
297 extern "C" bool_t
xdr_ypresp_xfr(XDR
*, ypresp_xfr
*);
299 extern bool_t
xdr_ypresp_xfr(XDR
*, ypresp_xfr
*);
300 #else /* Old Style C */
301 bool_t
xdr_ypresp_xfr();
302 #endif /* Old Style C */
307 struct ypmaplist
*next
;
309 typedef struct ypmaplist ypmaplist
;
311 extern "C" bool_t
xdr_ypmaplist(XDR
*, ypmaplist
*);
313 extern bool_t
xdr_ypmaplist(XDR
*, ypmaplist
*);
314 #else /* Old Style C */
315 bool_t
xdr_ypmaplist();
316 #endif /* Old Style C */
319 struct ypresp_maplist
{
323 typedef struct ypresp_maplist ypresp_maplist
;
325 extern "C" bool_t
xdr_ypresp_maplist(XDR
*, ypresp_maplist
*);
327 extern bool_t
xdr_ypresp_maplist(XDR
*, ypresp_maplist
*);
328 #else /* Old Style C */
329 bool_t
xdr_ypresp_maplist();
330 #endif /* Old Style C */
349 YPPUSH_REFUSED
= -14,
351 typedef enum yppush_status yppush_status
;
353 extern "C" bool_t
xdr_yppush_status(XDR
*, yppush_status
*);
355 extern bool_t
xdr_yppush_status(XDR
*, yppush_status
*);
356 #else /* Old Style C */
357 bool_t
xdr_yppush_status();
358 #endif /* Old Style C */
361 struct yppushresp_xfr
{
363 yppush_status status
;
365 typedef struct yppushresp_xfr yppushresp_xfr
;
367 extern "C" bool_t
xdr_yppushresp_xfr(XDR
*, yppushresp_xfr
*);
369 extern bool_t
xdr_yppushresp_xfr(XDR
*, yppushresp_xfr
*);
370 #else /* Old Style C */
371 bool_t
xdr_yppushresp_xfr();
372 #endif /* Old Style C */
375 enum ypbind_resptype
{
379 typedef enum ypbind_resptype ypbind_resptype
;
381 extern "C" bool_t
xdr_ypbind_resptype(XDR
*, ypbind_resptype
*);
383 extern bool_t
xdr_ypbind_resptype(XDR
*, ypbind_resptype
*);
384 #else /* Old Style C */
385 bool_t
xdr_ypbind_resptype();
386 #endif /* Old Style C */
389 struct ypbind_binding
{
390 char ypbind_binding_addr
[4];
391 char ypbind_binding_port
[2];
393 typedef struct ypbind_binding ypbind_binding
;
395 extern "C" bool_t
xdr_ypbind_binding(XDR
*, ypbind_binding
*);
397 extern bool_t
xdr_ypbind_binding(XDR
*, ypbind_binding
*);
398 #else /* Old Style C */
399 bool_t
xdr_ypbind_binding();
400 #endif /* Old Style C */
404 ypbind_resptype ypbind_status
;
407 ypbind_binding ypbind_bindinfo
;
410 typedef struct ypbind_resp ypbind_resp
;
412 extern "C" bool_t
xdr_ypbind_resp(XDR
*, ypbind_resp
*);
414 extern bool_t
xdr_ypbind_resp(XDR
*, ypbind_resp
*);
415 #else /* Old Style C */
416 bool_t
xdr_ypbind_resp();
417 #endif /* Old Style C */
419 #define YPBIND_ERR_ERR 1
420 #define YPBIND_ERR_NOSERV 2
421 #define YPBIND_ERR_RESC 3
423 struct ypbind_setdom
{
424 domainname ypsetdom_domain
;
425 ypbind_binding ypsetdom_binding
;
428 typedef struct ypbind_setdom ypbind_setdom
;
430 extern "C" bool_t
xdr_ypbind_setdom(XDR
*, ypbind_setdom
*);
432 extern bool_t
xdr_ypbind_setdom(XDR
*, ypbind_setdom
*);
433 #else /* Old Style C */
434 bool_t
xdr_ypbind_setdom();
435 #endif /* Old Style C */
438 #define YPPROG ((u_long)100004)
439 #define YPVERS ((u_long)2)
442 #define YPPROC_NULL ((u_long)0)
443 extern "C" void * ypproc_null_2(void *, CLIENT
*);
444 extern "C" void * ypproc_null_2_svc(void *, struct svc_req
*);
445 #define YPPROC_DOMAIN ((u_long)1)
446 extern "C" bool_t
* ypproc_domain_2(domainname
*, CLIENT
*);
447 extern "C" bool_t
* ypproc_domain_2_svc(domainname
*, struct svc_req
*);
448 #define YPPROC_DOMAIN_NONACK ((u_long)2)
449 extern "C" bool_t
* ypproc_domain_nonack_2(domainname
*, CLIENT
*);
450 extern "C" bool_t
* ypproc_domain_nonack_2_svc(domainname
*, struct svc_req
*);
451 #define YPPROC_MATCH ((u_long)3)
452 extern "C" ypresp_val
* ypproc_match_2(ypreq_key
*, CLIENT
*);
453 extern "C" ypresp_val
* ypproc_match_2_svc(ypreq_key
*, struct svc_req
*);
454 #define YPPROC_FIRST ((u_long)4)
455 extern "C" ypresp_key_val
* ypproc_first_2(ypreq_key
*, CLIENT
*);
456 extern "C" ypresp_key_val
* ypproc_first_2_svc(ypreq_key
*, struct svc_req
*);
457 #define YPPROC_NEXT ((u_long)5)
458 extern "C" ypresp_key_val
* ypproc_next_2(ypreq_key
*, CLIENT
*);
459 extern "C" ypresp_key_val
* ypproc_next_2_svc(ypreq_key
*, struct svc_req
*);
460 #define YPPROC_XFR ((u_long)6)
461 extern "C" ypresp_xfr
* ypproc_xfr_2(ypreq_xfr
*, CLIENT
*);
462 extern "C" ypresp_xfr
* ypproc_xfr_2_svc(ypreq_xfr
*, struct svc_req
*);
463 #define YPPROC_CLEAR ((u_long)7)
464 extern "C" void * ypproc_clear_2(void *, CLIENT
*);
465 extern "C" void * ypproc_clear_2_svc(void *, struct svc_req
*);
466 #define YPPROC_ALL ((u_long)8)
467 extern "C" ypresp_all
* ypproc_all_2(ypreq_nokey
*, CLIENT
*);
468 extern "C" ypresp_all
* ypproc_all_2_svc(ypreq_nokey
*, struct svc_req
*);
469 #define YPPROC_MASTER ((u_long)9)
470 extern "C" ypresp_master
* ypproc_master_2(ypreq_nokey
*, CLIENT
*);
471 extern "C" ypresp_master
* ypproc_master_2_svc(ypreq_nokey
*, struct svc_req
*);
472 #define YPPROC_ORDER ((u_long)10)
473 extern "C" ypresp_order
* ypproc_order_2(ypreq_nokey
*, CLIENT
*);
474 extern "C" ypresp_order
* ypproc_order_2_svc(ypreq_nokey
*, struct svc_req
*);
475 #define YPPROC_MAPLIST ((u_long)11)
476 extern "C" ypresp_maplist
* ypproc_maplist_2(domainname
*, CLIENT
*);
477 extern "C" ypresp_maplist
* ypproc_maplist_2_svc(domainname
*, struct svc_req
*);
480 #define YPPROC_NULL ((u_long)0)
481 extern void * ypproc_null_2(void *, CLIENT
*);
482 extern void * ypproc_null_2_svc(void *, struct svc_req
*);
483 #define YPPROC_DOMAIN ((u_long)1)
484 extern bool_t
* ypproc_domain_2(domainname
*, CLIENT
*);
485 extern bool_t
* ypproc_domain_2_svc(domainname
*, struct svc_req
*);
486 #define YPPROC_DOMAIN_NONACK ((u_long)2)
487 extern bool_t
* ypproc_domain_nonack_2(domainname
*, CLIENT
*);
488 extern bool_t
* ypproc_domain_nonack_2_svc(domainname
*, struct svc_req
*);
489 #define YPPROC_MATCH ((u_long)3)
490 extern ypresp_val
* ypproc_match_2(ypreq_key
*, CLIENT
*);
491 extern ypresp_val
* ypproc_match_2_svc(ypreq_key
*, struct svc_req
*);
492 #define YPPROC_FIRST ((u_long)4)
493 extern ypresp_key_val
* ypproc_first_2(ypreq_key
*, CLIENT
*);
494 extern ypresp_key_val
* ypproc_first_2_svc(ypreq_key
*, struct svc_req
*);
495 #define YPPROC_NEXT ((u_long)5)
496 extern ypresp_key_val
* ypproc_next_2(ypreq_key
*, CLIENT
*);
497 extern ypresp_key_val
* ypproc_next_2_svc(ypreq_key
*, struct svc_req
*);
498 #define YPPROC_XFR ((u_long)6)
499 extern ypresp_xfr
* ypproc_xfr_2(ypreq_xfr
*, CLIENT
*);
500 extern ypresp_xfr
* ypproc_xfr_2_svc(ypreq_xfr
*, struct svc_req
*);
501 #define YPPROC_CLEAR ((u_long)7)
502 extern void * ypproc_clear_2(void *, CLIENT
*);
503 extern void * ypproc_clear_2_svc(void *, struct svc_req
*);
504 #define YPPROC_ALL ((u_long)8)
505 extern ypresp_all
* ypproc_all_2(ypreq_nokey
*, CLIENT
*);
506 extern ypresp_all
* ypproc_all_2_svc(ypreq_nokey
*, struct svc_req
*);
507 #define YPPROC_MASTER ((u_long)9)
508 extern ypresp_master
* ypproc_master_2(ypreq_nokey
*, CLIENT
*);
509 extern ypresp_master
* ypproc_master_2_svc(ypreq_nokey
*, struct svc_req
*);
510 #define YPPROC_ORDER ((u_long)10)
511 extern ypresp_order
* ypproc_order_2(ypreq_nokey
*, CLIENT
*);
512 extern ypresp_order
* ypproc_order_2_svc(ypreq_nokey
*, struct svc_req
*);
513 #define YPPROC_MAPLIST ((u_long)11)
514 extern ypresp_maplist
* ypproc_maplist_2(domainname
*, CLIENT
*);
515 extern ypresp_maplist
* ypproc_maplist_2_svc(domainname
*, struct svc_req
*);
517 #else /* Old Style C */
518 #define YPPROC_NULL ((u_long)0)
519 extern void * ypproc_null_2();
520 extern void * ypproc_null_2_svc();
521 #define YPPROC_DOMAIN ((u_long)1)
522 extern bool_t
* ypproc_domain_2();
523 extern bool_t
* ypproc_domain_2_svc();
524 #define YPPROC_DOMAIN_NONACK ((u_long)2)
525 extern bool_t
* ypproc_domain_nonack_2();
526 extern bool_t
* ypproc_domain_nonack_2_svc();
527 #define YPPROC_MATCH ((u_long)3)
528 extern ypresp_val
* ypproc_match_2();
529 extern ypresp_val
* ypproc_match_2_svc();
530 #define YPPROC_FIRST ((u_long)4)
531 extern ypresp_key_val
* ypproc_first_2();
532 extern ypresp_key_val
* ypproc_first_2_svc();
533 #define YPPROC_NEXT ((u_long)5)
534 extern ypresp_key_val
* ypproc_next_2();
535 extern ypresp_key_val
* ypproc_next_2_svc();
536 #define YPPROC_XFR ((u_long)6)
537 extern ypresp_xfr
* ypproc_xfr_2();
538 extern ypresp_xfr
* ypproc_xfr_2_svc();
539 #define YPPROC_CLEAR ((u_long)7)
540 extern void * ypproc_clear_2();
541 extern void * ypproc_clear_2_svc();
542 #define YPPROC_ALL ((u_long)8)
543 extern ypresp_all
* ypproc_all_2();
544 extern ypresp_all
* ypproc_all_2_svc();
545 #define YPPROC_MASTER ((u_long)9)
546 extern ypresp_master
* ypproc_master_2();
547 extern ypresp_master
* ypproc_master_2_svc();
548 #define YPPROC_ORDER ((u_long)10)
549 extern ypresp_order
* ypproc_order_2();
550 extern ypresp_order
* ypproc_order_2_svc();
551 #define YPPROC_MAPLIST ((u_long)11)
552 extern ypresp_maplist
* ypproc_maplist_2();
553 extern ypresp_maplist
* ypproc_maplist_2_svc();
554 #endif /* Old Style C */
556 #define YPPUSH_XFRRESPPROG ((u_long)0x40000000)
557 #define YPPUSH_XFRRESPVERS ((u_long)1)
560 #define YPPUSHPROC_NULL ((u_long)0)
561 extern "C" void * yppushproc_null_1(void *, CLIENT
*);
562 extern "C" void * yppushproc_null_1_svc(void *, struct svc_req
*);
563 #define YPPUSHPROC_XFRRESP ((u_long)1)
564 extern "C" void * yppushproc_xfrresp_1(yppushresp_xfr
*, CLIENT
*);
565 extern "C" void * yppushproc_xfrresp_1_svc(yppushresp_xfr
*, struct svc_req
*);
568 #define YPPUSHPROC_NULL ((u_long)0)
569 extern void * yppushproc_null_1(void *, CLIENT
*);
570 extern void * yppushproc_null_1_svc(void *, struct svc_req
*);
571 #define YPPUSHPROC_XFRRESP ((u_long)1)
572 extern void * yppushproc_xfrresp_1(yppushresp_xfr
*, CLIENT
*);
573 extern void * yppushproc_xfrresp_1_svc(yppushresp_xfr
*, struct svc_req
*);
575 #else /* Old Style C */
576 #define YPPUSHPROC_NULL ((u_long)0)
577 extern void * yppushproc_null_1();
578 extern void * yppushproc_null_1_svc();
579 #define YPPUSHPROC_XFRRESP ((u_long)1)
580 extern void * yppushproc_xfrresp_1();
581 extern void * yppushproc_xfrresp_1_svc();
582 #endif /* Old Style C */
584 #define YPBINDPROG ((u_long)100007)
585 #define YPBINDVERS ((u_long)2)
588 #define YPBINDPROC_NULL ((u_long)0)
589 extern "C" void * ypbindproc_null_2(void *, CLIENT
*);
590 extern "C" void * ypbindproc_null_2_svc(void *, struct svc_req
*);
591 #define YPBINDPROC_DOMAIN ((u_long)1)
592 extern "C" ypbind_resp
* ypbindproc_domain_2(domainname
*, CLIENT
*);
593 extern "C" ypbind_resp
* ypbindproc_domain_2_svc(domainname
*, struct svc_req
*);
594 #define YPBINDPROC_SETDOM ((u_long)2)
595 extern "C" void * ypbindproc_setdom_2(ypbind_setdom
*, CLIENT
*);
596 extern "C" void * ypbindproc_setdom_2_svc(ypbind_setdom
*, struct svc_req
*);
599 #define YPBINDPROC_NULL ((u_long)0)
600 extern void * ypbindproc_null_2(void *, CLIENT
*);
601 extern void * ypbindproc_null_2_svc(void *, struct svc_req
*);
602 #define YPBINDPROC_DOMAIN ((u_long)1)
603 extern ypbind_resp
* ypbindproc_domain_2(domainname
*, CLIENT
*);
604 extern ypbind_resp
* ypbindproc_domain_2_svc(domainname
*, struct svc_req
*);
605 #define YPBINDPROC_SETDOM ((u_long)2)
606 extern void * ypbindproc_setdom_2(ypbind_setdom
*, CLIENT
*);
607 extern void * ypbindproc_setdom_2_svc(ypbind_setdom
*, struct svc_req
*);
609 #else /* Old Style C */
610 #define YPBINDPROC_NULL ((u_long)0)
611 extern void * ypbindproc_null_2();
612 extern void * ypbindproc_null_2_svc();
613 #define YPBINDPROC_DOMAIN ((u_long)1)
614 extern ypbind_resp
* ypbindproc_domain_2();
615 extern ypbind_resp
* ypbindproc_domain_2_svc();
616 #define YPBINDPROC_SETDOM ((u_long)2)
617 extern void * ypbindproc_setdom_2();
618 extern void * ypbindproc_setdom_2_svc();
619 #endif /* Old Style C */
621 #endif /* !__RPCSVC_YP_H__ */