2 * Please do not edit this file.
3 * It was generated using rpcgen.
16 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
17 * unrestricted use provided that this legend is included on all tape
18 * media and as a part of the software program in whole or part. Users
19 * may copy or modify Sun RPC without charge, but are not authorized
20 * to license or distribute it to anyone else except as part of a product or
21 * program developed by the user or with the express written consent of
22 * Sun Microsystems, Inc.
24 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
25 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
26 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
28 * Sun RPC is provided with no support and without any obligation on the
29 * part of Sun Microsystems, Inc. to assist in its use, correction,
30 * modification or enhancement.
32 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
33 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
34 * OR ANY PART THEREOF.
36 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
37 * or profits or other special, indirect and consequential damages, even if
38 * Sun has been advised of the possibility of such damages.
40 * Sun Microsystems, Inc.
42 * Mountain View, California 94043
44 * $FreeBSD: src/include/rpcsvc/nis.x,v 1.6 2003/05/04 02:51:42 obrien Exp $
45 * $DragonFly: src/include/rpcsvc/nis.x,v 1.2 2003/06/17 04:25:58 dillon Exp $
50 * This file is the main include file for NIS clients. It contains
51 * both the client library function defines and the various data
52 * structures used by the NIS service. It includes the file nis_tags.h
53 * which defines the tag values. This allows the tags to change without
54 * having to change the nis.x file.
56 * NOTE : DO NOT EDIT THIS FILE! It is automatically generated when
57 * rpcgen is run on the nis.x file. Note that there is a
58 * simple sed script to remove some unneeded lines. (See the
59 * Makefile target nis.h)
62 #include <rpcsvc/nis_tags.h>
65 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
66 * unrestricted use provided that this legend is included on all tape
67 * media and as a part of the software program in whole or part. Users
68 * may copy or modify Sun RPC without charge, but are not authorized
69 * to license or distribute it to anyone else except as part of a product or
70 * program developed by the user or with the express written consent of
71 * Sun Microsystems, Inc.
73 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
74 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
75 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
77 * Sun RPC is provided with no support and without any obligation on the
78 * part of Sun Microsystems, Inc. to assist in its use, correction,
79 * modification or enhancement.
81 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
82 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
83 * OR ANY PART THEREOF.
85 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
86 * or profits or other special, indirect and consequential damages, even if
87 * Sun has been advised of the possibility of such damages.
89 * Sun Microsystems, Inc.
91 * Mountain View, California 94043
93 * @(#)nis_object.x 1.10 94/05/03 SMI
94 * $DragonFly: src/include/rpcsvc/nis_object.x,v 1.2 2003/06/17 04:25:58 dillon Exp $
97 #ifndef __nis_object_h
98 #define __nis_object_h
100 #define NIS_MAXSTRINGLEN 255
101 #define NIS_MAXNAMELEN 1024
102 #define NIS_MAXATTRNAME 32
103 #define NIS_MAXATTRVAL 2048
104 #define NIS_MAXCOLUMNS 64
105 #define NIS_MAXATTR 16
106 #define NIS_MAXPATH 1024
107 #define NIS_MAXREPLICAS 128
108 #define NIS_MAXLINKS 16
109 #define NIS_PK_NONE 0
112 #define NIS_PK_KERB 3
121 typedef struct nis_attr nis_attr;
123 typedef char *nis_name;
135 typedef enum zotypes zotypes;
148 typedef enum nstype nstype;
154 typedef struct oar_mask oar_mask;
161 typedef struct endpoint endpoint;
172 typedef struct nis_server nis_server;
174 struct directory_obj {
178 u_int do_servers_len;
179 nis_server *do_servers_val;
184 oar_mask *do_armask_val;
187 typedef struct directory_obj directory_obj;
191 #define EN_MODIFIED 8
201 typedef struct entry_col entry_col;
207 entry_col *en_cols_val;
210 typedef struct entry_obj entry_obj;
215 u_int gr_members_len;
216 nis_name *gr_members_val;
219 typedef struct group_obj group_obj;
225 nis_attr *li_attrs_val;
229 typedef struct link_obj link_obj;
233 #define TA_SEARCHABLE 8
235 #define TA_MODIFIED 32
243 typedef struct table_col table_col;
251 table_col *ta_cols_val;
255 typedef struct table_obj table_obj;
260 struct directory_obj di_data;
261 struct group_obj gr_data;
262 struct table_obj ta_data;
263 struct entry_obj en_data;
264 struct link_obj li_data;
271 typedef struct objdata objdata;
277 typedef struct nis_oid nis_oid;
289 typedef struct nis_object nis_object;
291 #endif /* if __nis_object_h */
299 NIS_CACHEEXPIRED = 4,
300 NIS_NAMEUNREACHABLE = 5,
318 NIS_NOSUCHTABLE = 23,
319 NIS_TYPEMISMATCH = 24,
320 NIS_LINKNAMEERROR = 25,
322 NIS_TOOMANYATTRS = 27,
324 NIS_BADATTRIBUTE = 29,
325 NIS_NOTSEARCHABLE = 30,
333 NIS_COLDSTART_ERR = 38,
340 NIS_NOFILESPACE = 45,
344 typedef enum nis_error nis_error;
350 nis_object *objects_val;
358 typedef struct nis_result nis_result;
364 nis_object *ns_object_val;
367 typedef struct ns_request ns_request;
373 nis_attr *ibr_srch_val;
378 nis_object *ibr_obj_val;
381 u_int ibr_cbhost_len;
382 nis_server *ibr_cbhost_val;
387 typedef struct ib_request ib_request;
393 typedef struct ping_args ping_args;
406 typedef enum log_entry_t log_entry_t;
415 nis_attr *le_attrs_val;
417 nis_object le_object;
419 typedef struct log_entry log_entry;
425 u_int lr_entries_len;
426 log_entry *lr_entries_val;
429 typedef struct log_result log_result;
436 typedef struct cp_result cp_result;
442 typedef struct nis_tag nis_tag;
450 typedef struct nis_taglist nis_taglist;
457 nis_server *da_cbhost_val;
460 typedef struct dump_args dump_args;
466 typedef struct fd_args fd_args;
480 typedef struct fd_result fd_result;
482 * Generic "hash" datastructures, used by all types of hashed data.
484 struct nis_hash_data {
485 nis_name name; /* NIS name of hashed item */
486 int keychain; /* It's hash key (for pop) */
487 struct nis_hash_data *next; /* Hash collision pointer */
488 struct nis_hash_data *prv_item; /* A serial, doubly linked list */
489 struct nis_hash_data *nxt_item; /* of items in the hash table */
491 typedef struct nis_hash_data NIS_HASH_ITEM;
493 struct nis_hash_table {
494 NIS_HASH_ITEM *keys[64]; /* A hash table of items */
495 NIS_HASH_ITEM *first; /* The first "item" in serial list */
497 typedef struct nis_hash_table NIS_HASH_TABLE;
499 /* Structure for storing dynamically allocated static data */
501 void *buf; /* Memory allocation pointer */
502 u_long size; /* Buffer size */
505 /* Generic client creating flags */
510 /* Testing Access rights for objects */
512 #define NIS_READ_ACC 1
513 #define NIS_MODIFY_ACC 2
514 #define NIS_CREATE_ACC 4
515 #define NIS_DESTROY_ACC 8
516 /* Test macros. a == access rights, m == desired rights. */
517 #define WORLD(a, m) (((a) & (m)) != 0)
518 #define GROUP(a, m) (((a) & ((m) << 8)) != 0)
519 #define OWNER(a, m) (((a) & ((m) << 16)) != 0)
520 #define NOBODY(a, m) (((a) & ((m) << 24)) != 0)
522 #define OATYPE(d, n) (((d)->do_armask.do_armask_val+n)->oa_otype)
523 #define OARIGHTS(d, n) (((d)->do_armask.do_armask_val+n)->oa_rights)
524 #define WORLD_DEFAULT (NIS_READ_ACC)
525 #define GROUP_DEFAULT (NIS_READ_ACC << 8)
526 #define OWNER_DEFAULT ((NIS_READ_ACC + NIS_MODIFY_ACC + NIS_CREATE_ACC + NIS_DESTROY_ACC) << 16)
527 #define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT)
529 /* Result manipulation defines ... */
530 #define NIS_RES_NUMOBJ(x) ((x)->objects.objects_len)
531 #define NIS_RES_OBJECT(x) ((x)->objects.objects_val)
532 #define NIS_RES_COOKIE(x) ((x)->cookie)
533 #define NIS_RES_STATUS(x) ((x)->status)
535 /* These defines make getting at the variant part of the object easier. */
536 #define TA_data zo_data.objdata_u.ta_data
537 #define EN_data zo_data.objdata_u.en_data
538 #define DI_data zo_data.objdata_u.di_data
539 #define LI_data zo_data.objdata_u.li_data
540 #define GR_data zo_data.objdata_u.gr_data
542 #define __type_of(o) ((o)->zo_data.zo_type)
544 /* Declarations for the internal subroutines in nislib.c */
545 enum name_pos {SAME_NAME, HIGHER_NAME, LOWER_NAME, NOT_SEQUENTIAL, BAD_NAME};
546 typedef enum name_pos name_pos;
549 * Defines for getting at column data in entry objects. Because RPCGEN
550 * generates some rather wordy structures, we create some defines that
551 * collapse the needed keystrokes to access a particular value using
552 * these definitions they take an nis_object *, and an int and return
553 * a u_char * for Value, and an int for length.
555 #define ENTRY_VAL(obj, col) (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val
556 #define ENTRY_LEN(obj, col) (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len
562 /* Prototypes, and extern declarations for the NIS library functions. */
563 #include <rpcsvc/nislib.h>
564 #endif /* __NIS_RPCGEN_H */
570 * This file contains definitions that are only of interest to the actual
571 * service daemon and client stubs. Normal users of NIS will not include
574 * NOTE : This include file is automatically created by a combination
575 * of rpcgen and sed. DO NOT EDIT IT, change the nis.x file instead
576 * and then remake this file.
584 #define NIS_PROG ((unsigned long)(100300))
585 #define NIS_VERSION ((unsigned long)(3))
587 extern void nis_prog_3(struct svc_req *rqstp, SVCXPRT *transp);
588 #define NIS_LOOKUP ((unsigned long)(1))
589 extern nis_result * nis_lookup_3(ns_request *, CLIENT *);
590 extern nis_result * nis_lookup_3_svc(ns_request *, struct svc_req *);
591 #define NIS_ADD ((unsigned long)(2))
592 extern nis_result * nis_add_3(ns_request *, CLIENT *);
593 extern nis_result * nis_add_3_svc(ns_request *, struct svc_req *);
594 #define NIS_MODIFY ((unsigned long)(3))
595 extern nis_result * nis_modify_3(ns_request *, CLIENT *);
596 extern nis_result * nis_modify_3_svc(ns_request *, struct svc_req *);
597 #define NIS_REMOVE ((unsigned long)(4))
598 extern nis_result * nis_remove_3(ns_request *, CLIENT *);
599 extern nis_result * nis_remove_3_svc(ns_request *, struct svc_req *);
600 #define NIS_IBLIST ((unsigned long)(5))
601 extern nis_result * nis_iblist_3(ib_request *, CLIENT *);
602 extern nis_result * nis_iblist_3_svc(ib_request *, struct svc_req *);
603 #define NIS_IBADD ((unsigned long)(6))
604 extern nis_result * nis_ibadd_3(ib_request *, CLIENT *);
605 extern nis_result * nis_ibadd_3_svc(ib_request *, struct svc_req *);
606 #define NIS_IBMODIFY ((unsigned long)(7))
607 extern nis_result * nis_ibmodify_3(ib_request *, CLIENT *);
608 extern nis_result * nis_ibmodify_3_svc(ib_request *, struct svc_req *);
609 #define NIS_IBREMOVE ((unsigned long)(8))
610 extern nis_result * nis_ibremove_3(ib_request *, CLIENT *);
611 extern nis_result * nis_ibremove_3_svc(ib_request *, struct svc_req *);
612 #define NIS_IBFIRST ((unsigned long)(9))
613 extern nis_result * nis_ibfirst_3(ib_request *, CLIENT *);
614 extern nis_result * nis_ibfirst_3_svc(ib_request *, struct svc_req *);
615 #define NIS_IBNEXT ((unsigned long)(10))
616 extern nis_result * nis_ibnext_3(ib_request *, CLIENT *);
617 extern nis_result * nis_ibnext_3_svc(ib_request *, struct svc_req *);
618 #define NIS_FINDDIRECTORY ((unsigned long)(12))
619 extern fd_result * nis_finddirectory_3(fd_args *, CLIENT *);
620 extern fd_result * nis_finddirectory_3_svc(fd_args *, struct svc_req *);
621 #define NIS_STATUS ((unsigned long)(14))
622 extern nis_taglist * nis_status_3(nis_taglist *, CLIENT *);
623 extern nis_taglist * nis_status_3_svc(nis_taglist *, struct svc_req *);
624 #define NIS_DUMPLOG ((unsigned long)(15))
625 extern log_result * nis_dumplog_3(dump_args *, CLIENT *);
626 extern log_result * nis_dumplog_3_svc(dump_args *, struct svc_req *);
627 #define NIS_DUMP ((unsigned long)(16))
628 extern log_result * nis_dump_3(dump_args *, CLIENT *);
629 extern log_result * nis_dump_3_svc(dump_args *, struct svc_req *);
630 #define NIS_CALLBACK ((unsigned long)(17))
631 extern bool_t * nis_callback_3(netobj *, CLIENT *);
632 extern bool_t * nis_callback_3_svc(netobj *, struct svc_req *);
633 #define NIS_CPTIME ((unsigned long)(18))
634 extern u_long * nis_cptime_3(nis_name *, CLIENT *);
635 extern u_long * nis_cptime_3_svc(nis_name *, struct svc_req *);
636 #define NIS_CHECKPOINT ((unsigned long)(19))
637 extern cp_result * nis_checkpoint_3(nis_name *, CLIENT *);
638 extern cp_result * nis_checkpoint_3_svc(nis_name *, struct svc_req *);
639 #define NIS_PING ((unsigned long)(20))
640 extern void * nis_ping_3(ping_args *, CLIENT *);
641 extern void * nis_ping_3_svc(ping_args *, struct svc_req *);
642 #define NIS_SERVSTATE ((unsigned long)(21))
643 extern nis_taglist * nis_servstate_3(nis_taglist *, CLIENT *);
644 extern nis_taglist * nis_servstate_3_svc(nis_taglist *, struct svc_req *);
645 #define NIS_MKDIR ((unsigned long)(22))
646 extern nis_error * nis_mkdir_3(nis_name *, CLIENT *);
647 extern nis_error * nis_mkdir_3_svc(nis_name *, struct svc_req *);
648 #define NIS_RMDIR ((unsigned long)(23))
649 extern nis_error * nis_rmdir_3(nis_name *, CLIENT *);
650 extern nis_error * nis_rmdir_3_svc(nis_name *, struct svc_req *);
651 #define NIS_UPDKEYS ((unsigned long)(24))
652 extern nis_error * nis_updkeys_3(nis_name *, CLIENT *);
653 extern nis_error * nis_updkeys_3_svc(nis_name *, struct svc_req *);
654 extern int nis_prog_3_freeresult(SVCXPRT *, xdrproc_t, caddr_t);
656 /* the xdr functions */
657 extern bool_t xdr_nis_attr(XDR *, nis_attr*);
658 extern bool_t xdr_nis_name(XDR *, nis_name*);
659 extern bool_t xdr_zotypes(XDR *, zotypes*);
660 extern bool_t xdr_nstype(XDR *, nstype*);
661 extern bool_t xdr_oar_mask(XDR *, oar_mask*);
662 extern bool_t xdr_endpoint(XDR *, endpoint*);
663 extern bool_t xdr_nis_server(XDR *, nis_server*);
664 extern bool_t xdr_directory_obj(XDR *, directory_obj*);
665 extern bool_t xdr_entry_col(XDR *, entry_col*);
666 extern bool_t xdr_entry_obj(XDR *, entry_obj*);
667 extern bool_t xdr_group_obj(XDR *, group_obj*);
668 extern bool_t xdr_link_obj(XDR *, link_obj*);
669 extern bool_t xdr_table_col(XDR *, table_col*);
670 extern bool_t xdr_table_obj(XDR *, table_obj*);
671 extern bool_t xdr_objdata(XDR *, objdata*);
672 extern bool_t xdr_nis_oid(XDR *, nis_oid*);
673 extern bool_t xdr_nis_object(XDR *, nis_object*);
674 extern bool_t xdr_nis_error(XDR *, nis_error*);
675 extern bool_t xdr_nis_result(XDR *, nis_result*);
676 extern bool_t xdr_ns_request(XDR *, ns_request*);
677 extern bool_t xdr_ib_request(XDR *, ib_request*);
678 extern bool_t xdr_ping_args(XDR *, ping_args*);
679 extern bool_t xdr_log_entry_t(XDR *, log_entry_t*);
680 extern bool_t xdr_log_entry(XDR *, log_entry*);
681 extern bool_t xdr_log_result(XDR *, log_result*);
682 extern bool_t xdr_cp_result(XDR *, cp_result*);
683 extern bool_t xdr_nis_tag(XDR *, nis_tag*);
684 extern bool_t xdr_nis_taglist(XDR *, nis_taglist*);
685 extern bool_t xdr_dump_args(XDR *, dump_args*);
686 extern bool_t xdr_fd_args(XDR *, fd_args*);
687 extern bool_t xdr_fd_result(XDR *, fd_result*);
693 #endif /* !_NIS_H_RPCGEN */