xref: /titanic_41/usr/src/cmd/ndmpd/include/ndmpd_prop.h (revision de81e71e031139a0a7f13b7bf64152c3faa76698)
1 /*
2  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 /*
7  * BSD 3 Clause License
8  *
9  * Copyright (c) 2007, The Storage Networking Industry Association.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 	- Redistributions of source code must retain the above copyright
15  *	  notice, this list of conditions and the following disclaimer.
16  *
17  * 	- Redistributions in binary form must reproduce the above copyright
18  *	  notice, this list of conditions and the following disclaimer in
19  *	  the documentation and/or other materials provided with the
20  *	  distribution.
21  *
22  *	- Neither the name of The Storage Networking Industry Association (SNIA)
23  *	  nor the names of its contributors may be used to endorse or promote
24  *	  products derived from this software without specific prior written
25  *	  permission.
26  *
27  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37  * POSSIBILITY OF SUCH DAMAGE.
38  */
39 #ifndef	_NDMPD_PROP_H
40 #define	_NDMPD_PROP_H
41 
42 #include <sys/types.h>
43 #include <libscf.h>
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 /* NDMP property parameter flags */
50 #define	NDMP_CF_NOTINIT		0x00	/* Not initialized yet */
51 #define	NDMP_CF_DEFINED		0x01	/* Defined/read from env */
52 #define	NDMP_CF_MODIFIED	0x02	/* Has been modified */
53 
54 typedef enum {
55 	NDMP_DAR_SUPPORT = 0,
56 	NDMP_MOVER_NIC,
57 	/*
58 	 * Force backing up the directories leading to
59 	 * a modified object for 'dump' format backup.
60 	 */
61 	NDMP_DUMP_PATHNODE_ENV,
62 	/*
63 	 * Force backing up the directories leading to
64 	 * a modified object for 'tar' format backup.
65 	 */
66 	NDMP_TAR_PATHNODE_ENV,
67 	/*
68 	 * Force to send the file history node entries
69 	 * along with the file history dir entries for
70 	 * all directories containing the changed files
71 	 * to the client for incremental backup.
72 	 *
73 	 * Note: This variable is added to support BakBone
74 	 * Software's NetVault DMA which expects to get the
75 	 * FH ADD NODES for all upper directories which
76 	 * contain the changed files in incremental backup
77 	 * along with the FH ADD DIRS.
78 	 */
79 	NDMP_FHIST_INCR_ENV,
80 	/* Ignore st_ctime when backing up. */
81 	NDMP_IGNCTIME_ENV,
82 	/* If we should check for the last modification time. */
83 	NDMP_INCLMTIME_ENV,
84 	/*
85 	 * Environment variable name for the maximum permitted
86 	 * token sequence for token-based backups.
87 	 */
88 	NDMP_MAXSEQ_ENV,
89 	/* Environment variable name for the active version. */
90 	NDMP_VERSION_ENV,
91 	/*
92 	 * Environment variable name for restore path.
93 	 * Suppose that a dircetroy named "/d1/d11" is backed
94 	 * up and there is a file "/d1/d11/d111/f" under that
95 	 * directory and  the restore path is "/d1/r1".
96 	 * If restore path mechanism is set to 0 which means
97 	 * partial path restore, then the result will be
98 	 * "/d1/r1/d111/f". If it is set to 1 which means full
99 	 * path restore, the result will be "/d1/r1/d1/d11/d111/f"
100 	 */
101 	NDMP_FULL_RESTORE_PATH,
102 	NDMP_DEBUG_PATH,
103 	NDMP_PLUGIN_PATH,
104 	NDMP_SOCKET_CSS,
105 	NDMP_SOCKET_CRS,
106 	NDMP_MOVER_RECSIZE,
107 	NDMP_RESTORE_WILDCARD_ENABLE,
108 	NDMP_CRAM_MD5_USERNAME,
109 	NDMP_CRAM_MD5_PASSWORD,
110 	NDMP_CLEARTEXT_USERNAME,
111 	NDMP_CLEARTEXT_PASSWORD,
112 	NDMP_TCP_PORT,
113 	NDMP_BACKUP_QTN,
114 	NDMP_RESTORE_QTN,
115 	NDMP_OVERWRITE_QTN,
116 	NDMP_MAXALL
117 } ndmpd_cfg_id_t;
118 
119 extern int ndmpd_load_prop(void);
120 extern char *ndmpd_get_prop(ndmpd_cfg_id_t);
121 extern char *ndmpd_get_prop_default(ndmpd_cfg_id_t, char *);
122 extern int ndmpd_get_prop_yorn(ndmpd_cfg_id_t);
123 
124 #ifdef	__cplusplus
125 }
126 #endif
127 
128 #endif /* _NDMPD_PROP_H */
129