]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/bsr.h
Autochanger for read + 64 bit addrs + Session key, see kes14Sep02
[bacula/bacula] / bacula / src / stored / bsr.h
1 /*
2  * BootStrap record definition -- for restoring files.
3  *
4  *    Kern Sibbald, June 2002
5  *
6  *   Version $Id$
7  *
8  */
9 /*
10    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
11
12    This program is free software; you can redistribute it and/or
13    modify it under the terms of the GNU General Public License as
14    published by the Free Software Foundation; either version 2 of
15    the License, or (at your option) any later version.
16
17    This program is distributed in the hope that it will be useful,
18    but WITHOUT ANY WARRANTY; without even the implied warranty of
19    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20    General Public License for more details.
21
22    You should have received a copy of the GNU General Public
23    License along with this program; if not, write to the Free
24    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
25    MA 02111-1307, USA.
26
27  */
28
29
30 #ifndef __BSR_H
31 #define __BSR_H 1
32
33 #include "findlib/find.h"
34
35 /*
36  * List of Volume names to be read by Storage daemon.
37  *  Formed by Storage daemon from BSR  
38  */
39 struct s_vol_list {
40    struct s_vol_list *next;
41    char VolumeName[MAX_NAME_LENGTH];
42    int Slot; 
43 };
44 typedef struct s_vol_list VOL_LIST;
45
46
47 /*
48  * !!!!!!!!!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
49  * !!!                                               !!!
50  * !!!   All records must have a pointer to          !!!
51  * !!!   the next item as the first item defined.    !!!
52  * !!!                                               !!!
53  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
54  */
55
56 typedef struct s_bsr_volume {
57    struct s_bsr_volume *next;
58    char VolumeName[MAX_NAME_LENGTH];
59 } BSR_VOLUME;
60
61 typedef struct s_bsr_client {
62    struct s_bsr_client *next;
63    char ClientName[MAX_NAME_LENGTH];
64 } BSR_CLIENT;
65
66 typedef struct s_bsr_sessid {
67    struct s_bsr_sessid *next;
68    uint32_t sessid;
69    uint32_t sessid2;
70    int found;
71 } BSR_SESSID;
72
73 typedef struct s_bsr_sesstime {
74    struct s_bsr_sesstime *next;
75    uint32_t sesstime;
76    int found;
77 } BSR_SESSTIME;
78
79 typedef struct s_bsr_volfile {
80    struct s_bsr_volfile *next;
81    uint32_t sfile;                    /* start file */
82    uint32_t efile;                    /* end file */
83    int found;
84 } BSR_VOLFILE;
85
86 typedef struct s_bsr_findex {
87    struct s_bsr_findex *next;
88    int32_t findex;                    /* start file index */
89    int32_t findex2;                   /* end file index */
90    int found;
91 } BSR_FINDEX;
92
93 typedef struct s_bsr_jobid {
94    struct s_bsr_jobid *next;
95    uint32_t JobId;
96    uint32_t JobId2;
97    int found;
98 } BSR_JOBID;
99
100 typedef struct s_bsr_jobtype {
101    struct s_bsr_jobtype *next;
102    uint32_t JobType;
103 } BSR_JOBTYPE;
104
105 typedef struct s_bsr_joblevel {
106    struct s_bsr_joblevel *next;
107    uint32_t JobLevel;
108 } BSR_JOBLEVEL;
109
110 typedef struct s_bsr_job {
111    struct s_bsr_job *next;
112    char Job[MAX_NAME_LENGTH];
113    int found;
114 } BSR_JOB;
115
116 typedef struct s_bsr_stream {
117    struct s_bsr_stream *next;
118    int32_t stream;                    /* stream desired */
119    int found;
120 } BSR_STREAM;
121
122 typedef struct s_bsr {
123    struct s_bsr *next;                /* pointer to next one */
124    int           done;                /* set when everything found */
125    BSR_VOLUME   *volume;
126    int32_t       Slot;                /* Slot */
127    int32_t       count;               /* count of files to restore this volume */
128    BSR_VOLFILE  *volfile;
129    BSR_SESSTIME *sesstime;
130    BSR_SESSID   *sessid;
131    BSR_JOBID    *JobId;
132    BSR_JOB      *job;
133    BSR_CLIENT   *client;
134    BSR_FINDEX   *FileIndex;
135    BSR_JOBTYPE  *JobType;
136    BSR_JOBLEVEL *JobLevel;
137    BSR_STREAM   *stream;
138 // FF_PKT *ff;                        /* include/exclude */
139 } BSR;
140
141
142 #endif