]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/console/console_conf.h
kes Use get_catalog_resource() to open catalog database
[bacula/bacula] / bacula / src / console / console_conf.h
1 /*
2  * Bacula User Agent specific configuration and defines
3  *
4  *     Kern Sibbald, Sep MM
5  *
6  *     Version $Id$
7  */
8 /*
9    Copyright (C) 2000-2006 Kern Sibbald
10
11    This program is free software; you can redistribute it and/or
12    modify it under the terms of the GNU General Public License
13    version 2 as amended with additional clauses defined in the
14    file LICENSE in the main source directory.
15
16    This program is distributed in the hope that it will be useful,
17    but WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
19    the file LICENSE for additional details.
20
21  */
22
23 /*
24  * Resource codes -- they must be sequential for indexing
25  */
26
27 enum {
28    R_CONSOLE   = 1001,
29    R_DIRECTOR,
30    R_FIRST     = R_CONSOLE,
31    R_LAST      = R_DIRECTOR           /* Keep this updated */
32 };
33
34 /*
35  * Some resource attributes
36  */
37 enum {
38    R_NAME     = 1020,
39    R_ADDRESS,
40    R_PASSWORD,
41    R_TYPE,
42    R_BACKUP
43 };
44
45
46 /* Definition of the contents of each Resource */
47
48 /* Console "globals" */
49 struct CONRES {
50    RES   hdr;
51    char *rc_file;                     /* startup file */
52    char *hist_file;                   /* command history file */
53    char *password;                    /* UA server password */
54    int tls_enable;                    /* Enable TLS on all connections */
55    int tls_require;                   /* Require TLS on all connections */
56    char *tls_ca_certfile;             /* TLS CA Certificate File */
57    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
58    char *tls_certfile;                /* TLS Client Certificate File */
59    char *tls_keyfile;                 /* TLS Client Key File */
60    char *director;                    /* bind to director */
61
62    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
63 };
64
65 /* Director */
66 struct DIRRES {
67    RES   hdr;
68    int   DIRport;                     /* UA server port */
69    char *address;                     /* UA server address */
70    char *password;                    /* UA server password */
71    int tls_enable;                    /* Enable TLS */
72    int tls_require;                   /* Require TLS */
73    char *tls_ca_certfile;             /* TLS CA Certificate File */
74    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
75    char *tls_certfile;                /* TLS Client Certificate File */
76    char *tls_keyfile;                 /* TLS Client Key File */
77
78    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
79 };
80
81
82 /* Define the Union of all the above
83  * resource structure definitions.
84  */
85 union URES {
86    DIRRES res_dir;
87    CONRES res_cons;
88    RES hdr;
89 };