xref: /freebsd/include/rpcsvc/nis_tags.h (revision 5a1d14419a5b620430949a46cb6ee63148a43cb9)
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 file: zns_tags.h	1.7 Copyright (c) 1990 Sun Microsystems */
49  
50  #ifdef	__cplusplus
51  extern "C" {
52  #endif
53  
54  #ifndef ORIGINAL_DECLS
55  #define		NIS_DIR "data"
56  #endif
57  
58  /* Lookup and List function flags */
59  #define	FOLLOW_LINKS	(1<<0)	/* Follow link objects 			*/
60  #define	FOLLOW_PATH	(1<<1)	/* Follow the path in a table 		*/
61  #define	HARD_LOOKUP	(1<<2)	/* Block until successful 		*/
62  #define	ALL_RESULTS	(1<<3)	/* Retrieve all results 		*/
63  #define	NO_CACHE	(1<<4)	/* Do not return 'cached' results 	*/
64  #define	MASTER_ONLY	(1<<5)	/* Get value only from master server	*/
65  #define	EXPAND_NAME	(1<<6)	/* Expand partitially qualified names	*/
66  
67  /* Semantic modification for table operations flags */
68  #define	RETURN_RESULT	(1<<7)	/* Return resulting object to client    */
69  #define	ADD_OVERWRITE	(1<<8)	/* Allow overwrites on ADD		*/
70  #define	REM_MULTIPLE	(1<<9)	/* Allow wildcard deletes		*/
71  #define	MOD_SAMEOBJ	(1<<10)	/* Check modified object before write	*/
72  #define	ADD_RESERVED	(1<<11)	/* Spare ADD semantic			*/
73  #define	REM_RESERVED	(1<<12)	/* Spare REM semantic			*/
74  #ifdef ORIGINAL_DECLS
75  #define	MOD_RESERVED	(1<<13)	/* Spare MOD semantic			*/
76  #else
77  #define	MOD_EXCLUSIVE	(1<<13)	/* Modify no overwrite on modified keys	*/
78  #endif
79  
80  /* Transport specific modifications to the operation */
81  #define	USE_DGRAM	(1<<16) /* Use a datagram transport 		*/
82  #define	NO_AUTHINFO	(1<<17) /* Don't bother attaching auth info	*/
83  
84  /*
85   * Declarations for "standard" NIS+ tags
86   * State variable tags have values	0 - 2047
87   * Statistic tags have values		2048 - 65535
88   * User Tags have values		>2^16
89   */
90  #define	TAG_DEBUG	1	/* set debug level 		*/
91  #define	TAG_STATS	2	/* Enable/disable statistics 	*/
92  #define	TAG_GCACHE	3	/* Flush the Group Cache	*/
93  #ifndef ORIGINAL_DECLS
94  #define	TAG_GCACHE_ALL	TAG_GCACHE
95  #endif
96  #define	TAG_DCACHE	4	/* Flush the directory cache	*/
97  #ifndef ORIGINAL_DECLS
98  #define	TAG_DCACHE_ONE	TAG_DCACHE
99  #endif
100  #define	TAG_OCACHE	5	/* Flush the Object Cache	*/
101  #define	TAG_SECURE	6	/* Set the security level 	*/
102  #ifndef ORIGINAL_DECLS
103  #define	TAG_TCACHE_ONE	7	/* Flush the table cache	*/
104  #define	TAG_DCACHE_ALL	8	/* Flush entire directory cache */
105  #define TAG_TCACHE_ALL	9	/* Flush entire table cache	*/
106  #define	TAG_GCACHE_ONE	10	/* Flush one group object	*/
107  #define	TAG_DCACHE_ONE_REFRESH 11 /* Flush and refresh one DO	*/
108  #endif
109  
110  #define	TAG_OPSTATS	2048	/* NIS+ operations statistics   */
111  #define	TAG_THREADS	2049	/* Child process/thread status  */
112  #define	TAG_HEAP	2050	/* Heap usage statistics	*/
113  #define	TAG_UPDATES	2051	/* Updates to this service	*/
114  #define	TAG_VISIBLE	2052	/* First update that isn't replicated */
115  #define	TAG_S_DCACHE	2053	/* Directory cache statistics	*/
116  #define	TAG_S_OCACHE	2054	/* Object cache statistics	*/
117  #define	TAG_S_GCACHE	2055	/* Group cache statistics	*/
118  #define	TAG_S_STORAGE	2056	/* Group cache statistics	*/
119  #define	TAG_UPTIME	2057	/* Time that server has been up */
120  #ifndef ORIGINAL_DECLS
121  #define	TAG_DIRLIST	2058    /* Dir served by this server	*/
122  #define	TAG_NISCOMPAT	2059    /* Whether supports NIS compat mode */
123  #define	TAG_DNSFORWARDING 2060	/* Whether DNS forwarding supported*/
124  #define	TAG_SECURITY_LEVEL 2061 /* Security level of the server */
125  #define	TAG_ROOTSERVER	2062	/* Whether root server		*/
126  #endif
127  
128  /*
129   * Declarations for the Group object flags. Currently
130   * there are only 3.
131   */
132  #define	IMPMEM_GROUPS  1	/* Implicit Membership allowed 	*/
133  #define	RECURS_GROUPS  2	/* Recursive Groups allowed 	*/
134  #define	NEGMEM_GROUPS  4	/* Negative Groups allowed	*/
135  
136  #ifdef	__cplusplus
137  }
138  #endif
139  
140  #endif	/* _RPCSVC_NIS_TAGS_H */
141