]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/console/console_conf.h
Backport from BEE
[bacula/bacula] / bacula / src / console / console_conf.h
1 /*
2    Bacula® - The Network Backup Solution
3
4    Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
5
6    The main author of Bacula is Kern Sibbald, with contributions from many
7    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    Bacula® is a registered trademark of Kern Sibbald.
15 */
16 /*
17  * Bacula User Agent specific configuration and defines
18  *
19  *     Kern Sibbald, Sep MM
20  *
21  *     Version $Id$
22  */
23
24 /*
25  * Resource codes -- they must be sequential for indexing
26  */
27
28 enum {
29    R_CONSOLE   = 1001,
30    R_DIRECTOR,
31    R_FIRST     = R_CONSOLE,
32    R_LAST      = R_DIRECTOR           /* Keep this updated */
33 };
34
35 /*
36  * Some resource attributes
37  */
38 enum {
39    R_NAME     = 1020,
40    R_ADDRESS,
41    R_PASSWORD,
42    R_TYPE,
43    R_BACKUP
44 };
45
46
47 /* Definition of the contents of each Resource */
48
49 /* Console "globals" */
50 struct CONRES {
51    RES   hdr;
52    char *rc_file;                     /* startup file */
53    char *hist_file;                   /* command history file */
54    char *password;                    /* UA server password */
55    bool tls_authenticate;             /* Authenticate with TLS */
56    bool tls_enable;                   /* Enable TLS on all connections */
57    bool tls_require;                  /* Require TLS on all connections */
58    char *tls_ca_certfile;             /* TLS CA Certificate File */
59    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
60    char *tls_certfile;                /* TLS Client Certificate File */
61    char *tls_keyfile;                 /* TLS Client Key File */
62    char *director;                    /* bind to director */
63    utime_t heartbeat_interval;        /* Interval to send heartbeats to Dir */
64
65    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
66 };
67
68 /* Director */
69 struct DIRRES {
70    RES   hdr;
71    uint32_t DIRport;                  /* UA server port */
72    char *address;                     /* UA server address */
73    char *password;                    /* UA server password */
74    bool tls_authenticate;             /* Authenticate with TLS */
75    bool tls_enable;                   /* Enable TLS */
76    bool tls_require;                  /* Require TLS */
77    char *tls_ca_certfile;             /* TLS CA Certificate File */
78    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
79    char *tls_certfile;                /* TLS Client Certificate File */
80    char *tls_keyfile;                 /* TLS Client Key File */
81    utime_t heartbeat_interval;        /* Interval to send heartbeats to Dir */
82
83    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
84 };
85
86
87 /* Define the Union of all the above
88  * resource structure definitions.
89  */
90 union URES {
91    DIRRES res_dir;
92    CONRES res_cons;
93    RES hdr;
94 };