]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/bsr.h
98228c906f319fff2a7366654080efa017947fa0
[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 };
43 typedef struct s_vol_list VOL_LIST;
44
45
46 /*
47  * !!!!!!!!!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
48  * !!!                                               !!!
49  * !!!   All records must have a pointer to          !!!
50  * !!!   the next item as the first item defined.    !!!
51  * !!!                                               !!!
52  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
53  */
54
55 typedef struct s_bsr_client {
56    struct s_bsr_client *next;
57    char ClientName[MAX_NAME_LENGTH];
58 } BSR_CLIENT;
59
60 typedef struct s_bsr_sessid {
61    struct s_bsr_sessid *next;
62    uint32_t sessid;
63    uint32_t sessid2;
64    int found;
65 } BSR_SESSID;
66
67 typedef struct s_bsr_sesstime {
68    struct s_bsr_sesstime *next;
69    uint32_t sesstime;
70    int found;
71 } BSR_SESSTIME;
72
73 typedef struct s_bsr_volfile {
74    struct s_bsr_volfile *next;
75    uint32_t sfile;                    /* start file */
76    uint32_t efile;                    /* end file */
77    int found;
78 } BSR_VOLFILE;
79
80 typedef struct s_bsr_findex {
81    struct s_bsr_findex *next;
82    int32_t findex;                    /* start file index */
83    int32_t findex2;                   /* end file index */
84    int found;
85 } BSR_FINDEX;
86
87 typedef struct s_bsr_jobid {
88    struct s_bsr_jobid *next;
89    uint32_t JobId;
90    uint32_t JobId2;
91    int found;
92 } BSR_JOBID;
93
94 typedef struct s_bsr_jobtype {
95    struct s_bsr_jobtype *next;
96    uint32_t JobType;
97 } BSR_JOBTYPE;
98
99 typedef struct s_bsr_joblevel {
100    struct s_bsr_joblevel *next;
101    uint32_t JobLevel;
102 } BSR_JOBLEVEL;
103
104 typedef struct s_bsr_job {
105    struct s_bsr_job *next;
106    char Job[MAX_NAME_LENGTH];
107    int found;
108 } BSR_JOB;
109
110
111 typedef struct s_bsr {
112    struct s_bsr *next;                /* pointer to next one */
113    int           done;                /* set when everything found */
114    char         *VolumeName;
115    BSR_VOLFILE  *volfile;
116    BSR_SESSTIME *sesstime;
117    BSR_SESSID   *sessid;
118    BSR_JOBID    *JobId;
119    BSR_JOB      *job;
120    BSR_CLIENT   *client;
121    BSR_FINDEX   *FileIndex;
122    BSR_JOBTYPE  *JobType;
123    BSR_JOBLEVEL *JobLevel;
124    FF_PKT *ff;                        /* include/exclude */
125 } BSR;
126
127
128 #endif