summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ndmpd/include/ndmpd_prop.h
blob: e486b3086f2f3ef488aab18dabf0beb03e5f4b55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*
 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
 */

/*
 * BSD 3 Clause License
 *
 * Copyright (c) 2007, The Storage Networking Industry Association.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 	- Redistributions of source code must retain the above copyright
 *	  notice, this list of conditions and the following disclaimer.
 *
 * 	- Redistributions in binary form must reproduce the above copyright
 *	  notice, this list of conditions and the following disclaimer in
 *	  the documentation and/or other materials provided with the
 *	  distribution.
 *
 *	- Neither the name of The Storage Networking Industry Association (SNIA)
 *	  nor the names of its contributors may be used to endorse or promote
 *	  products derived from this software without specific prior written
 *	  permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
#ifndef	_NDMPD_PROP_H
#define	_NDMPD_PROP_H

#include <sys/types.h>
#include <libscf.h>

#ifdef __cplusplus
extern "C" {
#endif

/* NDMP property parameter flags */
#define	NDMP_CF_NOTINIT		0x00	/* Not initialized yet */
#define	NDMP_CF_DEFINED		0x01	/* Defined/read from env */
#define	NDMP_CF_MODIFIED	0x02	/* Has been modified */

typedef enum {
	NDMP_DAR_SUPPORT = 0,
	NDMP_MOVER_NIC,
	/*
	 * Force backing up the directories leading to
	 * a modified object for 'dump' format backup.
	 */
	NDMP_DUMP_PATHNODE_ENV,
	/*
	 * Force backing up the directories leading to
	 * a modified object for 'tar' format backup.
	 */
	NDMP_TAR_PATHNODE_ENV,
	/*
	 * Force to send the file history node entries
	 * along with the file history dir entries for
	 * all directories containing the changed files
	 * to the client for incremental backup.
	 *
	 * Note: This variable is added to support BakBone
	 * Software's NetVault DMA which expects to get the
	 * FH ADD NODES for all upper directories which
	 * contain the changed files in incremental backup
	 * along with the FH ADD DIRS.
	 */
	NDMP_FHIST_INCR_ENV,
	/* Ignore st_ctime when backing up. */
	NDMP_IGNCTIME_ENV,
	/* If we should check for the last modification time. */
	NDMP_INCLMTIME_ENV,
	/*
	 * Environment variable name for the maximum permitted
	 * token sequence for token-based backups.
	 */
	NDMP_MAXSEQ_ENV,
	/* Environment variable name for the active version. */
	NDMP_VERSION_ENV,
	/*
	 * Environment variable name for restore path.
	 * Suppose that a dircetroy named "/d1/d11" is backed
	 * up and there is a file "/d1/d11/d111/f" under that
	 * directory and  the restore path is "/d1/r1".
	 * If restore path mechanism is set to 0 which means
	 * partial path restore, then the result will be
	 * "/d1/r1/d111/f". If it is set to 1 which means full
	 * path restore, the result will be "/d1/r1/d1/d11/d111/f"
	 */
	NDMP_FULL_RESTORE_PATH,
	NDMP_DEBUG_PATH,
	NDMP_PLUGIN_PATH,
	NDMP_SOCKET_CSS,
	NDMP_SOCKET_CRS,
	NDMP_MOVER_RECSIZE,
	NDMP_RESTORE_WILDCARD_ENABLE,
	NDMP_CRAM_MD5_USERNAME,
	NDMP_CRAM_MD5_PASSWORD,
	NDMP_CLEARTEXT_USERNAME,
	NDMP_CLEARTEXT_PASSWORD,
	NDMP_TCP_PORT,
	NDMP_BACKUP_QTN,
	NDMP_RESTORE_QTN,
	NDMP_OVERWRITE_QTN,
	NDMP_ZFS_FORCE_OVERRIDE,
	NDMP_DRIVE_TYPE,
	NDMP_DEBUG_MODE,
	NDMP_MAXALL
} ndmpd_cfg_id_t;

extern int ndmpd_load_prop(void);
extern char *ndmpd_get_prop(ndmpd_cfg_id_t);
extern char *ndmpd_get_prop_default(ndmpd_cfg_id_t, char *);
extern int ndmpd_get_prop_yorn(ndmpd_cfg_id_t);

#ifdef	__cplusplus
}
#endif

#endif /* _NDMPD_PROP_H */