xref: /freebsd/include/rpcsvc/nis_tags.h (revision d0b2dbfa)
1 /*-
2  * SPDX-License-Identifier: BSD-3-Clause
3  *
4  * Copyright (c) 2010, Oracle America, Inc.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are
8  * met:
9  *
10  *     * Redistributions of source code must retain the above copyright
11  *       notice, this list of conditions and the following disclaimer.
12  *     * Redistributions in binary form must reproduce the above
13  *       copyright notice, this list of conditions and the following
14  *       disclaimer in the documentation and/or other materials
15  *       provided with the distribution.
16  *     * Neither the name of the "Oracle America, Inc." nor the names of its
17  *       contributors may be used to endorse or promote products derived
18  *       from this software without specific prior written permission.
19  *
20  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23  *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24  *   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
25  *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
27  *   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29  *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30  *   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 /*
35  * Copyright (c) 1991, Sun Microsystems Inc.
36  */
37 
38 /*
39  *	nis_tags.h
40  *
41  *	This file contains the tags and statistics definitions. It is
42  *	automatically included by nis.h
43  */
44 
45 #ifndef	_RPCSVC_NIS_TAGS_H
46 #define	_RPCSVC_NIS_TAGS_H
47 
48 /* From: #pragma ident	"@(#)nis_tags.h	1.10	94/05/03 SMI" */
49 /* from file: zns_tags.h	1.7 Copyright (c) 1990 Sun Microsystems */
50 
51 #ifdef	__cplusplus
52 extern "C" {
53 #endif
54 
55 #ifndef ORIGINAL_DECLS
56 #define		NIS_DIR "data"
57 #endif
58 
59 /* Lookup and List function flags */
60 #define	FOLLOW_LINKS	(1<<0)	/* Follow link objects 			*/
61 #define	FOLLOW_PATH	(1<<1)	/* Follow the path in a table 		*/
62 #define	HARD_LOOKUP	(1<<2)	/* Block until successful 		*/
63 #define	ALL_RESULTS	(1<<3)	/* Retrieve all results 		*/
64 #define	NO_CACHE	(1<<4)	/* Do not return 'cached' results 	*/
65 #define	MASTER_ONLY	(1<<5)	/* Get value only from master server	*/
66 #define	EXPAND_NAME	(1<<6)	/* Expand partitially qualified names	*/
67 
68 /* Semantic modification for table operations flags */
69 #define	RETURN_RESULT	(1<<7)	/* Return resulting object to client    */
70 #define	ADD_OVERWRITE	(1<<8)	/* Allow overwrites on ADD		*/
71 #define	REM_MULTIPLE	(1<<9)	/* Allow wildcard deletes		*/
72 #define	MOD_SAMEOBJ	(1<<10)	/* Check modified object before write	*/
73 #define	ADD_RESERVED	(1<<11)	/* Spare ADD semantic			*/
74 #define	REM_RESERVED	(1<<12)	/* Spare REM semantic			*/
75 #ifdef ORIGINAL_DECLS
76 #define	MOD_RESERVED	(1<<13)	/* Spare MOD semantic			*/
77 #else
78 #define	MOD_EXCLUSIVE	(1<<13)	/* Modify no overwrite on modified keys	*/
79 #endif
80 
81 /* Transport specific modifications to the operation */
82 #define	USE_DGRAM	(1<<16) /* Use a datagram transport 		*/
83 #define	NO_AUTHINFO	(1<<17) /* Don't bother attaching auth info	*/
84 
85 /*
86  * Declarations for "standard" NIS+ tags
87  * State variable tags have values	0 - 2047
88  * Statistic tags have values		2048 - 65535
89  * User Tags have values		>2^16
90  */
91 #define	TAG_DEBUG	1	/* set debug level 		*/
92 #define	TAG_STATS	2	/* Enable/disable statistics 	*/
93 #define	TAG_GCACHE	3	/* Flush the Group Cache	*/
94 #ifndef ORIGINAL_DECLS
95 #define	TAG_GCACHE_ALL	TAG_GCACHE
96 #endif
97 #define	TAG_DCACHE	4	/* Flush the directory cache	*/
98 #ifndef ORIGINAL_DECLS
99 #define	TAG_DCACHE_ONE	TAG_DCACHE
100 #endif
101 #define	TAG_OCACHE	5	/* Flush the Object Cache	*/
102 #define	TAG_SECURE	6	/* Set the security level 	*/
103 #ifndef ORIGINAL_DECLS
104 #define	TAG_TCACHE_ONE	7	/* Flush the table cache	*/
105 #define	TAG_DCACHE_ALL	8	/* Flush entire directory cache */
106 #define TAG_TCACHE_ALL	9	/* Flush entire table cache	*/
107 #define	TAG_GCACHE_ONE	10	/* Flush one group object	*/
108 #define	TAG_DCACHE_ONE_REFRESH 11 /* Flush and refresh one DO	*/
109 #endif
110 
111 #define	TAG_OPSTATS	2048	/* NIS+ operations statistics   */
112 #define	TAG_THREADS	2049	/* Child process/thread status  */
113 #define	TAG_HEAP	2050	/* Heap usage statistics	*/
114 #define	TAG_UPDATES	2051	/* Updates to this service	*/
115 #define	TAG_VISIBLE	2052	/* First update that isn't replicated */
116 #define	TAG_S_DCACHE	2053	/* Directory cache statistics	*/
117 #define	TAG_S_OCACHE	2054	/* Object cache statistics	*/
118 #define	TAG_S_GCACHE	2055	/* Group cache statistics	*/
119 #define	TAG_S_STORAGE	2056	/* Group cache statistics	*/
120 #define	TAG_UPTIME	2057	/* Time that server has been up */
121 #ifndef ORIGINAL_DECLS
122 #define	TAG_DIRLIST	2058    /* Dir served by this server	*/
123 #define	TAG_NISCOMPAT	2059    /* Whether supports NIS compat mode */
124 #define	TAG_DNSFORWARDING 2060	/* Whether DNS forwarding supported*/
125 #define	TAG_SECURITY_LEVEL 2061 /* Security level of the server */
126 #define	TAG_ROOTSERVER	2062	/* Whether root server		*/
127 #endif
128 
129 /*
130  * Declarations for the Group object flags. Currently
131  * there are only 3.
132  */
133 #define	IMPMEM_GROUPS  1	/* Implicit Membership allowed 	*/
134 #define	RECURS_GROUPS  2	/* Recursive Groups allowed 	*/
135 #define	NEGMEM_GROUPS  4	/* Negative Groups allowed	*/
136 
137 #ifdef	__cplusplus
138 }
139 #endif
140 
141 #endif	/* _RPCSVC_NIS_TAGS_H */
142