]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/stored_conf.h
Apply Preben 'Peppe' Guldberg <peppe@wielders.org>
[bacula/bacula] / bacula / src / stored / stored_conf.h
1 /*
2  * Resource codes -- they must be sequential for indexing
3  *
4  *   Version $Id$
5  */
6 /*
7    Copyright (C) 2000-2004 Kern Sibbald and John Walker
8
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.
13
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.
18
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,
22    MA 02111-1307, USA.
23
24  */
25
26 enum {
27    R_DIRECTOR = 3001,
28    R_STORAGE,
29    R_DEVICE,
30    R_MSGS,
31    R_FIRST = R_DIRECTOR,
32    R_LAST  = R_MSGS                   /* keep this updated */
33 };
34
35 enum {
36    R_NAME = 3020,
37    R_ADDRESS,
38    R_PASSWORD,
39    R_TYPE,
40    R_BACKUP
41 };
42
43
44 /* Definition of the contents of each Resource */
45 struct DIRRES {
46    RES   hdr;
47
48    char *password;                    /* Director password */
49    char *address;                     /* Director IP address or zero */
50    int enable_ssl;                    /* Use SSL with this Director */
51    int monitor;                       /* Have only access to status and .status functions */
52 };
53
54
55 /* Storage daemon "global" definitions */
56 struct s_res_store {
57    RES   hdr;
58
59    dlist *sdaddrs;
60    dlist *sddaddrs;
61    char *working_directory;           /* working directory for checkpoints */
62    char *pid_directory;
63    char *subsys_directory;
64    int require_ssl;                   /* Require SSL on all connections */
65    uint32_t max_concurrent_jobs;      /* maximum concurrent jobs to run */
66    MSGS *messages;                    /* Daemon message handler */
67    utime_t heartbeat_interval;        /* Interval to send hb to FD */
68 };
69 typedef struct s_res_store STORES;
70
71 /* Device specific definitions */
72 struct DEVRES {
73    RES   hdr;
74
75    char *media_type;                  /* User assigned media type */
76    char *device_name;                 /* Archive device name */
77    char *changer_name;                /* Changer device name */
78    char *changer_command;             /* Changer command  -- external program */
79    char *alert_command;               /* Alert command -- external program */
80    char *spool_directory;             /* Spool file directory */
81    uint32_t drive_index;              /* Autochanger drive index */
82    uint32_t cap_bits;                 /* Capabilities of this device */
83    uint32_t max_changer_wait;         /* Changer timeout */
84    uint32_t max_rewind_wait;          /* maximum secs to wait for rewind */
85    uint32_t max_open_wait;            /* maximum secs to wait for open */
86    uint32_t max_open_vols;            /* maximum simultaneous open volumes */
87    uint32_t min_block_size;           /* min block size */
88    uint32_t max_block_size;           /* max block size */
89    uint32_t max_volume_jobs;          /* max jobs to put on one volume */
90    uint32_t max_network_buffer_size;  /* max network buf size */
91    utime_t  vol_poll_interval;        /* interval between polling volume during mount */
92    int64_t max_volume_files;          /* max files to put on one volume */
93    int64_t max_volume_size;           /* max bytes to put on one volume */
94    int64_t max_file_size;             /* max file size in bytes */
95    int64_t volume_capacity;           /* advisory capacity */
96    int64_t max_spool_size;            /* Max spool size for all jobs */
97    int64_t max_job_spool_size;        /* Max spool size for any single job */
98    DEVICE *dev;                       /* Pointer to phyical dev -- set at runtime */
99 };
100
101 union URES {
102    DIRRES res_dir;
103    STORES res_store;
104    DEVRES res_dev;
105    MSGS   res_msgs;
106    RES    hdr;
107 };