xref: /illumos-gate/usr/src/cmd/ypcmd/ypdefs.h (revision 86d949f9497332fe19be6b5d711d265eb957439f)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1990 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 /*
31  * Portions of this source code were derived from Berkeley 4.3 BSD
32  * under license from the Regents of the University of California.
33  */
34 
35 #ifndef	__YPDEFS_H
36 #define	__YPDEFS_H
37 
38 #ifdef	__cplusplus
39 extern "C" {
40 #endif
41 
42 /*
43  * ypdefs.h
44  * Special, internal keys to NIS maps.  These keys are used
45  * by various maintain functions of the NIS and invisible
46  * to yp clients.  By definition, any key beginning with yp_prefix is
47  * an internal key.
48  */
49 
50 #define USE_YP_PREFIX \
51 	static char yp_prefix[] = "YP_"; \
52 	static int  yp_prefix_sz = sizeof (yp_prefix) - 1;
53 
54 #define USE_YP_MASTER_NAME \
55 	static char yp_master_name[] = "YP_MASTER_NAME"; \
56 	static int  yp_master_name_sz = sizeof (yp_master_name) - 1;
57 #define MAX_MASTER_NAME 256
58 
59 #define USE_YP_LAST_MODIFIED \
60 	static char yp_last_modified[] = "YP_LAST_MODIFIED"; \
61 	static int  yp_last_modified_sz = sizeof (yp_last_modified) - 1;
62 
63 #define MAX_ASCII_ORDER_NUMBER_LENGTH 10
64 
65 #define USE_YP_INPUT_FILE \
66 	static char yp_input_file[] = "YP_INPUT_FILE"; \
67 	static int  yp_input_file_sz = sizeof (yp_input_file) - 1;
68 
69 #define USE_YP_OUTPUT_NAME \
70 	static char yp_output_file[] = "YP_OUTPUT_NAME"; \
71 	static int  yp_output_file_sz = sizeof (yp_output_file) - 1;
72 
73 #define USE_YP_DOMAIN_NAME \
74 	static char yp_domain_name[] = "YP_DOMAIN_NAME"; \
75 	static int  yp_domain_name_sz = sizeof (yp_domain_name) - 1;
76 
77 #define USE_YP_SECURE \
78 	static char yp_secure[] = "YP_SECURE"; \
79 	static int  yp_secure_sz = sizeof (yp_secure) - 1;
80 
81 #define USE_YP_INTERDOMAIN \
82 	static char yp_interdomain[] = "YP_INTERDOMAIN"; \
83 	static int  yp_interdomain_sz = sizeof (yp_interdomain) - 1;
84 
85 /*
86  * Definitions of where the NIS servers keep their databases.
87  * These are really only implementation details.
88  */
89 
90 #define USE_YPDBPATH \
91 	static char ypdbpath[] = "/var/yp"; \
92 	static int  ypdbpath_sz = sizeof (ypdbpath) - 1;
93 
94 #define USE_DBM \
95 	static char dbm_dir[] = ".dir"; \
96 	static char dbm_pag[] = ".pag";
97 
98 #ifdef	__cplusplus
99 }
100 #endif
101 
102 #endif	/* __YPDEFS_H */
103