]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/tray-monitor/tray_conf.h
- Add support for storage daemon.
[bacula/bacula] / bacula / src / tray-monitor / tray_conf.h
1 /*
2  * Tray Monitor specific configuration and defines
3  *
4  *   Adapted from dird_conf.c
5  *
6  *     Nicolas Boichat, August MMIV
7  *
8  *    Version $Id$
9  */
10 /*
11    Copyright (C) 2000-2004 Kern Sibbald and John Walker
12
13    This program is free software; you can redistribute it and/or
14    modify it under the terms of the GNU General Public License as
15    published by the Free Software Foundation; either version 2 of
16    the License, or (at your option) any later version.
17
18    This program is distributed in the hope that it will be useful,
19    but WITHOUT ANY WARRANTY; without even the implied warranty of
20    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21    General Public License for more details.
22
23    You should have received a copy of the GNU General Public
24    License along with this program; if not, write to the Free
25    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
26    MA 02111-1307, USA.
27
28  */
29
30 /* NOTE:  #includes at the end of this file */
31
32 /*
33  * Resource codes -- they must be sequential for indexing   
34  */
35 enum rescode {
36    R_MONITOR = 1001,
37    R_CLIENT,
38    R_STORAGE,
39    R_FIRST = R_MONITOR,
40    R_LAST  = R_STORAGE                /* keep this updated */
41 };
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  *   Tray Monitor Resource  
57  *
58  */
59 struct MONITOR {
60    RES   hdr;
61    int require_ssl;                   /* Require SSL for all connections */
62    MSGS *messages;                    /* Daemon message handler */
63    utime_t FDConnectTimeout;          /* timeout for connect in seconds */
64    utime_t SDConnectTimeout;          /* timeout in seconds */
65 };
66
67
68 /*
69  *   Client Resource
70  *
71  */
72 struct CLIENT {
73    RES   hdr;
74
75    int   FDport;                      /* Where File daemon listens */
76    char *address;
77    char *password;
78    int enable_ssl;                    /* Use SSL */
79 };
80
81 /*
82  *   Store Resource
83  * 
84  */
85 struct STORE {
86    RES   hdr;
87
88    int   SDport;                      /* port where Directors connect */
89    char *address;
90    char *password;
91    int enable_ssl;                    /* Use SSL */
92 };
93
94
95
96 /* Define the Union of all the above
97  * resource structure definitions.
98  */
99 union URES {
100    MONITOR    res_monitor;
101    CLIENT     res_client;
102    STORE      res_store;
103    RES        hdr;
104 };
105