]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/stored_conf.h
80c0f98a5841c596e3f239f5628ea20186646cbb
[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-2003 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 #define R_FIRST                       3001
27
28 #define R_DIRECTOR                    3001
29 #define R_STORAGE                     3002
30 #define R_DEVICE                      3003
31 #define R_MSGS                        3004
32
33 #define R_LAST                        R_MSGS
34
35
36 #define R_NAME                        3020
37 #define R_ADDRESS                     3021
38 #define R_PASSWORD                    3022
39 #define R_TYPE                        3023
40 #define R_BACKUP                      3024
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;                     /* deprecated */
57    char *SDaddr;                      /* bind address */
58    int   SDport;                      /* Where we listen for Directors */
59    int   SDDport;                     /* "Data" port where we listen for File daemons */
60    char *working_directory;           /* working directory for checkpoints */
61    char *pid_directory;
62    char *subsys_directory;
63    uint32_t max_concurrent_jobs;      /* maximum concurrent jobs to run */
64    struct s_res_msgs *messages;       /* Daemon message handler */
65 };
66 typedef struct s_res_store STORES;
67
68 /* Device specific definitions */
69 struct s_res_dev {
70    RES   hdr;
71
72    char *media_type;                  /* User assigned media type */
73    char *device_name;                 /* Archive device name */
74    char *changer_name;                /* Changer device name */
75    char *changer_command;             /* Changer command  -- external program */
76    int  cap_bits;                     /* Capabilities of this device */
77    uint32_t max_changer_wait;         /* Changer timeout */
78    uint32_t max_rewind_wait;          /* maximum secs to wait for rewind */
79    uint32_t max_open_wait;            /* maximum secs to wait for open */
80    uint32_t min_block_size;           /* min block size */
81    uint32_t max_block_size;           /* max block size */
82    uint32_t max_volume_jobs;          /* max jobs to put on one volume */
83    int64_t max_volume_files;          /* max files to put on one volume */
84    int64_t max_volume_size;           /* max bytes to put on one volume */
85    int64_t max_file_size;             /* max file size in bytes */
86    int64_t volume_capacity;           /* advisory capacity */
87    DEVICE *dev;                       /* Pointer to phyical dev -- set at runtime */
88 };
89 typedef struct s_res_dev DEVRES;
90
91 union u_res {
92    struct s_res_dir     res_dir;
93    struct s_res_store   res_store;
94    struct s_res_dev     res_dev;
95    struct s_res_msgs    res_msgs;
96    RES hdr;
97 };
98 typedef union u_res URES;