]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/console/console_conf.h
Big backport from Enterprise
[bacula/bacula] / bacula / src / console / console_conf.h
1 /*
2    Bacula(R) - The Network Backup Solution
3
4    Copyright (C) 2000-2017 Kern Sibbald
5
6    The original author of Bacula is Kern Sibbald, with contributions
7    from many others, a complete list can be found in the file AUTHORS.
8
9    You may use this file and others of this release according to the
10    license defined in the LICENSE file, which includes the Affero General
11    Public License, v3.0 ("AGPLv3") and some additional permissions and
12    terms pursuant to its AGPLv3 Section 7.
13
14    This notice must be preserved when any source code is 
15    conveyed and/or propagated.
16
17    Bacula(R) is a registered trademark of Kern Sibbald.
18 */
19 /*
20  * Bacula User Agent specific configuration and defines
21  *
22  *     Kern Sibbald, Sep MM
23  */
24 /*
25  * Bacula User Agent specific configuration and defines
26  *
27  *     Kern Sibbald, Sep MM
28  *
29  */
30
31 /*
32  * Resource codes -- they must be sequential for indexing
33  */
34
35 bool parse_cons_config(CONFIG *config, const char *configfile, int exit_code);
36
37 enum {
38    R_CONSOLE   = 1001,
39    R_DIRECTOR,
40    R_FIRST     = R_CONSOLE,
41    R_LAST      = R_DIRECTOR           /* Keep this updated */
42 };
43
44 /*
45  * Some resource attributes
46  */
47 enum {
48    R_NAME     = 1020,
49    R_ADDRESS,
50    R_PASSWORD,
51    R_TYPE,
52    R_BACKUP
53 };
54
55
56 /* Definition of the contents of each Resource */
57
58 /* Console "globals" */
59 struct CONRES {
60    RES   hdr;
61    char *rc_file;                     /* startup file */
62    char *hist_file;                   /* command history file */
63    char *password;                    /* UA server password */
64    bool comm_compression;             /* Enable comm line compression */
65    bool tls_authenticate;             /* Authenticate with TLS */
66    bool tls_enable;                   /* Enable TLS on all connections */
67    bool tls_require;                  /* Require TLS on all connections */
68    char *tls_ca_certfile;             /* TLS CA Certificate File */
69    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
70    char *tls_certfile;                /* TLS Client Certificate File */
71    char *tls_keyfile;                 /* TLS Client Key File */
72    char *director;                    /* bind to director */
73    utime_t heartbeat_interval;        /* Interval to send heartbeats to Dir */
74
75    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
76 };
77
78 /* Director */
79 struct DIRRES {
80    RES   hdr;
81    uint32_t DIRport;                  /* UA server port */
82    char *address;                     /* UA server address */
83    char *password;                    /* UA server password */
84    bool tls_authenticate;             /* Authenticate with TLS */
85    bool tls_enable;                   /* Enable TLS */
86    bool tls_require;                  /* Require TLS */
87    char *tls_ca_certfile;             /* TLS CA Certificate File */
88    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
89    char *tls_certfile;                /* TLS Client Certificate File */
90    char *tls_keyfile;                 /* TLS Client Key File */
91    utime_t heartbeat_interval;        /* Interval to send heartbeats to Dir */
92
93    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
94 };
95
96
97 /* Define the Union of all the above
98  * resource structure definitions.
99  */
100 union URES {
101    DIRRES res_dir;
102    CONRES res_cons;
103    RES hdr;
104 };