X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Fdiskfile.h;h=ea6274f80d2c70b3e8b083f7e40eb667e2618092;hb=e51779f6993ef4e670096940a5746ba29e452528;hp=915af8783c5364226f61480704295a4ae6452a96;hpb=310f09c0f55a2fb6f3f3746d6ded20099792b773;p=debian%2Famanda diff --git a/server-src/diskfile.h b/server-src/diskfile.h index 915af87..ea6274f 100644 --- a/server-src/diskfile.h +++ b/server-src/diskfile.h @@ -25,7 +25,7 @@ * University of Maryland at College Park */ /* - * $Id: diskfile.h,v 1.38.2.1 2006/11/01 14:45:41 martinea Exp $ + * $Id: diskfile.h,v 1.38 2006/06/22 20:41:33 martinea Exp $ * * interface for disklist file reading code */ @@ -36,16 +36,24 @@ #include "conffile.h" #include "amfeatures.h" +typedef struct netif_s { + struct netif_s *next; + interface_t *config; + unsigned long curusage; +} netif_t; + typedef struct amhost_s { struct amhost_s *next; /* next host */ char *hostname; /* name of host */ struct disk_s *disks; /* linked list of disk records */ int inprogress; /* # dumps in progress */ int maxdumps; /* maximum dumps in parallel */ - interface_t *netif; /* network interface this host is on */ + netif_t *netif; /* network interface this host is on */ time_t start_t; /* start dump after this time */ char *up; /* generic user pointer */ am_feature_t *features; /* feature set */ + int pre_script; + int post_script; } am_host_t; typedef struct disk_s { @@ -55,6 +63,7 @@ typedef struct disk_s { am_host_t *host; /* host list */ struct disk_s *hostnext; + char *hostname; /* hostname */ char *name; /* label name for disk */ char *device; /* device name for disk, eg "sd0g" */ char *dtype_name; /* name of dump type XXX shouldn't need this */ @@ -88,6 +97,7 @@ typedef struct disk_s { time_t starttime; /* start this dump after this time */ time_t start_t; /* start this dump after this time */ int strategy; /* what dump strategy to use */ + int ignore; /* ignore */ int estimate; /* what estimate strategy to use */ int compress; /* type of compression to use */ int encrypt; /* type of encryption to use */ @@ -104,6 +114,8 @@ typedef struct disk_s { int spindle; /* spindle # - for parallel dumps */ int inprogress; /* being dumped now? */ int todo; + application_t *application; + pp_scriptlist_t pp_scriptlist; void *up; /* generic user pointer */ } disk_t; @@ -113,8 +125,9 @@ typedef struct disklist_s { #define empty(dlist) ((dlist).head == NULL) - -int read_diskfile(const char *, disklist_t *); +/* This function is integrated with the conffile.c error-handling; handle its return + * value just as you would the return of config_init() */ +cfgerr_level_t read_diskfile(const char *, disklist_t *); am_host_t *lookup_host(const char *hostname); disk_t *lookup_disk(const char *hostname, const char *diskname); @@ -133,7 +146,21 @@ void dump_queue(char *str, disklist_t q, int npr, FILE *f); char *optionstr(disk_t *dp, am_feature_t *their_features, FILE *fdout); +/* xml_optionstr() + * to_server must be set to 1 if the result is sent to another server + * application, eg. driver to dumper. + * It must be set to 0 if the result is sent to the client. + */ +char *xml_optionstr(disk_t *dp, am_feature_t *their_features, FILE *fdout, + int to_server); +char *clean_dle_str_for_client(char *dle_str); +char *xml_application(application_t *application, + am_feature_t *their_features); +char *xml_scripts(pp_scriptlist_t pp_scriptlist, am_feature_t *their_features); + char *match_disklist(disklist_t *origqp, int sargc, char **sargv); void free_disklist(disklist_t *dl); +netif_t *disklist_netifs(void); + #endif /* ! DISKFILE_H */