⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conffile.h

📁 开源备份软件源码 AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a backup system that a
💻 H
📖 第 1 页 / 共 3 页
字号:
    CNF_DEBUG_PROTOCOL,    CNF_DEBUG_PLANNER,    CNF_DEBUG_DRIVER,    CNF_DEBUG_DUMPER,    CNF_DEBUG_CHUNKER,    CNF_DEBUG_TAPER,    CNF_DEBUG_SELFCHECK,    CNF_DEBUG_SENDSIZE,    CNF_DEBUG_SENDBACKUP,    CNF_RESERVED_UDP_PORT,    CNF_RESERVED_TCP_PORT,    CNF_UNRESERVED_TCP_PORT,    CNF_CNF /* sentinel */} confparm_key;/* Given a confparm_key, return a pointer to the corresponding val_t. * * @param key: confparm_key * @returns: pointer to value */val_t *getconf(confparm_key key);/* (convenience macro) has this global parameter been seen? * * @param key: confparm_key * @returns: boolean */#define getconf_seen(key)       (val_t_seen(getconf((key))))/* (convenience macros) * Fetch a gloabl parameter of a specific type.  Note that these * convenience macros have a different form from those for the * subsections: here you specify a type and a key, while for the * subsections you specify only a key.  The difference is historical. * * @param key: confparm_key * @returns: various */#define getconf_int(key)          (val_t_to_int(getconf((key))))#define getconf_am64(key)         (val_t_to_am64(getconf((key))))#define getconf_real(key)         (val_t_to_real(getconf((key))))#define getconf_str(key)	  (val_t_to_str(getconf((key))))#define getconf_ident(key)        (val_t_to_ident(getconf((key))))#define getconf_time(key)         (val_t_to_time(getconf((key))))#define getconf_size(key)         (val_t_to_size(getconf((key))))#define getconf_boolean(key)      (val_t_to_boolean(getconf((key))))#define getconf_compress(key)     (val_t_to_compress(getconf((key))))#define getconf_encrypt(key)      (val_t_to_encrypt(getconf((key))))#define getconf_holding(key)      (val_t_to_holding(getconf((key))))#define getconf_estimate(key)     (val_t_to_estimate(getconf((key))))#define getconf_strategy(key)     (val_t_to_strategy(getconf((key))))#define getconf_taperalgo(key)    (val_t_to_taperalgo(getconf((key))))#define getconf_priority(key)     (val_t_to_priority(getconf((key))))#define getconf_rate(key)         (val_t_to_rate(getconf((key))))#define getconf_exinclude(key)    (val_t_to_exinclude(getconf((key))))#define getconf_intrange(key)     (val_t_to_intrange(getconf((key))))#define getconf_proplist(key)     (val_t_to_proplist(getconf((key))))/* Get a list of names for subsections of the given type * * @param listname: the desired type of subsection * @returns: list of subsection names; caller is responsible for freeing * this list, but not the strings it points to, using g_slist_free(). */GSList *getconf_list(char *listname);/* Get a configuration value by name, supporting the TYPE:SUBSEC:KEYWORD. * Returns NULL if the configuration value doesnt exist. */val_t *getconf_byname(char *key);/* * Derived values * * Values which aren't directly specified by the configuration, but which * are derived from it. *//* Return a divisor which will convert a value in units of kilo-whatevers * to the user's selected display unit. * * @returns: long integer divisor */long int getconf_unit_divisor(void);/* If any of these globals are true, the corresponding component will * send verbose debugging output to the debug file.  The options are * set during config_init, but can be modified at will after that if  * desired.  */extern int debug_amandad;extern int debug_amidxtaped;extern int debug_amindexd;extern int debug_amrecover;extern int debug_auth;extern int debug_event;extern int debug_holding;extern int debug_protocol;extern int debug_planner;extern int debug_driver;extern int debug_dumper;extern int debug_chunker;extern int debug_taper;extern int debug_selfcheck;extern int debug_sendsize;extern int debug_sendbackup;/* * Tapetype parameter access */typedef enum {    TAPETYPE_COMMENT,    TAPETYPE_LBL_TEMPL,    TAPETYPE_BLOCKSIZE,    TAPETYPE_READBLOCKSIZE,    TAPETYPE_LENGTH,    TAPETYPE_FILEMARK,    TAPETYPE_SPEED,    TAPETYPE_FILE_PAD,    TAPETYPE_TAPETYPE /* sentinel */} tapetype_key;/* opaque object */typedef struct tapetype_s tapetype_t;/* Given the name of the tapetype, return a tapetype object.  Returns NULL * if no matching tapetype exists.  Note that the match is case-insensitive. * * @param identifier: name of the desired tapetype * @returns: object or NULL */tapetype_t *lookup_tapetype(char *identifier);/* Given a tapetype and a key, return a pointer to the corresponding val_t. * * @param ttyp: the tapetype to examine * @param key: tapetype_key (one of the TAPETYPE_* constants) * @returns: pointer to value */val_t *tapetype_getconf(tapetype_t *ttyp, tapetype_key key);/* Get the name of this tapetype. * * @param ttyp: the tapetype to examine * @returns: name of the tapetype */char *tapetype_name(tapetype_t *ttyp);/* (convenience macro) has this parameter been seen in this tapetype?  This * applies to the specific parameter *within* the tapetype. * * @param key: tapetype_key * @returns: boolean */#define tapetype_seen(ttyp, key)       (val_t_seen(tapetype_getconf((ttyp), (key))))/* (convenience macros) * fetch a particular parameter; caller must know the correct type. * * @param ttyp: the tapetype to examine * @returns: various */#define tapetype_get_comment(ttyp)         (val_t_to_str(tapetype_getconf((ttyp), TAPETYPE_COMMENT)))#define tapetype_get_lbl_templ(ttyp)       (val_t_to_str(tapetype_getconf((ttyp), TAPETYPE_LBL_TEMPL)))#define tapetype_get_blocksize(ttyp)       (val_t_to_size(tapetype_getconf((ttyp), TAPETYPE_BLOCKSIZE)))#define tapetype_get_readblocksize(ttyp)   (val_t_to_size(tapetype_getconf((ttyp), TAPETYPE_READBLOCKSIZE)))#define tapetype_get_length(ttyp)          (val_t_to_am64(tapetype_getconf((ttyp), TAPETYPE_LENGTH)))#define tapetype_get_filemark(ttyp)        (val_t_to_am64(tapetype_getconf((ttyp), TAPETYPE_FILEMARK)))#define tapetype_get_speed(ttyp)           (val_t_to_int(tapetype_getconf((ttyp), TAPETYPE_SPEED)))#define tapetype_get_file_pad(ttyp)        (val_t_to_boolean(tapetype_getconf((ttyp), TAPETYPE_FILE_PAD)))/* * Dumptype parameter access */typedef enum {    DUMPTYPE_COMMENT,    DUMPTYPE_PROGRAM,    DUMPTYPE_SRVCOMPPROG,    DUMPTYPE_CLNTCOMPPROG,    DUMPTYPE_SRV_ENCRYPT,    DUMPTYPE_CLNT_ENCRYPT,    DUMPTYPE_AMANDAD_PATH,    DUMPTYPE_CLIENT_USERNAME,    DUMPTYPE_SSH_KEYS,    DUMPTYPE_SECURITY_DRIVER,    DUMPTYPE_EXCLUDE,    DUMPTYPE_INCLUDE,    DUMPTYPE_PRIORITY,    DUMPTYPE_DUMPCYCLE,    DUMPTYPE_MAXDUMPS,    DUMPTYPE_MAXPROMOTEDAY,    DUMPTYPE_BUMPPERCENT,    DUMPTYPE_BUMPSIZE,    DUMPTYPE_BUMPDAYS,    DUMPTYPE_BUMPMULT,    DUMPTYPE_STARTTIME,    DUMPTYPE_STRATEGY,    DUMPTYPE_ESTIMATE,    DUMPTYPE_COMPRESS,    DUMPTYPE_ENCRYPT,    DUMPTYPE_SRV_DECRYPT_OPT,    DUMPTYPE_CLNT_DECRYPT_OPT,    DUMPTYPE_COMPRATE,    DUMPTYPE_TAPE_SPLITSIZE,    DUMPTYPE_FALLBACK_SPLITSIZE,    DUMPTYPE_SPLIT_DISKBUFFER,    DUMPTYPE_RECORD,    DUMPTYPE_SKIP_INCR,    DUMPTYPE_SKIP_FULL,    DUMPTYPE_HOLDINGDISK,    DUMPTYPE_KENCRYPT,    DUMPTYPE_IGNORE,    DUMPTYPE_INDEX,    DUMPTYPE_DUMPTYPE /* sentinel */} dumptype_key;/* opaque object */typedef struct dumptype_s dumptype_t;/* Given the name of the dumptype, return a dumptype object.  Returns NULL * if no matching dumptype exists.  Note that the match is case-insensitive. * * @param identifier: name of the desired dumptype * @returns: object or NULL */dumptype_t *lookup_dumptype(char *identifier);/* Given a dumptype and a key, return a pointer to the corresponding val_t. * * @param dtyp: the dumptype to examine * @param key: dumptype_key (one of the TAPETYPE_* constants) * @returns: pointer to value */val_t *dumptype_getconf(dumptype_t *dtyp, dumptype_key key);/* Get the name of this dumptype. * * @param dtyp: the dumptype to examine * @returns: name of the dumptype */char *dumptype_name(dumptype_t *dtyp);/* (convenience macro) has this parameter been seen in this dumptype?  This * applies to the specific parameter *within* the dumptype. * * @param key: dumptype_key * @returns: boolean */#define dumptype_seen(dtyp, key)       (val_t_seen(dumptype_getconf((dtyp), (key))))/* (convenience macros) * fetch a particular parameter; caller must know the correct type. * * @param dtyp: the dumptype to examine * @returns: various */#define dumptype_get_comment(dtyp)             (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_COMMENT)))#define dumptype_get_program(dtyp)             (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_PROGRAM)))#define dumptype_get_srvcompprog(dtyp)         (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_SRVCOMPPROG)))#define dumptype_get_clntcompprog(dtyp)        (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_CLNTCOMPPROG)))#define dumptype_get_srv_encrypt(dtyp)         (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_SRV_ENCRYPT)))#define dumptype_get_clnt_encrypt(dtyp)        (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_CLNT_ENCRYPT)))#define dumptype_get_amandad_path(dtyp)        (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_AMANDAD_PATH)))#define dumptype_get_client_username(dtyp)     (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_CLIENT_USERNAME)))#define dumptype_get_ssh_keys(dtyp)            (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_SSH_KEYS)))#define dumptype_get_security_driver(dtyp)     (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_SECURITY_DRIVER)))#define dumptype_get_exclude(dtyp)             (val_t_to_exinclude(dumptype_getconf((dtyp), DUMPTYPE_EXCLUDE)))#define dumptype_get_include(dtyp)             (val_t_to_exinclude(dumptype_getconf((dtyp), DUMPTYPE_INCLUDE)))#define dumptype_get_priority(dtyp)            (val_t_to_priority(dumptype_getconf((dtyp), DUMPTYPE_PRIORITY)))#define dumptype_get_dumpcycle(dtyp)           (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_DUMPCYCLE)))#define dumptype_get_maxcycle(dtyp)            (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_MAXCYCLE)))#define dumptype_get_frequency(dtyp)           (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_FREQUENCY)))#define dumptype_get_maxdumps(dtyp)            (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_MAXDUMPS)))#define dumptype_get_maxpromoteday(dtyp)       (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_MAXPROMOTEDAY)))#define dumptype_get_bumppercent(dtyp)         (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_BUMPPERCENT)))#define dumptype_get_bumpsize(dtyp)            (val_t_to_am64(dumptype_getconf((dtyp), DUMPTYPE_BUMPSIZE)))#define dumptype_get_bumpdays(dtyp)            (val_t_to_int(dumptype_getconf((dtyp), DUMPTYPE_BUMPDAYS)))#define dumptype_get_bumpmult(dtyp)            (val_t_to_real(dumptype_getconf((dtyp), DUMPTYPE_BUMPMULT)))#define dumptype_get_starttime(dtyp)           (val_t_to_time(dumptype_getconf((dtyp), DUMPTYPE_STARTTIME)))#define dumptype_get_strategy(dtyp)            (val_t_to_strategy(dumptype_getconf((dtyp), DUMPTYPE_STRATEGY)))#define dumptype_get_estimate(dtyp)            (val_t_to_estimate(dumptype_getconf((dtyp), DUMPTYPE_ESTIMATE)))#define dumptype_get_compress(dtyp)            (val_t_to_compress(dumptype_getconf((dtyp), DUMPTYPE_COMPRESS)))#define dumptype_get_encrypt(dtyp)             (val_t_to_encrypt(dumptype_getconf((dtyp), DUMPTYPE_ENCRYPT)))#define dumptype_get_srv_decrypt_opt(dtyp)     (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_SRV_DECRYPT_OPT)))#define dumptype_get_clnt_decrypt_opt(dtyp)    (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_CLNT_DECRYPT_OPT)))#define dumptype_get_comprate(dtyp)            (val_t_to_rate(dumptype_getconf((dtyp), DUMPTYPE_COMPRATE)))#define dumptype_get_tape_splitsize(dtyp)      (val_t_to_am64(dumptype_getconf((dtyp), DUMPTYPE_TAPE_SPLITSIZE)))#define dumptype_get_fallback_splitsize(dtyp)  (val_t_to_am64(dumptype_getconf((dtyp), DUMPTYPE_FALLBACK_SPLITSIZE)))#define dumptype_get_split_diskbuffer(dtyp)    (val_t_to_str(dumptype_getconf((dtyp), DUMPTYPE_SPLIT_DISKBUFFER)))#define dumptype_get_record(dtyp)              (val_t_to_boolean(dumptype_getconf((dtyp), DUMPTYPE_RECORD)))#define dumptype_get_skip_incr(dtyp)           (val_t_to_boolean(dumptype_getconf((dtyp), DUMPTYPE_SKIP_INCR)))#define dumptype_get_skip_full(dtyp)           (val_t_to_boolean(dumptype_getconf((dtyp), DUMPTYPE_SKIP_FULL)))#define dumptype_get_to_holdingdisk(dtyp)      (val_t_to_holding(dumptype_getconf((dtyp), DUMPTYPE_HOLDINGDISK)))#define dumptype_get_kencrypt(dtyp)            (val_t_to_boolean(dumptype_getconf((dtyp), DUMPTYPE_KENCRYPT)))#define dumptype_get_ignore(dtyp)              (val_t_to_boolean(dumptype_getconf((dtyp), DUMPTYPE_IGNORE)))#define dumptype_get_index(dtyp)               (val_t_to_boolean(dumptype_getconf((dtyp), DUMPTYPE_INDEX)))/* * Interface parameter access */typedef enum {    INTER_COMMENT,    INTER_MAXUSAGE,    INTER_INTER /* sentinel */} interface_key;/* opaque object */typedef struct interface_s interface_t;/* Given the name of the interface, return a interface object.  Returns NULL * if no matching interface exists.  Note that the match is case-insensitive. * * @param identifier: name of the desired interface * @returns: object or NULL */interface_t *lookup_interface(char *identifier);/* Given a interface and a key, return a pointer to the corresponding val_t. * * @param iface: the interface to examine * @param key: interface_key (one of the TAPETYPE_* constants) * @returns: pointer to value */val_t *interface_getconf(interface_t *iface, interface_key key);/* Get the name of this interface.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -