2 * Resource codes -- they must be sequential for indexing
7 Copyright (C) 2000-2005 Kern Sibbald
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of
12 the License, or (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU General Public
20 License along with this program; if not, write to the Free
21 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
33 R_LAST = R_AUTOCHANGER /* keep this updated */
45 /* Definition of the contents of each Resource */
50 char *password; /* Director password */
51 char *address; /* Director IP address or zero */
52 int monitor; /* Have only access to status and .status functions */
54 int tls_enable; /* Enable TLS */
55 int tls_require; /* Require TLS */
56 int tls_verify_peer; /* TLS Verify Client Certificate */
57 char *tls_ca_certfile; /* TLS CA Certificate File */
58 char *tls_ca_certdir; /* TLS CA Certificate Directory */
59 char *tls_certfile; /* TLS Server Certificate File */
60 char *tls_keyfile; /* TLS Server Key File */
61 char *tls_dhfile; /* TLS Diffie-Hellman Parameters */
62 alist *tls_allowed_cns; /* TLS Allowed Clients */
64 TLS_CONTEXT *tls_ctx; /* Shared TLS Context */
69 /* Storage daemon "global" definitions */
76 char *working_directory; /* working directory for checkpoints */
78 char *subsys_directory;
79 char *scripts_directory;
80 uint32_t max_concurrent_jobs; /* maximum concurrent jobs to run */
81 MSGS *messages; /* Daemon message handler */
82 utime_t heartbeat_interval; /* Interval to send hb to FD */
84 int tls_enable; /* Enable TLS */
85 int tls_require; /* Require TLS */
86 int tls_verify_peer; /* TLS Verify Client Certificate */
87 char *tls_ca_certfile; /* TLS CA Certificate File */
88 char *tls_ca_certdir; /* TLS CA Certificate Directory */
89 char *tls_certfile; /* TLS Server Certificate File */
90 char *tls_keyfile; /* TLS Server Key File */
91 char *tls_dhfile; /* TLS Diffie-Hellman Parameters */
92 alist *tls_allowed_cns; /* TLS Allowed Clients */
94 TLS_CONTEXT *tls_ctx; /* Shared TLS Context */
97 typedef struct s_res_store STORES;
102 alist *device; /* List of DEVRES device pointers */
103 char *changer_name; /* Changer device name */
104 char *changer_command; /* Changer command -- external program */
105 pthread_mutex_t changer_mutex; /* One changer operation at a time */
108 /* Device specific definitions */
113 char *media_type; /* User assigned media type */
114 char *device_name; /* Archive device name */
115 char *changer_name; /* Changer device name */
116 char *changer_command; /* Changer command -- external program */
117 char *alert_command; /* Alert command -- external program */
118 char *spool_directory; /* Spool file directory */
119 int label_type; /* label type */
120 int autoselect; /* Automatically select from AutoChanger */
121 uint32_t drive_index; /* Autochanger drive index */
122 uint32_t cap_bits; /* Capabilities of this device */
123 uint32_t max_changer_wait; /* Changer timeout */
124 uint32_t max_rewind_wait; /* maximum secs to wait for rewind */
125 uint32_t max_open_wait; /* maximum secs to wait for open */
126 uint32_t max_open_vols; /* maximum simultaneous open volumes */
127 uint32_t min_block_size; /* min block size */
128 uint32_t max_block_size; /* max block size */
129 uint32_t max_volume_jobs; /* max jobs to put on one volume */
130 uint32_t max_network_buffer_size; /* max network buf size */
131 utime_t vol_poll_interval; /* interval between polling volume during mount */
132 int64_t max_volume_files; /* max files to put on one volume */
133 int64_t max_volume_size; /* max bytes to put on one volume */
134 int64_t max_file_size; /* max file size in bytes */
135 int64_t volume_capacity; /* advisory capacity */
136 int64_t max_spool_size; /* Max spool size for all jobs */
137 int64_t max_job_spool_size; /* Max spool size for any single job */
139 int64_t max_part_size; /* Max part size */
140 char *mount_point; /* Mount point for require mount devices */
141 char *mount_command; /* Mount command */
142 char *unmount_command; /* Unmount command */
143 char *write_part_command; /* Write part command */
144 char *free_space_command; /* Free space command */
146 /* The following are set at runtime */
147 DEVICE *dev; /* Pointer to phyical dev -- set at runtime */
148 AUTOCHANGER *changer_res; /* pointer to changer res if any */
157 AUTOCHANGER res_changer;