xref: /titanic_50/usr/src/cmd/ypcmd/ypdefs.h (revision 3f7d54a6b84904c8f4d8daa4c7b577bede7df8b9)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
39 
40 #ifdef	__cplusplus
41 extern "C" {
42 #endif
43 
44 /*
45  * ypdefs.h
46  * Special, internal keys to NIS maps.  These keys are used
47  * by various maintain functions of the NIS and invisible
48  * to yp clients.  By definition, any key beginning with yp_prefix is
49  * an internal key.
50  */
51 
52 #define USE_YP_PREFIX \
53 	static char yp_prefix[] = "YP_"; \
54 	static int  yp_prefix_sz = sizeof (yp_prefix) - 1;
55 
56 #define USE_YP_MASTER_NAME \
57 	static char yp_master_name[] = "YP_MASTER_NAME"; \
58 	static int  yp_master_name_sz = sizeof (yp_master_name) - 1;
59 #define MAX_MASTER_NAME 256
60 
61 #define USE_YP_LAST_MODIFIED \
62 	static char yp_last_modified[] = "YP_LAST_MODIFIED"; \
63 	static int  yp_last_modified_sz = sizeof (yp_last_modified) - 1;
64 
65 #define MAX_ASCII_ORDER_NUMBER_LENGTH 10
66 
67 #define USE_YP_INPUT_FILE \
68 	static char yp_input_file[] = "YP_INPUT_FILE"; \
69 	static int  yp_input_file_sz = sizeof (yp_input_file) - 1;
70 
71 #define USE_YP_OUTPUT_NAME \
72 	static char yp_output_file[] = "YP_OUTPUT_NAME"; \
73 	static int  yp_output_file_sz = sizeof (yp_output_file) - 1;
74 
75 #define USE_YP_DOMAIN_NAME \
76 	static char yp_domain_name[] = "YP_DOMAIN_NAME"; \
77 	static int  yp_domain_name_sz = sizeof (yp_domain_name) - 1;
78 
79 #define USE_YP_SECURE \
80 	static char yp_secure[] = "YP_SECURE"; \
81 	static int  yp_secure_sz = sizeof (yp_secure) - 1;
82 
83 #define USE_YP_INTERDOMAIN \
84 	static char yp_interdomain[] = "YP_INTERDOMAIN"; \
85 	static int  yp_interdomain_sz = sizeof (yp_interdomain) - 1;
86 
87 /*
88  * Definitions of where the NIS servers keep their databases.
89  * These are really only implementation details.
90  */
91 
92 #define USE_YPDBPATH \
93 	static char ypdbpath[] = "/var/yp"; \
94 	static int  ypdbpath_sz = sizeof (ypdbpath) - 1;
95 
96 #define USE_DBM \
97 	static char dbm_dir[] = ".dir"; \
98 	static char dbm_pag[] = ".pag";
99 
100 #ifdef	__cplusplus
101 }
102 #endif
103 
104 #endif	/* __YPDEFS_H */
105