]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/stored_conf.h
7855a392b10b83f65d6313b161c94c9fb9f0e9d7
[bacula/bacula] / bacula / src / stored / stored_conf.h
1 /*
2  * Resource codes -- they must be sequential for indexing   
3  */
4 /*
5    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
6
7    This program is free software; you can redistribute it and/or
8    modify it under the terms of the GNU General Public License as
9    published by the Free Software Foundation; either version 2 of
10    the License, or (at your option) any later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15    General Public License for more details.
16
17    You should have received a copy of the GNU General Public
18    License along with this program; if not, write to the Free
19    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
20    MA 02111-1307, USA.
21
22  */
23
24 #define R_FIRST                       3001
25
26 #define R_DIRECTOR                    3001
27 #define R_STORAGE                     3002
28 #define R_DEVICE                      3003
29 #define R_MSGS                        3004
30
31 #define R_LAST                        R_MSGS
32
33
34 #define R_NAME                        3020
35 #define R_ADDRESS                     3021
36 #define R_PASSWORD                    3022
37 #define R_TYPE                        3023
38 #define R_BACKUP                      3024
39
40 #define STORAGE_DAEMON 1
41
42 /* Definition of the contents of each Resource */
43 struct s_res_dir {
44    RES   hdr;
45
46    char *password;                    /* Director password */
47    char *address;                     /* Director IP address or zero */
48 };
49 typedef struct s_res_dir DIRRES;
50
51
52 /* Storage daemon "global" definitions */
53 struct s_res_store {
54    RES   hdr;
55
56    char *address;
57    int   SDport;                      /* Where we listen for Directors */
58    int   SDDport;                     /* "Data" port where we listen for File daemons */
59    char *working_directory;           /* working directory for checkpoints */
60    char *pid_directory;
61    char *subsys_directory;
62    uint32_t max_concurrent_jobs;      /* maximum concurrent jobs to run */
63 };
64 typedef struct s_res_store STORES;
65
66 /* Device specific definitions */
67 struct s_res_dev {
68    RES   hdr;
69
70    char *media_type;
71    char *device_name;
72    int  cap_bits;
73    uint32_t max_rewind_wait;          /* maximum secs to wait for rewind */
74    uint32_t min_block_size;           /* min block size */
75    uint32_t max_block_size;           /* max block size */
76    uint32_t max_volume_jobs;          /* max jobs to put on one volume */
77    int64_t max_volume_files;          /* max files to put on one volume */
78    int64_t max_volume_size;           /* max bytes to put on one volume */
79    int64_t max_file_size;             /* max file size in bytes */
80    int64_t volume_capacity;           /* advisory capacity */
81    DEVICE *dev;
82 };
83 typedef struct s_res_dev DEVRES;
84
85 union u_res {
86    struct s_res_dir     res_dir;
87    struct s_res_store   res_store;
88    struct s_res_dev     res_dev;
89    struct s_res_msgs    res_msgs;
90    RES hdr;
91 };
92 typedef union u_res URES;