]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/dird/dird_conf.h
Backport from BEE
[bacula/bacula] / bacula / src / dird / dird_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  * Director specific configuration and defines
18  *
19  *     Written by Kern Sibbald, Feb MM
20  *
21  */
22
23 /* NOTE:  #includes at the end of this file */
24
25 /*
26  * Resource codes -- they must be sequential for indexing
27  */
28 enum {
29    R_DIRECTOR = 1001,
30    R_CLIENT,
31    R_JOB,
32    R_STORAGE,
33    R_CATALOG,
34    R_SCHEDULE,
35    R_FILESET,
36    R_POOL,
37    R_MSGS,
38    R_COUNTER,
39    R_CONSOLE,
40    R_JOBDEFS,
41    R_DEVICE,
42    R_FIRST = R_DIRECTOR,
43    R_LAST  = R_DEVICE                 /* keep this updated */
44 };
45
46
47 /*
48  * Some resource attributes
49  */
50 enum {
51    R_NAME = 1020,
52    R_ADDRESS,
53    R_PASSWORD,
54    R_TYPE,
55    R_BACKUP
56 };
57
58
59 /* Used for certain KeyWord tables */
60 struct s_kw {
61    const char *name;
62    uint32_t token;
63 };
64
65 /* Job Level keyword structure */
66 struct s_jl {
67    const char *level_name;                 /* level keyword */
68    int32_t  level;                         /* level */
69    int32_t  job_type;                      /* JobType permitting this level */
70 };
71
72 /* Job Type keyword structure */
73 struct s_jt {
74    const char *type_name;
75    int32_t job_type;
76 };
77
78 /* Definition of the contents of each Resource */
79 /* Needed for forward references */
80 class SCHED;
81 class CLIENT;
82 class FILESET;
83 class POOL;
84 class RUN;
85 class DEVICE;
86 class RUNSCRIPT;
87
88 /*
89  *   Director Resource
90  *
91  */
92 class DIRRES {
93 public:
94    RES   hdr;
95    dlist *DIRaddrs;
96    dlist *DIRsrc_addr;                /* address to source connections from */
97    char *password;                    /* Password for UA access */
98    char *query_file;                  /* SQL query file */
99    char *working_directory;           /* WorkingDirectory */
100    const char *scripts_directory;     /* ScriptsDirectory */
101    const char *plugin_directory;      /* Plugin Directory */
102    char *pid_directory;               /* PidDirectory */
103    char *subsys_directory;            /* SubsysDirectory */
104    MSGS *messages;                    /* Daemon message handler */
105    uint32_t MaxConcurrentJobs;        /* Max concurrent jobs for whole director */
106    uint32_t MaxSpawnedJobs;           /* Max Jobs that can be started by Migration/Copy */
107    uint32_t MaxConsoleConnect;        /* Max concurrent console session */
108    utime_t FDConnectTimeout;          /* timeout for connect in seconds */
109    utime_t SDConnectTimeout;          /* timeout in seconds */
110    utime_t heartbeat_interval;        /* Interval to send heartbeats */
111    char *tls_ca_certfile;             /* TLS CA Certificate File */
112    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
113    char *tls_certfile;                /* TLS Server Certificate File */
114    char *tls_keyfile;                 /* TLS Server Key File */
115    char *tls_dhfile;                  /* TLS Diffie-Hellman Parameters */
116    alist *tls_allowed_cns;            /* TLS Allowed Clients */
117    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
118    utime_t stats_retention;           /* Stats retention period in seconds */
119    bool tls_authenticate;             /* Authenticated with TLS */
120    bool tls_enable;                   /* Enable TLS */
121    bool tls_require;                  /* Require TLS */
122    bool tls_verify_peer;              /* TLS Verify Client Certificate */
123    char *verid;                       /* Custom Id to print in version command */
124    /* Methods */
125    char *name() const;
126 };
127
128 inline char *DIRRES::name() const { return hdr.name; }
129
130 /*
131  * Device Resource
132  *  This resource is a bit different from the other resources
133  *  because it is not defined in the Director
134  *  by DEVICE { ... }, but rather by a "reference" such as
135  *  DEVICE = xxx; Then when the Director connects to the
136  *  SD, it requests the information about the device.
137  */
138 class DEVICE {
139 public:
140    RES hdr;
141
142    bool found;                        /* found with SD */
143    int32_t num_writers;               /* number of writers */
144    int32_t max_writers;               /* = 1 for files */
145    int32_t reserved;                  /* number of reserves */
146    int32_t num_drives;                /* for autochanger */
147    bool autochanger;                  /* set if device is autochanger */
148    bool open;                         /* drive open */
149    bool append;                       /* in append mode */
150    bool read;                         /* in read mode */
151    bool labeled;                      /* Volume name valid */
152    bool offline;                      /* not available */
153    bool autoselect;                   /* can be selected via autochanger */
154    uint32_t PoolId;
155    char ChangerName[MAX_NAME_LENGTH];
156    char VolumeName[MAX_NAME_LENGTH];
157    char MediaType[MAX_NAME_LENGTH];
158
159    /* Methods */
160    char *name() const;
161 };
162
163 inline char *DEVICE::name() const { return hdr.name; }
164
165 /*
166  * Console ACL positions
167  */
168 enum {
169    Job_ACL = 0,
170    Client_ACL,
171    Storage_ACL,
172    Schedule_ACL,
173    Run_ACL,
174    Pool_ACL,
175    Command_ACL,
176    FileSet_ACL,
177    Catalog_ACL,
178    Where_ACL,
179    PluginOptions_ACL,
180    Num_ACL                            /* keep last */
181 };
182
183 /*
184  *    Console Resource
185  */
186 class CONRES {
187 public:
188    RES   hdr;
189    char *password;                    /* UA server password */
190    alist *ACL_lists[Num_ACL];         /* pointers to ACLs */
191    char *tls_ca_certfile;             /* TLS CA Certificate File */
192    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
193    char *tls_certfile;                /* TLS Server Certificate File */
194    char *tls_keyfile;                 /* TLS Server Key File */
195    char *tls_dhfile;                  /* TLS Diffie-Hellman Parameters */
196    alist *tls_allowed_cns;            /* TLS Allowed Clients */
197    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
198    bool tls_authenticate;             /* Authenticated with TLS */
199    bool tls_enable;                   /* Enable TLS */
200    bool tls_require;                  /* Require TLS */
201    bool tls_verify_peer;              /* TLS Verify Client Certificate */
202
203    /* Methods */
204    char *name() const;
205 };
206
207 inline char *CONRES::name() const { return hdr.name; }
208
209
210 /*
211  *   Catalog Resource
212  *
213  */
214 class CAT {
215 public:
216    RES   hdr;
217
218    uint32_t db_port;                  /* Port */
219    char *db_address;                  /* host name for remote access */
220    char *db_socket;                   /* Socket for local access */
221    char *db_password;
222    char *db_user;
223    char *db_name;
224    char *db_driver;                   /* Select appropriate driver */
225    uint32_t mult_db_connections;      /* set if multiple connections wanted */
226    bool disable_batch_insert;         /* set if batch inserts should be disabled */
227
228    /* Methods */
229    char *name() const;
230    char *display(POOLMEM *dst);       /* Get catalog information */
231 };
232
233 inline char *CAT::name() const { return hdr.name; }
234
235
236 /*
237  *   Client Resource
238  *
239  */
240 class CLIENT {
241 public:
242    RES   hdr;
243
244    uint32_t FDport;                   /* Where File daemon listens */
245    utime_t FileRetention;             /* file retention period in seconds */
246    utime_t JobRetention;              /* job retention period in seconds */
247    utime_t heartbeat_interval;        /* Interval to send heartbeats */
248    char *address;
249    char *fd_storage_address;          /* Storage address to use from FD side  */
250    char *password;
251    CAT *catalog;                      /* Catalog resource */
252    int32_t MaxConcurrentJobs;         /* Maximum concurrent jobs */
253    int32_t NumConcurrentJobs;         /* number of concurrent jobs running */
254    char *tls_ca_certfile;             /* TLS CA Certificate File */
255    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
256    char *tls_certfile;                /* TLS Client Certificate File */
257    char *tls_keyfile;                 /* TLS Client Key File */
258    alist *tls_allowed_cns;            /* TLS Allowed Clients */
259    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
260    bool tls_authenticate;             /* Authenticated with TLS */
261    bool tls_enable;                   /* Enable TLS */
262    bool tls_require;                  /* Require TLS */
263    bool AutoPrune;                    /* Do automatic pruning? */
264    bool sd_calls_client;              /* SD calls the client */
265    int64_t max_bandwidth;             /* Limit speed on this client */
266
267    /* Methods */
268    char *name() const;
269 };
270
271 inline char *CLIENT::name() const { return hdr.name; }
272
273
274 /*
275  *   Store Resource
276  *
277  */
278 class STORE {
279 public:
280    RES   hdr;
281
282    uint32_t SDport;                   /* port where Directors connect */
283    uint32_t SDDport;                  /* data port for File daemon */
284    char *address;
285    char *fd_storage_address;          /* Storage address to use from FD side  */
286    char *password;
287    char *media_type;
288    alist *device;                     /* Alternate devices for this Storage */
289    int32_t MaxConcurrentJobs;         /* Maximum concurrent jobs */
290    int32_t MaxConcurrentReadJobs;     /* Maximum concurrent jobs reading */
291    int32_t NumConcurrentJobs;         /* number of concurrent jobs running */
292    int32_t NumConcurrentReadJobs;     /* number of jobs reading */
293    char *tls_ca_certfile;             /* TLS CA Certificate File */
294    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
295    char *tls_certfile;                /* TLS Client Certificate File */
296    char *tls_keyfile;                 /* TLS Client Key File */
297    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
298    bool tls_authenticate;             /* Authenticated with TLS */
299    bool tls_enable;                   /* Enable TLS */
300    bool tls_require;                  /* Require TLS */
301    bool enabled;                      /* Set if device is enabled */
302    bool  autochanger;                 /* set if autochanger */
303    bool AllowCompress;                /* set if this Storage should allow jobs to enable compression */
304    int64_t StorageId;                 /* Set from Storage DB record */
305    utime_t heartbeat_interval;        /* Interval to send heartbeats */
306    uint32_t drives;                   /* number of drives in autochanger */
307
308    /* Methods */
309    char *dev_name() const;
310    char *name() const;
311 };
312
313 inline char *STORE::dev_name() const
314 {
315    DEVICE *dev = (DEVICE *)device->first();
316    return dev->name();
317 }
318
319 inline char *STORE::name() const { return hdr.name; }
320
321 /*
322  * This is a sort of "unified" store that has both the
323  *  storage pointer and the text of where the pointer was
324  *  found.
325  */
326 class USTORE {
327 public:
328    STORE *store;
329    POOLMEM *store_source;
330
331    /* Methods */
332    USTORE() { store = NULL; store_source = get_pool_memory(PM_MESSAGE);
333               *store_source = 0; };
334    ~USTORE() { destroy(); }
335    void set_source(const char *where);
336    void destroy();
337 };
338
339 inline void USTORE::destroy()
340 {
341    if (store_source) {
342       free_pool_memory(store_source);
343       store_source = NULL;
344    }
345 }
346
347
348 inline void USTORE::set_source(const char *where)
349 {
350    if (!store_source) {
351       store_source = get_pool_memory(PM_MESSAGE);
352    }
353    pm_strcpy(store_source, where);
354 }
355
356
357 /*
358  *   Job Resource
359  */
360 class JOB {
361 public:
362    RES   hdr;
363
364    uint32_t   JobType;                /* job type (backup, verify, restore */
365    uint32_t   JobLevel;               /* default backup/verify level */
366    int32_t   Priority;                /* Job priority */
367    uint32_t   RestoreJobId;           /* What -- JobId to restore */
368    int32_t   RescheduleTimes;         /* Number of times to reschedule job */
369    uint32_t   replace;                /* How (overwrite, ..) */
370    uint32_t   selection_type;
371
372    char *RestoreWhere;                /* Where on disk to restore -- directory */
373    char *RegexWhere;                  /* RegexWhere option */
374    char *strip_prefix;                /* remove prefix from filename  */
375    char *add_prefix;                  /* add prefix to filename  */
376    char *add_suffix;                  /* add suffix to filename -- .old */
377    char *RestoreBootstrap;            /* Bootstrap file */
378    char *PluginOptions;               /* Options to pass to plugin */
379    union {
380       char *WriteBootstrap;           /* Where to write bootstrap Job updates */
381       char *WriteVerifyList;          /* List of changed files */
382    };
383    utime_t MaxRunTime;                /* max run time in seconds */
384    utime_t MaxWaitTime;               /* max blocking time in seconds */
385    utime_t FullMaxRunTime;            /* Max Full job run time */
386    utime_t DiffMaxRunTime;            /* Max Differential job run time */
387    utime_t IncMaxRunTime;             /* Max Incremental job run time */
388    utime_t MaxStartDelay;             /* max start delay in seconds */
389    utime_t MaxRunSchedTime;           /* max run time in seconds from Scheduled time*/
390    utime_t RescheduleInterval;        /* Reschedule interval */
391    utime_t MaxFullInterval;           /* Maximum time interval between Fulls */
392    utime_t MaxDiffInterval;           /* Maximum time interval between Diffs */
393    utime_t DuplicateJobProximity;     /* Permitted time between duplicicates */
394    int64_t spool_size;                /* Size of spool file for this job */
395    int32_t MaxConcurrentJobs;         /* Maximum concurrent jobs */
396    int32_t NumConcurrentJobs;         /* number of concurrent jobs running */
397    uint32_t MaxSpawnedJobs;           /* Max Jobs that can be started by Migration/Copy */
398    bool allow_mixed_priority;         /* Allow jobs with higher priority concurrently with this */
399
400    MSGS      *messages;               /* How and where to send messages */
401    SCHED     *schedule;               /* When -- Automatic schedule */
402    CLIENT    *client;                 /* Who to backup */
403    FILESET   *fileset;                /* What to backup -- Fileset */
404    alist     *storage;                /* Where is device -- list of Storage to be used */
405    POOL      *pool;                   /* Where is media -- Media Pool */
406    POOL      *next_pool;              /* Next Pool for Copy/Migrate/VirtualFull */
407    POOL      *full_pool;              /* Pool for Full backups */
408    POOL      *inc_pool;               /* Pool for Incremental backups */
409    POOL      *diff_pool;              /* Pool for Differental backups */
410    char      *selection_pattern;
411    union {
412       JOB    *verify_job;             /* Job name to verify */
413    };
414    JOB       *jobdefs;                /* Job defaults */
415    alist     *run_cmds;               /* Run commands */
416    alist *RunScripts;                 /* Run {client} program {after|before} Job */
417
418    bool where_use_regexp;             /* true if RestoreWhere is a BREGEXP */
419    bool RescheduleOnError;            /* Set to reschedule on error */
420    bool RescheduleIncompleteJobs;     /* Set to reschedule incomplete Jobs */
421    bool PrefixLinks;                  /* prefix soft links with Where path */
422    bool PruneJobs;                    /* Force pruning of Jobs */
423    bool PruneFiles;                   /* Force pruning of Files */
424    bool PruneVolumes;                 /* Force pruning of Volumes */
425    bool SpoolAttributes;              /* Set to spool attributes in SD */
426    bool spool_data;                   /* Set to spool data in SD */
427    bool rerun_failed_levels;          /* Upgrade to rerun failed levels */
428    bool PreferMountedVolumes;         /* Prefer vols mounted rather than new one */
429    bool write_part_after_job;         /* Set to write part after job in SD */
430    bool enabled;                      /* Set if job enabled */
431    bool accurate;                     /* Set if it is an accurate backup job */
432    bool AllowDuplicateJobs;           /* Allow duplicate jobs */
433    bool AllowHigherDuplicates;        /* Permit Higher Level */
434    bool CancelLowerLevelDuplicates;   /* Cancel lower level backup jobs */
435    bool CancelQueuedDuplicates;       /* Cancel queued jobs */
436    bool CancelRunningDuplicates;      /* Cancel Running jobs */
437    bool PurgeMigrateJob;              /* Purges source job on completion */
438    bool IgnoreDuplicateJobChecking;   /* Ignore Duplicate Job Checking */
439
440    alist *base;                       /* Base jobs */
441    int64_t max_bandwidth;             /* Speed limit on this job */
442
443    /* Methods */
444    char *name() const;
445 };
446
447 inline char *JOB::name() const { return hdr.name; }
448
449 #undef  MAX_FOPTS
450 #define MAX_FOPTS 40
451
452 /* File options structure */
453 struct FOPTS {
454    char opts[MAX_FOPTS];              /* options string */
455    alist regex;                       /* regex string(s) */
456    alist regexdir;                    /* regex string(s) for directories */
457    alist regexfile;                   /* regex string(s) for files */
458    alist wild;                        /* wild card strings */
459    alist wilddir;                     /* wild card strings for directories */
460    alist wildfile;                    /* wild card strings for files */
461    alist wildbase;                    /* wild card strings for files without '/' */
462    alist base;                        /* list of base names */
463    alist fstype;                      /* file system type limitation */
464    alist drivetype;                   /* drive type limitation */
465    char *reader;                      /* reader program */
466    char *writer;                      /* writer program */
467    char *plugin;                      /* plugin program */
468 };
469
470
471 /* This is either an include item or an exclude item */
472 struct INCEXE {
473    FOPTS *current_opts;               /* points to current options structure */
474    FOPTS **opts_list;                 /* options list */
475    int32_t num_opts;                  /* number of options items */
476    alist name_list;                   /* filename list -- holds char * */
477    alist plugin_list;                 /* filename list for plugins */
478    char *ignoredir;                   /* ignoredir string */
479 };
480
481 /*
482  *   FileSet Resource
483  *
484  */
485 class FILESET {
486 public:
487    RES   hdr;
488
489    bool new_include;                  /* Set if new include used */
490    INCEXE **include_items;            /* array of incexe structures */
491    int32_t num_includes;              /* number in array */
492    INCEXE **exclude_items;
493    int32_t num_excludes;
494    bool have_MD5;                     /* set if MD5 initialized */
495    struct MD5Context md5c;            /* MD5 of include/exclude */
496    char MD5[30];                      /* base 64 representation of MD5 */
497    bool ignore_fs_changes;            /* Don't force Full if FS changed */
498    bool enable_vss;                   /* Enable Volume Shadow Copy */
499
500    /* Methods */
501    char *name() const;
502 };
503
504 inline char *FILESET::name() const { return hdr.name; }
505
506 /*
507  *   Schedule Resource
508  *
509  */
510 class SCHED {
511 public:
512    RES   hdr;
513
514    RUN *run;
515    char *name() const;
516 };
517
518 inline char *SCHED::name() const { return hdr.name; }
519
520 /*
521  *   Counter Resource
522  */
523 class COUNTER {
524 public:
525    RES   hdr;
526
527    int32_t  MinValue;                 /* Minimum value */
528    int32_t  MaxValue;                 /* Maximum value */
529    int32_t  CurrentValue;             /* Current value */
530    COUNTER *WrapCounter;              /* Wrap counter name */
531    CAT     *Catalog;                  /* Where to store */
532    bool     created;                  /* Created in DB */
533    /* Methods */
534    char *name() const;
535 };
536
537 inline char *COUNTER::name() const { return hdr.name; }
538
539 /*
540  *   Pool Resource
541  *
542  */
543 class POOL {
544 public:
545    RES   hdr;
546
547    char *pool_type;                   /* Pool type */
548    char *label_format;                /* Label format string */
549    char *cleaning_prefix;             /* Cleaning label prefix */
550    int32_t LabelType;                 /* Bacula/ANSI/IBM label type */
551    uint32_t max_volumes;              /* max number of volumes */
552    utime_t VolRetention;              /* volume retention period in seconds */
553    utime_t VolUseDuration;            /* duration volume can be used */
554    uint32_t MaxVolJobs;               /* Maximum jobs on the Volume */
555    uint32_t MaxVolFiles;              /* Maximum files on the Volume */
556    uint64_t MaxVolBytes;              /* Maximum bytes on the Volume */
557    utime_t MigrationTime;             /* Time to migrate to next pool */
558    uint64_t MigrationHighBytes;       /* When migration starts */
559    uint64_t MigrationLowBytes;        /* When migration stops */
560    POOL  *NextPool;                   /* Next pool for migration */
561    alist *storage;                    /* Where is device -- list of Storage to be used */
562    bool  use_catalog;                 /* maintain catalog for media */
563    bool  catalog_files;               /* maintain file entries in catalog */
564    bool  use_volume_once;             /* write on volume only once */
565    bool  purge_oldest_volume;         /* purge oldest volume */
566    bool  recycle_oldest_volume;       /* attempt to recycle oldest volume */
567    bool  recycle_current_volume;      /* attempt recycle of current volume */
568    bool  AutoPrune;                   /* default for pool auto prune */
569    bool  Recycle;                     /* default for media recycle yes/no */
570    uint32_t action_on_purge;          /* action on purge, e.g. truncate the disk volume */
571    POOL  *RecyclePool;                /* RecyclePool destination when media is purged */
572    POOL  *ScratchPool;                /* ScratchPool source when requesting media */
573    alist *CopyPool;                   /* List of copy pools */
574    CAT *catalog;                      /* Catalog to be used */
575    utime_t FileRetention;             /* file retention period in seconds */
576    utime_t JobRetention;              /* job retention period in seconds */
577
578    /* Methods */
579    char *name() const;
580 };
581
582 inline char *POOL::name() const { return hdr.name; }
583
584
585
586
587 /* Define the Union of all the above
588  * resource structure definitions.
589  */
590 union URES {
591    DIRRES     res_dir;
592    CONRES     res_con;
593    CLIENT     res_client;
594    STORE      res_store;
595    CAT        res_cat;
596    JOB        res_job;
597    FILESET    res_fs;
598    SCHED      res_sch;
599    POOL       res_pool;
600    MSGS       res_msgs;
601    COUNTER    res_counter;
602    DEVICE     res_dev;
603    RES        hdr;
604    RUNSCRIPT  res_runscript;
605 };
606
607
608
609 /* Run structure contained in Schedule Resource */
610 class RUN {
611 public:
612    RUN *next;                         /* points to next run record */
613    uint32_t level;                    /* level override */
614    int32_t Priority;                  /* priority override */
615    uint32_t job_type;
616    utime_t MaxRunSchedTime;           /* max run time in sec from Sched time */
617    bool MaxRunSchedTime_set;          /* MaxRunSchedTime given */
618    bool spool_data;                   /* Data spooling override */
619    bool spool_data_set;               /* Data spooling override given */
620    bool accurate;                     /* accurate */
621    bool accurate_set;                 /* accurate given */
622    bool write_part_after_job;         /* Write part after job override */
623    bool write_part_after_job_set;     /* Write part after job override given */
624    bool priority_set;                 /* priority override given */
625    bool level_set;                    /* level override given */
626
627    POOL *pool;                        /* Pool override */
628    POOL *next_pool;                   /* Next pool override */
629    POOL *full_pool;                   /* Pool override */
630    POOL *inc_pool;                    /* Pool override */
631    POOL *diff_pool;                   /* Pool override */
632    STORE *storage;                    /* Storage override */
633    MSGS *msgs;                        /* Messages override */
634    char *since;
635    uint32_t level_no;
636    uint32_t minute;                   /* minute to run job */
637    time_t last_run;                   /* last time run */
638    time_t next_run;                   /* next time to run */
639    char hour[nbytes_for_bits(24)];    /* bit set for each hour */
640    char mday[nbytes_for_bits(32)];    /* bit set for each day of month */
641    char month[nbytes_for_bits(12)];   /* bit set for each month */
642    char wday[nbytes_for_bits(7)];     /* bit set for each day of the week */
643    char wom[nbytes_for_bits(6)];      /* week of month */
644    char woy[nbytes_for_bits(54)];     /* week of year */
645 };
646
647 #define GetPoolResWithName(x) ((POOL *)GetResWithName(R_POOL, (x)))
648 #define GetStoreResWithName(x) ((STORE *)GetResWithName(R_STORAGE, (x)))
649 #define GetClientResWithName(x) ((CLIENT *)GetResWithName(R_CLIENT, (x)))
650 #define GetJobResWithName(x) ((JOB *)GetResWithName(R_JOB, (x)))
651 #define GetFileSetResWithName(x) ((FILESET *)GetResWithName(R_FILESET, (x)))
652 #define GetCatalogResWithName(x) ((CAT *)GetResWithName(R_CATALOG, (x)))