1 # This file was automatically generated by SWIG (http://www.swig.org).
4 # Don't modify this file, modify the SWIG interface instead.
6 package Amanda::Config;
9 @ISA = qw(Exporter DynaLoader);
10 package Amanda::Configc;
11 bootstrap Amanda::Config;
12 package Amanda::Config;
15 # ---------- BASE METHODS -------------
17 package Amanda::Config;
20 my ($classname,$obj) = @_;
21 return bless $obj, $classname;
31 my ($self,$field) = @_;
32 my $member_func = "swig_${field}_get";
33 $self->$member_func();
37 my ($self,$field,$newval) = @_;
38 my $member_func = "swig_${field}_set";
39 $self->$member_func($newval);
48 # ------- FUNCTION WRAPPERS --------
50 package Amanda::Config;
52 *getconf = *Amanda::Configc::getconf;
53 *getconf_seen = *Amanda::Configc::getconf_seen;
54 *getconf_byname = *Amanda::Configc::getconf_byname;
55 *getconf_list = *Amanda::Configc::getconf_list;
56 *lookup_tapetype = *Amanda::Configc::lookup_tapetype;
57 *tapetype_getconf = *Amanda::Configc::tapetype_getconf;
58 *tapetype_name = *Amanda::Configc::tapetype_name;
59 *tapetype_seen = *Amanda::Configc::tapetype_seen;
60 *lookup_dumptype = *Amanda::Configc::lookup_dumptype;
61 *dumptype_getconf = *Amanda::Configc::dumptype_getconf;
62 *dumptype_name = *Amanda::Configc::dumptype_name;
63 *dumptype_seen = *Amanda::Configc::dumptype_seen;
64 *lookup_interface = *Amanda::Configc::lookup_interface;
65 *interface_getconf = *Amanda::Configc::interface_getconf;
66 *interface_name = *Amanda::Configc::interface_name;
67 *interface_seen = *Amanda::Configc::interface_seen;
68 *lookup_holdingdisk = *Amanda::Configc::lookup_holdingdisk;
69 *getconf_holdingdisks = *Amanda::Configc::getconf_holdingdisks;
70 *holdingdisk_next = *Amanda::Configc::holdingdisk_next;
71 *holdingdisk_getconf = *Amanda::Configc::holdingdisk_getconf;
72 *holdingdisk_name = *Amanda::Configc::holdingdisk_name;
73 *holdingdisk_seen = *Amanda::Configc::holdingdisk_seen;
74 *getconf_unit_divisor = *Amanda::Configc::getconf_unit_divisor;
75 *new_config_overwrites = *Amanda::Configc::new_config_overwrites;
76 *free_config_overwrites = *Amanda::Configc::free_config_overwrites;
77 *add_config_overwrite = *Amanda::Configc::add_config_overwrite;
78 *add_config_overwrite_opt = *Amanda::Configc::add_config_overwrite_opt;
79 *apply_config_overwrites = *Amanda::Configc::apply_config_overwrites;
80 *config_init = *Amanda::Configc::config_init;
81 *config_uninit = *Amanda::Configc::config_uninit;
82 *get_config_options = *Amanda::Configc::get_config_options;
83 *get_config_name = *Amanda::Configc::get_config_name;
84 *get_config_dir = *Amanda::Configc::get_config_dir;
85 *get_config_filename = *Amanda::Configc::get_config_filename;
86 *dump_configuration = *Amanda::Configc::dump_configuration;
87 *config_dir_relative = *Amanda::Configc::config_dir_relative;
88 *taperalgo2str = *Amanda::Configc::taperalgo2str;
89 *find_multiplier = *Amanda::Configc::find_multiplier;
91 # ------- VARIABLE STUBS --------
93 package Amanda::Config;
95 *CNF_ORG = *Amanda::Configc::CNF_ORG;
96 *CNF_CONF = *Amanda::Configc::CNF_CONF;
97 *CNF_INDEX_SERVER = *Amanda::Configc::CNF_INDEX_SERVER;
98 *CNF_TAPE_SERVER = *Amanda::Configc::CNF_TAPE_SERVER;
99 *CNF_AUTH = *Amanda::Configc::CNF_AUTH;
100 *CNF_SSH_KEYS = *Amanda::Configc::CNF_SSH_KEYS;
101 *CNF_AMANDAD_PATH = *Amanda::Configc::CNF_AMANDAD_PATH;
102 *CNF_CLIENT_USERNAME = *Amanda::Configc::CNF_CLIENT_USERNAME;
103 *CNF_GNUTAR_LIST_DIR = *Amanda::Configc::CNF_GNUTAR_LIST_DIR;
104 *CNF_AMANDATES = *Amanda::Configc::CNF_AMANDATES;
105 *CNF_MAILTO = *Amanda::Configc::CNF_MAILTO;
106 *CNF_DUMPUSER = *Amanda::Configc::CNF_DUMPUSER;
107 *CNF_TAPEDEV = *Amanda::Configc::CNF_TAPEDEV;
108 *CNF_DEVICE_PROPERTY = *Amanda::Configc::CNF_DEVICE_PROPERTY;
109 *CNF_CHANGERDEV = *Amanda::Configc::CNF_CHANGERDEV;
110 *CNF_CHANGERFILE = *Amanda::Configc::CNF_CHANGERFILE;
111 *CNF_LABELSTR = *Amanda::Configc::CNF_LABELSTR;
112 *CNF_TAPELIST = *Amanda::Configc::CNF_TAPELIST;
113 *CNF_DISKFILE = *Amanda::Configc::CNF_DISKFILE;
114 *CNF_INFOFILE = *Amanda::Configc::CNF_INFOFILE;
115 *CNF_LOGDIR = *Amanda::Configc::CNF_LOGDIR;
116 *CNF_INDEXDIR = *Amanda::Configc::CNF_INDEXDIR;
117 *CNF_TAPETYPE = *Amanda::Configc::CNF_TAPETYPE;
118 *CNF_DUMPCYCLE = *Amanda::Configc::CNF_DUMPCYCLE;
119 *CNF_RUNSPERCYCLE = *Amanda::Configc::CNF_RUNSPERCYCLE;
120 *CNF_TAPECYCLE = *Amanda::Configc::CNF_TAPECYCLE;
121 *CNF_NETUSAGE = *Amanda::Configc::CNF_NETUSAGE;
122 *CNF_INPARALLEL = *Amanda::Configc::CNF_INPARALLEL;
123 *CNF_DUMPORDER = *Amanda::Configc::CNF_DUMPORDER;
124 *CNF_BUMPPERCENT = *Amanda::Configc::CNF_BUMPPERCENT;
125 *CNF_BUMPSIZE = *Amanda::Configc::CNF_BUMPSIZE;
126 *CNF_BUMPMULT = *Amanda::Configc::CNF_BUMPMULT;
127 *CNF_BUMPDAYS = *Amanda::Configc::CNF_BUMPDAYS;
128 *CNF_TPCHANGER = *Amanda::Configc::CNF_TPCHANGER;
129 *CNF_RUNTAPES = *Amanda::Configc::CNF_RUNTAPES;
130 *CNF_MAXDUMPS = *Amanda::Configc::CNF_MAXDUMPS;
131 *CNF_ETIMEOUT = *Amanda::Configc::CNF_ETIMEOUT;
132 *CNF_DTIMEOUT = *Amanda::Configc::CNF_DTIMEOUT;
133 *CNF_CTIMEOUT = *Amanda::Configc::CNF_CTIMEOUT;
134 *CNF_TAPEBUFS = *Amanda::Configc::CNF_TAPEBUFS;
135 *CNF_DEVICE_OUTPUT_BUFFER_SIZE = *Amanda::Configc::CNF_DEVICE_OUTPUT_BUFFER_SIZE;
136 *CNF_PRINTER = *Amanda::Configc::CNF_PRINTER;
137 *CNF_AUTOFLUSH = *Amanda::Configc::CNF_AUTOFLUSH;
138 *CNF_RESERVE = *Amanda::Configc::CNF_RESERVE;
139 *CNF_MAXDUMPSIZE = *Amanda::Configc::CNF_MAXDUMPSIZE;
140 *CNF_COLUMNSPEC = *Amanda::Configc::CNF_COLUMNSPEC;
141 *CNF_AMRECOVER_DO_FSF = *Amanda::Configc::CNF_AMRECOVER_DO_FSF;
142 *CNF_AMRECOVER_CHECK_LABEL = *Amanda::Configc::CNF_AMRECOVER_CHECK_LABEL;
143 *CNF_AMRECOVER_CHANGER = *Amanda::Configc::CNF_AMRECOVER_CHANGER;
144 *CNF_TAPERALGO = *Amanda::Configc::CNF_TAPERALGO;
145 *CNF_FLUSH_THRESHOLD_DUMPED = *Amanda::Configc::CNF_FLUSH_THRESHOLD_DUMPED;
146 *CNF_FLUSH_THRESHOLD_SCHEDULED = *Amanda::Configc::CNF_FLUSH_THRESHOLD_SCHEDULED;
147 *CNF_TAPERFLUSH = *Amanda::Configc::CNF_TAPERFLUSH;
148 *CNF_DISPLAYUNIT = *Amanda::Configc::CNF_DISPLAYUNIT;
149 *CNF_KRB5KEYTAB = *Amanda::Configc::CNF_KRB5KEYTAB;
150 *CNF_KRB5PRINCIPAL = *Amanda::Configc::CNF_KRB5PRINCIPAL;
151 *CNF_LABEL_NEW_TAPES = *Amanda::Configc::CNF_LABEL_NEW_TAPES;
152 *CNF_USETIMESTAMPS = *Amanda::Configc::CNF_USETIMESTAMPS;
153 *CNF_REP_TRIES = *Amanda::Configc::CNF_REP_TRIES;
154 *CNF_CONNECT_TRIES = *Amanda::Configc::CNF_CONNECT_TRIES;
155 *CNF_REQ_TRIES = *Amanda::Configc::CNF_REQ_TRIES;
156 *CNF_DEBUG_AMANDAD = *Amanda::Configc::CNF_DEBUG_AMANDAD;
157 *CNF_DEBUG_AMIDXTAPED = *Amanda::Configc::CNF_DEBUG_AMIDXTAPED;
158 *CNF_DEBUG_AMINDEXD = *Amanda::Configc::CNF_DEBUG_AMINDEXD;
159 *CNF_DEBUG_AMRECOVER = *Amanda::Configc::CNF_DEBUG_AMRECOVER;
160 *CNF_DEBUG_AUTH = *Amanda::Configc::CNF_DEBUG_AUTH;
161 *CNF_DEBUG_EVENT = *Amanda::Configc::CNF_DEBUG_EVENT;
162 *CNF_DEBUG_HOLDING = *Amanda::Configc::CNF_DEBUG_HOLDING;
163 *CNF_DEBUG_PROTOCOL = *Amanda::Configc::CNF_DEBUG_PROTOCOL;
164 *CNF_DEBUG_PLANNER = *Amanda::Configc::CNF_DEBUG_PLANNER;
165 *CNF_DEBUG_DRIVER = *Amanda::Configc::CNF_DEBUG_DRIVER;
166 *CNF_DEBUG_DUMPER = *Amanda::Configc::CNF_DEBUG_DUMPER;
167 *CNF_DEBUG_CHUNKER = *Amanda::Configc::CNF_DEBUG_CHUNKER;
168 *CNF_DEBUG_TAPER = *Amanda::Configc::CNF_DEBUG_TAPER;
169 *CNF_DEBUG_SELFCHECK = *Amanda::Configc::CNF_DEBUG_SELFCHECK;
170 *CNF_DEBUG_SENDSIZE = *Amanda::Configc::CNF_DEBUG_SENDSIZE;
171 *CNF_DEBUG_SENDBACKUP = *Amanda::Configc::CNF_DEBUG_SENDBACKUP;
172 *CNF_RESERVED_UDP_PORT = *Amanda::Configc::CNF_RESERVED_UDP_PORT;
173 *CNF_RESERVED_TCP_PORT = *Amanda::Configc::CNF_RESERVED_TCP_PORT;
174 *CNF_UNRESERVED_TCP_PORT = *Amanda::Configc::CNF_UNRESERVED_TCP_PORT;
175 *TAPETYPE_COMMENT = *Amanda::Configc::TAPETYPE_COMMENT;
176 *TAPETYPE_LBL_TEMPL = *Amanda::Configc::TAPETYPE_LBL_TEMPL;
177 *TAPETYPE_BLOCKSIZE = *Amanda::Configc::TAPETYPE_BLOCKSIZE;
178 *TAPETYPE_READBLOCKSIZE = *Amanda::Configc::TAPETYPE_READBLOCKSIZE;
179 *TAPETYPE_LENGTH = *Amanda::Configc::TAPETYPE_LENGTH;
180 *TAPETYPE_FILEMARK = *Amanda::Configc::TAPETYPE_FILEMARK;
181 *TAPETYPE_SPEED = *Amanda::Configc::TAPETYPE_SPEED;
182 *TAPETYPE_FILE_PAD = *Amanda::Configc::TAPETYPE_FILE_PAD;
183 *DUMPTYPE_COMMENT = *Amanda::Configc::DUMPTYPE_COMMENT;
184 *DUMPTYPE_PROGRAM = *Amanda::Configc::DUMPTYPE_PROGRAM;
185 *DUMPTYPE_SRVCOMPPROG = *Amanda::Configc::DUMPTYPE_SRVCOMPPROG;
186 *DUMPTYPE_CLNTCOMPPROG = *Amanda::Configc::DUMPTYPE_CLNTCOMPPROG;
187 *DUMPTYPE_SRV_ENCRYPT = *Amanda::Configc::DUMPTYPE_SRV_ENCRYPT;
188 *DUMPTYPE_CLNT_ENCRYPT = *Amanda::Configc::DUMPTYPE_CLNT_ENCRYPT;
189 *DUMPTYPE_AMANDAD_PATH = *Amanda::Configc::DUMPTYPE_AMANDAD_PATH;
190 *DUMPTYPE_CLIENT_USERNAME = *Amanda::Configc::DUMPTYPE_CLIENT_USERNAME;
191 *DUMPTYPE_SSH_KEYS = *Amanda::Configc::DUMPTYPE_SSH_KEYS;
192 *DUMPTYPE_SECURITY_DRIVER = *Amanda::Configc::DUMPTYPE_SECURITY_DRIVER;
193 *DUMPTYPE_EXCLUDE = *Amanda::Configc::DUMPTYPE_EXCLUDE;
194 *DUMPTYPE_INCLUDE = *Amanda::Configc::DUMPTYPE_INCLUDE;
195 *DUMPTYPE_PRIORITY = *Amanda::Configc::DUMPTYPE_PRIORITY;
196 *DUMPTYPE_DUMPCYCLE = *Amanda::Configc::DUMPTYPE_DUMPCYCLE;
197 *DUMPTYPE_MAXDUMPS = *Amanda::Configc::DUMPTYPE_MAXDUMPS;
198 *DUMPTYPE_MAXPROMOTEDAY = *Amanda::Configc::DUMPTYPE_MAXPROMOTEDAY;
199 *DUMPTYPE_BUMPPERCENT = *Amanda::Configc::DUMPTYPE_BUMPPERCENT;
200 *DUMPTYPE_BUMPSIZE = *Amanda::Configc::DUMPTYPE_BUMPSIZE;
201 *DUMPTYPE_BUMPDAYS = *Amanda::Configc::DUMPTYPE_BUMPDAYS;
202 *DUMPTYPE_BUMPMULT = *Amanda::Configc::DUMPTYPE_BUMPMULT;
203 *DUMPTYPE_STARTTIME = *Amanda::Configc::DUMPTYPE_STARTTIME;
204 *DUMPTYPE_STRATEGY = *Amanda::Configc::DUMPTYPE_STRATEGY;
205 *DUMPTYPE_ESTIMATE = *Amanda::Configc::DUMPTYPE_ESTIMATE;
206 *DUMPTYPE_COMPRESS = *Amanda::Configc::DUMPTYPE_COMPRESS;
207 *DUMPTYPE_ENCRYPT = *Amanda::Configc::DUMPTYPE_ENCRYPT;
208 *DUMPTYPE_SRV_DECRYPT_OPT = *Amanda::Configc::DUMPTYPE_SRV_DECRYPT_OPT;
209 *DUMPTYPE_CLNT_DECRYPT_OPT = *Amanda::Configc::DUMPTYPE_CLNT_DECRYPT_OPT;
210 *DUMPTYPE_COMPRATE = *Amanda::Configc::DUMPTYPE_COMPRATE;
211 *DUMPTYPE_TAPE_SPLITSIZE = *Amanda::Configc::DUMPTYPE_TAPE_SPLITSIZE;
212 *DUMPTYPE_FALLBACK_SPLITSIZE = *Amanda::Configc::DUMPTYPE_FALLBACK_SPLITSIZE;
213 *DUMPTYPE_SPLIT_DISKBUFFER = *Amanda::Configc::DUMPTYPE_SPLIT_DISKBUFFER;
214 *DUMPTYPE_RECORD = *Amanda::Configc::DUMPTYPE_RECORD;
215 *DUMPTYPE_SKIP_INCR = *Amanda::Configc::DUMPTYPE_SKIP_INCR;
216 *DUMPTYPE_SKIP_FULL = *Amanda::Configc::DUMPTYPE_SKIP_FULL;
217 *DUMPTYPE_HOLDINGDISK = *Amanda::Configc::DUMPTYPE_HOLDINGDISK;
218 *DUMPTYPE_KENCRYPT = *Amanda::Configc::DUMPTYPE_KENCRYPT;
219 *DUMPTYPE_IGNORE = *Amanda::Configc::DUMPTYPE_IGNORE;
220 *DUMPTYPE_INDEX = *Amanda::Configc::DUMPTYPE_INDEX;
221 *INTER_COMMENT = *Amanda::Configc::INTER_COMMENT;
222 *INTER_MAXUSAGE = *Amanda::Configc::INTER_MAXUSAGE;
223 *HOLDING_COMMENT = *Amanda::Configc::HOLDING_COMMENT;
224 *HOLDING_DISKDIR = *Amanda::Configc::HOLDING_DISKDIR;
225 *HOLDING_DISKSIZE = *Amanda::Configc::HOLDING_DISKSIZE;
226 *HOLDING_CHUNKSIZE = *Amanda::Configc::HOLDING_CHUNKSIZE;
227 *HOLD_NEVER = *Amanda::Configc::HOLD_NEVER;
228 *HOLD_AUTO = *Amanda::Configc::HOLD_AUTO;
229 *HOLD_REQUIRED = *Amanda::Configc::HOLD_REQUIRED;
230 *COMP_NONE = *Amanda::Configc::COMP_NONE;
231 *COMP_FAST = *Amanda::Configc::COMP_FAST;
232 *COMP_BEST = *Amanda::Configc::COMP_BEST;
233 *COMP_CUST = *Amanda::Configc::COMP_CUST;
234 *COMP_SERVER_FAST = *Amanda::Configc::COMP_SERVER_FAST;
235 *COMP_SERVER_BEST = *Amanda::Configc::COMP_SERVER_BEST;
236 *COMP_SERVER_CUST = *Amanda::Configc::COMP_SERVER_CUST;
237 *ENCRYPT_NONE = *Amanda::Configc::ENCRYPT_NONE;
238 *ENCRYPT_CUST = *Amanda::Configc::ENCRYPT_CUST;
239 *ENCRYPT_SERV_CUST = *Amanda::Configc::ENCRYPT_SERV_CUST;
240 *DS_SKIP = *Amanda::Configc::DS_SKIP;
241 *DS_STANDARD = *Amanda::Configc::DS_STANDARD;
242 *DS_NOFULL = *Amanda::Configc::DS_NOFULL;
243 *DS_NOINC = *Amanda::Configc::DS_NOINC;
244 *DS_4 = *Amanda::Configc::DS_4;
245 *DS_5 = *Amanda::Configc::DS_5;
246 *DS_HANOI = *Amanda::Configc::DS_HANOI;
247 *DS_INCRONLY = *Amanda::Configc::DS_INCRONLY;
248 *ES_CLIENT = *Amanda::Configc::ES_CLIENT;
249 *ES_SERVER = *Amanda::Configc::ES_SERVER;
250 *ES_CALCSIZE = *Amanda::Configc::ES_CALCSIZE;
251 *ALGO_FIRST = *Amanda::Configc::ALGO_FIRST;
252 *ALGO_FIRSTFIT = *Amanda::Configc::ALGO_FIRSTFIT;
253 *ALGO_LARGEST = *Amanda::Configc::ALGO_LARGEST;
254 *ALGO_LARGESTFIT = *Amanda::Configc::ALGO_LARGESTFIT;
255 *ALGO_SMALLEST = *Amanda::Configc::ALGO_SMALLEST;
256 *ALGO_LAST = *Amanda::Configc::ALGO_LAST;
257 *debug_amandad = *Amanda::Configc::debug_amandad;
258 *debug_amidxtaped = *Amanda::Configc::debug_amidxtaped;
259 *debug_amindexd = *Amanda::Configc::debug_amindexd;
260 *debug_amrecover = *Amanda::Configc::debug_amrecover;
261 *debug_auth = *Amanda::Configc::debug_auth;
262 *debug_event = *Amanda::Configc::debug_event;
263 *debug_holding = *Amanda::Configc::debug_holding;
264 *debug_protocol = *Amanda::Configc::debug_protocol;
265 *debug_planner = *Amanda::Configc::debug_planner;
266 *debug_driver = *Amanda::Configc::debug_driver;
267 *debug_dumper = *Amanda::Configc::debug_dumper;
268 *debug_chunker = *Amanda::Configc::debug_chunker;
269 *debug_taper = *Amanda::Configc::debug_taper;
270 *debug_selfcheck = *Amanda::Configc::debug_selfcheck;
271 *debug_sendsize = *Amanda::Configc::debug_sendsize;
272 *debug_sendbackup = *Amanda::Configc::debug_sendbackup;
273 *CONFIG_INIT_EXPLICIT_NAME = *Amanda::Configc::CONFIG_INIT_EXPLICIT_NAME;
274 *CONFIG_INIT_USE_CWD = *Amanda::Configc::CONFIG_INIT_USE_CWD;
275 *CONFIG_INIT_CLIENT = *Amanda::Configc::CONFIG_INIT_CLIENT;
276 *CONFIG_INIT_OVERLAY = *Amanda::Configc::CONFIG_INIT_OVERLAY;
277 *CONFIG_INIT_FATAL = *Amanda::Configc::CONFIG_INIT_FATAL;
284 Amanda::Config - access to Amanda configuration parameters
288 use Amanda::Config qw( :init :getconf );
290 config_init($CONFIG_INIT_EXPLICIT_NAME, $ARGV[1])
291 or die("errors processing config file " . $Amanda::Config::get_config_filename());
293 print "tape device is ", getconf($CNF_TAPEDEV), "\n";
295 This API closely parallels the C API. See F<conffile.h> for details
296 on the functions and constants available here.
302 =head1 INITIALIZATION
304 The Amanda configuration is treated as a global state for the
305 application. It is not possible to load two configurations
308 All initialization-related symbols can be imported with the tag
311 =head2 LOADING CONFIGURATION
313 The Amanda configuration is loaded with the aptly named
314 C<config_init($flags, $name)>. Because of the great variety in
315 invocation method among Amanda applications, this function has a number
316 of flags that affect its behavior. These flags can be OR'd together.
320 =item If C<CONFIG_INIT_EXPLICIT_NAME> is given, then the C<$name>
321 parameter can contain the name of a configuration to load.
323 =item If C<CONFIG_INIT_USE_CWD> is given, and if the current directory
324 contains C<amanda.conf>, then that file is loaded.
326 =item If C<CONFIG_INIT_CLIENT> is given, then a client configuration
329 =item If C<CONFIG_INIT_OVERLAY> is given, then any existing
330 configuration is not reset.
332 =item If C<CONFIG_INIT_FATAL> is given, then any errors are considered
333 fatal, and C<config_init> does not return.
337 See C<conffile.h> for more detailed information on these flags and
340 C<config_uninit()> reverses the effects of C<config_init>. It is
343 Once the configuration is loaded, the configuration name
344 (e.g., "DailySet1"), directory (C</etc/amanda/DailySet1>),
345 and filename (C</etc/amanda/DailySet1/amanda.conf>) are
346 available from C<get_config_name()>, C<get_config_dir()>, and
347 C<get_config_filename()>, respectively.
349 =head2 CONFIG OVERWRITES
351 Most Amanda applications accept the command-line option C<-o>
352 to "overwrite" configuration values in C<amanda.conf>. In Perl
353 applications, these options should be parsed with L<Getopt::Long|Getopt::Long>, with
354 the action being a call to C<add_config_overwrite_opt>. For example:
356 my $config_overwrites = new_config_overwrites($#ARGV+1);
359 'o=s' => sub { add_config_overwrite_opt($config_overwrites, $_[1]); },
361 my $cfg_ok = config_init($CONFIG_INIT_EXPLICIT_NAME | $CONFIG_INIT_USE_CWD, $config_name);
362 apply_config_overwrites($config_overwrites);
364 C<new_config_overwrites($size_estimate)> creates a new
365 overwrites object, using the given size as an estimate of
366 the number of items it will contain (C<$#ARGC/2> is a good
367 estimate). Individual configuration options are then added via
368 C<add_config_overwrite($co, $key, $value)> (which takes a key/value
369 pair) or C<add_config_overwrite_opt($co, $optarg)>, which parses a
370 string following C<-o> on the command line.
372 Once the overwrites are gathered, they are applied with
373 C<apply_config_overwrites($co)>, which applies the overwrites to the
374 active configuration. No further operations can be performed on the
375 overwrites object after C<apply_config_overwrites> has been called.
377 The utility function C<get_config_options()> returns a list of
378 command-line arguments to represent any overwrites that were used
379 to generate the current configuration. (TODO: this function isn't
382 =head1 PARAMETER ACCESS
384 Amanda configurations consist of "global" parameters and several
385 sets of "subsections" -- one set for dumptypes, one for tapetypes,
388 All of the global parameters are represented by a constant beginning
389 with C<$CNF_>, e.g., C<$CNF_LABELSTR>. The function C<getconf($cnf)>
390 returns the value of parameter C<$cnf>, in whatever format is
391 appropriate for the parameter. C<getconf_seen($cnf)> returns a true
392 value if C<$cnf> was seen in the configuration file. If it was not
393 seen, then it will have its default value.
395 Some parameters have enumerated types. The values for those
396 enumerations are available from this module with the same name as
397 in C<conffile.h>. For example, C<$CNF_TAPERALGO> will yield a value
398 from the enumeration C<taperalgo_t>, the constants for which all
399 begin with C<$ALGO_>. See C<conffile.h> for the details.
401 Each subsection type has the following functions:
405 =item C<lookup_TYP($subsec_name)>
407 which returns an opaque object
408 (C<$ss>) representing the subsection, or C<undef> if no subsection
409 with that name exists;
411 =item C<TYP_name($ss)>
413 returning the name of the subsection;
415 =item C<TYP_getconf($ss, $cnf)>
417 which fetches a parameter value from C<$ss>; and
419 =item C<TYP_seen($ss, $cnf)>
421 which returns a true value if <$cnf> was seen in the subsection.
431 with constants beginning with C<$TAPETYPE_>
435 with constants beginning with C<$DUMPTYPE_>
439 with constants beginning with C<$HOLDING_>
443 with constants beginning with C<$APPLICATION_>
447 with constants beginning with C<$PP_SCRIPT_>
451 See C<conffile.h> for the names of the constants themselves.
453 Parameter values are available by name from C<getconf_byname($name)>.
454 This function implements the C<TYP:NAME:PARAM> syntax advertised by
455 C<amgetconf> to access values in subsections. C<getconf_list($typ)>
456 returns a list of the names of all subsections of the given type.
458 The C<$CNF_DISPLAYUNIT> implies a certain divisor to convert from
459 kilobytes to the desired unit. This divisor is available from
460 C<getconf_unit_divisor()>. Note carefully that it is a I<divisor>
461 for a value in I<kilobytes>!
463 Finally, various subsections of Amanda enable verbose debugging via
464 configuration parameters. The status of each parameter is available
465 a similarly-named variable, e.g., C<$debug_auth>.
467 All parameter access functions and constants can be imported with
472 These functions defy categorization.
474 The function C<config_dir_relative> will interpret a path relative to
475 the current configuration directory. Absolute paths are passed through
476 unchanged, while relative paths are converted to absolute paths.
478 C<dump_configuration()> dumps the current configuration, in a format
479 suitable for re-evaluation for this module, to standard output.
480 This function may be revised to return a string.
482 Several parts of Amanda need to convert unit modifier value like
483 "gbytes" to a multiplier. The function C<find_multiplier($str)>
484 returns the unit multiplier for such a string. For example, "mbytes"
485 is converted to 1048576 (1024*1024).
489 push @EXPORT_OK, qw(confparm_key_to_string);
490 push @{$EXPORT_TAGS{"confparm_key"}}, qw(confparm_key_to_string);
492 my %_confparm_key_VALUES;
493 #Convert an enum value to a single string
494 sub confparm_key_to_string {
497 for my $k (keys %_confparm_key_VALUES) {
498 my $v = $_confparm_key_VALUES{$k};
500 #is this a matching flag?
501 if ($enumval == $v) {
506 #default, just return the number
510 push @EXPORT_OK, qw($CNF_ORG);
511 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_ORG);
513 $_confparm_key_VALUES{"CNF_ORG"} = $CNF_ORG;
515 push @EXPORT_OK, qw($CNF_CONF);
516 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CONF);
518 $_confparm_key_VALUES{"CNF_CONF"} = $CNF_CONF;
520 push @EXPORT_OK, qw($CNF_INDEX_SERVER);
521 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INDEX_SERVER);
523 $_confparm_key_VALUES{"CNF_INDEX_SERVER"} = $CNF_INDEX_SERVER;
525 push @EXPORT_OK, qw($CNF_TAPE_SERVER);
526 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPE_SERVER);
528 $_confparm_key_VALUES{"CNF_TAPE_SERVER"} = $CNF_TAPE_SERVER;
530 push @EXPORT_OK, qw($CNF_AUTH);
531 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AUTH);
533 $_confparm_key_VALUES{"CNF_AUTH"} = $CNF_AUTH;
535 push @EXPORT_OK, qw($CNF_SSH_KEYS);
536 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_SSH_KEYS);
538 $_confparm_key_VALUES{"CNF_SSH_KEYS"} = $CNF_SSH_KEYS;
540 push @EXPORT_OK, qw($CNF_AMANDAD_PATH);
541 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMANDAD_PATH);
543 $_confparm_key_VALUES{"CNF_AMANDAD_PATH"} = $CNF_AMANDAD_PATH;
545 push @EXPORT_OK, qw($CNF_CLIENT_USERNAME);
546 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CLIENT_USERNAME);
548 $_confparm_key_VALUES{"CNF_CLIENT_USERNAME"} = $CNF_CLIENT_USERNAME;
550 push @EXPORT_OK, qw($CNF_GNUTAR_LIST_DIR);
551 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_GNUTAR_LIST_DIR);
553 $_confparm_key_VALUES{"CNF_GNUTAR_LIST_DIR"} = $CNF_GNUTAR_LIST_DIR;
555 push @EXPORT_OK, qw($CNF_AMANDATES);
556 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMANDATES);
558 $_confparm_key_VALUES{"CNF_AMANDATES"} = $CNF_AMANDATES;
560 push @EXPORT_OK, qw($CNF_MAILTO);
561 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_MAILTO);
563 $_confparm_key_VALUES{"CNF_MAILTO"} = $CNF_MAILTO;
565 push @EXPORT_OK, qw($CNF_DUMPUSER);
566 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DUMPUSER);
568 $_confparm_key_VALUES{"CNF_DUMPUSER"} = $CNF_DUMPUSER;
570 push @EXPORT_OK, qw($CNF_TAPEDEV);
571 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPEDEV);
573 $_confparm_key_VALUES{"CNF_TAPEDEV"} = $CNF_TAPEDEV;
575 push @EXPORT_OK, qw($CNF_DEVICE_PROPERTY);
576 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEVICE_PROPERTY);
578 $_confparm_key_VALUES{"CNF_DEVICE_PROPERTY"} = $CNF_DEVICE_PROPERTY;
580 push @EXPORT_OK, qw($CNF_CHANGERDEV);
581 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CHANGERDEV);
583 $_confparm_key_VALUES{"CNF_CHANGERDEV"} = $CNF_CHANGERDEV;
585 push @EXPORT_OK, qw($CNF_CHANGERFILE);
586 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CHANGERFILE);
588 $_confparm_key_VALUES{"CNF_CHANGERFILE"} = $CNF_CHANGERFILE;
590 push @EXPORT_OK, qw($CNF_LABELSTR);
591 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_LABELSTR);
593 $_confparm_key_VALUES{"CNF_LABELSTR"} = $CNF_LABELSTR;
595 push @EXPORT_OK, qw($CNF_TAPELIST);
596 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPELIST);
598 $_confparm_key_VALUES{"CNF_TAPELIST"} = $CNF_TAPELIST;
600 push @EXPORT_OK, qw($CNF_DISKFILE);
601 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DISKFILE);
603 $_confparm_key_VALUES{"CNF_DISKFILE"} = $CNF_DISKFILE;
605 push @EXPORT_OK, qw($CNF_INFOFILE);
606 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INFOFILE);
608 $_confparm_key_VALUES{"CNF_INFOFILE"} = $CNF_INFOFILE;
610 push @EXPORT_OK, qw($CNF_LOGDIR);
611 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_LOGDIR);
613 $_confparm_key_VALUES{"CNF_LOGDIR"} = $CNF_LOGDIR;
615 push @EXPORT_OK, qw($CNF_INDEXDIR);
616 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INDEXDIR);
618 $_confparm_key_VALUES{"CNF_INDEXDIR"} = $CNF_INDEXDIR;
620 push @EXPORT_OK, qw($CNF_TAPETYPE);
621 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPETYPE);
623 $_confparm_key_VALUES{"CNF_TAPETYPE"} = $CNF_TAPETYPE;
625 push @EXPORT_OK, qw($CNF_DUMPCYCLE);
626 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DUMPCYCLE);
628 $_confparm_key_VALUES{"CNF_DUMPCYCLE"} = $CNF_DUMPCYCLE;
630 push @EXPORT_OK, qw($CNF_RUNSPERCYCLE);
631 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RUNSPERCYCLE);
633 $_confparm_key_VALUES{"CNF_RUNSPERCYCLE"} = $CNF_RUNSPERCYCLE;
635 push @EXPORT_OK, qw($CNF_TAPECYCLE);
636 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPECYCLE);
638 $_confparm_key_VALUES{"CNF_TAPECYCLE"} = $CNF_TAPECYCLE;
640 push @EXPORT_OK, qw($CNF_NETUSAGE);
641 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_NETUSAGE);
643 $_confparm_key_VALUES{"CNF_NETUSAGE"} = $CNF_NETUSAGE;
645 push @EXPORT_OK, qw($CNF_INPARALLEL);
646 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INPARALLEL);
648 $_confparm_key_VALUES{"CNF_INPARALLEL"} = $CNF_INPARALLEL;
650 push @EXPORT_OK, qw($CNF_DUMPORDER);
651 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DUMPORDER);
653 $_confparm_key_VALUES{"CNF_DUMPORDER"} = $CNF_DUMPORDER;
655 push @EXPORT_OK, qw($CNF_BUMPPERCENT);
656 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPPERCENT);
658 $_confparm_key_VALUES{"CNF_BUMPPERCENT"} = $CNF_BUMPPERCENT;
660 push @EXPORT_OK, qw($CNF_BUMPSIZE);
661 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPSIZE);
663 $_confparm_key_VALUES{"CNF_BUMPSIZE"} = $CNF_BUMPSIZE;
665 push @EXPORT_OK, qw($CNF_BUMPMULT);
666 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPMULT);
668 $_confparm_key_VALUES{"CNF_BUMPMULT"} = $CNF_BUMPMULT;
670 push @EXPORT_OK, qw($CNF_BUMPDAYS);
671 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPDAYS);
673 $_confparm_key_VALUES{"CNF_BUMPDAYS"} = $CNF_BUMPDAYS;
675 push @EXPORT_OK, qw($CNF_TPCHANGER);
676 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TPCHANGER);
678 $_confparm_key_VALUES{"CNF_TPCHANGER"} = $CNF_TPCHANGER;
680 push @EXPORT_OK, qw($CNF_RUNTAPES);
681 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RUNTAPES);
683 $_confparm_key_VALUES{"CNF_RUNTAPES"} = $CNF_RUNTAPES;
685 push @EXPORT_OK, qw($CNF_MAXDUMPS);
686 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_MAXDUMPS);
688 $_confparm_key_VALUES{"CNF_MAXDUMPS"} = $CNF_MAXDUMPS;
690 push @EXPORT_OK, qw($CNF_ETIMEOUT);
691 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_ETIMEOUT);
693 $_confparm_key_VALUES{"CNF_ETIMEOUT"} = $CNF_ETIMEOUT;
695 push @EXPORT_OK, qw($CNF_DTIMEOUT);
696 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DTIMEOUT);
698 $_confparm_key_VALUES{"CNF_DTIMEOUT"} = $CNF_DTIMEOUT;
700 push @EXPORT_OK, qw($CNF_CTIMEOUT);
701 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CTIMEOUT);
703 $_confparm_key_VALUES{"CNF_CTIMEOUT"} = $CNF_CTIMEOUT;
705 push @EXPORT_OK, qw($CNF_TAPEBUFS);
706 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPEBUFS);
708 $_confparm_key_VALUES{"CNF_TAPEBUFS"} = $CNF_TAPEBUFS;
710 push @EXPORT_OK, qw($CNF_DEVICE_OUTPUT_BUFFER_SIZE);
711 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEVICE_OUTPUT_BUFFER_SIZE);
713 $_confparm_key_VALUES{"CNF_DEVICE_OUTPUT_BUFFER_SIZE"} = $CNF_DEVICE_OUTPUT_BUFFER_SIZE;
715 push @EXPORT_OK, qw($CNF_PRINTER);
716 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_PRINTER);
718 $_confparm_key_VALUES{"CNF_PRINTER"} = $CNF_PRINTER;
720 push @EXPORT_OK, qw($CNF_AUTOFLUSH);
721 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AUTOFLUSH);
723 $_confparm_key_VALUES{"CNF_AUTOFLUSH"} = $CNF_AUTOFLUSH;
725 push @EXPORT_OK, qw($CNF_RESERVE);
726 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RESERVE);
728 $_confparm_key_VALUES{"CNF_RESERVE"} = $CNF_RESERVE;
730 push @EXPORT_OK, qw($CNF_MAXDUMPSIZE);
731 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_MAXDUMPSIZE);
733 $_confparm_key_VALUES{"CNF_MAXDUMPSIZE"} = $CNF_MAXDUMPSIZE;
735 push @EXPORT_OK, qw($CNF_COLUMNSPEC);
736 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_COLUMNSPEC);
738 $_confparm_key_VALUES{"CNF_COLUMNSPEC"} = $CNF_COLUMNSPEC;
740 push @EXPORT_OK, qw($CNF_AMRECOVER_DO_FSF);
741 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMRECOVER_DO_FSF);
743 $_confparm_key_VALUES{"CNF_AMRECOVER_DO_FSF"} = $CNF_AMRECOVER_DO_FSF;
745 push @EXPORT_OK, qw($CNF_AMRECOVER_CHECK_LABEL);
746 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMRECOVER_CHECK_LABEL);
748 $_confparm_key_VALUES{"CNF_AMRECOVER_CHECK_LABEL"} = $CNF_AMRECOVER_CHECK_LABEL;
750 push @EXPORT_OK, qw($CNF_AMRECOVER_CHANGER);
751 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMRECOVER_CHANGER);
753 $_confparm_key_VALUES{"CNF_AMRECOVER_CHANGER"} = $CNF_AMRECOVER_CHANGER;
755 push @EXPORT_OK, qw($CNF_TAPERALGO);
756 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPERALGO);
758 $_confparm_key_VALUES{"CNF_TAPERALGO"} = $CNF_TAPERALGO;
760 push @EXPORT_OK, qw($CNF_FLUSH_THRESHOLD_DUMPED);
761 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_FLUSH_THRESHOLD_DUMPED);
763 $_confparm_key_VALUES{"CNF_FLUSH_THRESHOLD_DUMPED"} = $CNF_FLUSH_THRESHOLD_DUMPED;
765 push @EXPORT_OK, qw($CNF_FLUSH_THRESHOLD_SCHEDULED);
766 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_FLUSH_THRESHOLD_SCHEDULED);
768 $_confparm_key_VALUES{"CNF_FLUSH_THRESHOLD_SCHEDULED"} = $CNF_FLUSH_THRESHOLD_SCHEDULED;
770 push @EXPORT_OK, qw($CNF_TAPERFLUSH);
771 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPERFLUSH);
773 $_confparm_key_VALUES{"CNF_TAPERFLUSH"} = $CNF_TAPERFLUSH;
775 push @EXPORT_OK, qw($CNF_DISPLAYUNIT);
776 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DISPLAYUNIT);
778 $_confparm_key_VALUES{"CNF_DISPLAYUNIT"} = $CNF_DISPLAYUNIT;
780 push @EXPORT_OK, qw($CNF_KRB5KEYTAB);
781 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_KRB5KEYTAB);
783 $_confparm_key_VALUES{"CNF_KRB5KEYTAB"} = $CNF_KRB5KEYTAB;
785 push @EXPORT_OK, qw($CNF_KRB5PRINCIPAL);
786 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_KRB5PRINCIPAL);
788 $_confparm_key_VALUES{"CNF_KRB5PRINCIPAL"} = $CNF_KRB5PRINCIPAL;
790 push @EXPORT_OK, qw($CNF_LABEL_NEW_TAPES);
791 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_LABEL_NEW_TAPES);
793 $_confparm_key_VALUES{"CNF_LABEL_NEW_TAPES"} = $CNF_LABEL_NEW_TAPES;
795 push @EXPORT_OK, qw($CNF_USETIMESTAMPS);
796 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_USETIMESTAMPS);
798 $_confparm_key_VALUES{"CNF_USETIMESTAMPS"} = $CNF_USETIMESTAMPS;
800 push @EXPORT_OK, qw($CNF_REP_TRIES);
801 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_REP_TRIES);
803 $_confparm_key_VALUES{"CNF_REP_TRIES"} = $CNF_REP_TRIES;
805 push @EXPORT_OK, qw($CNF_CONNECT_TRIES);
806 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CONNECT_TRIES);
808 $_confparm_key_VALUES{"CNF_CONNECT_TRIES"} = $CNF_CONNECT_TRIES;
810 push @EXPORT_OK, qw($CNF_REQ_TRIES);
811 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_REQ_TRIES);
813 $_confparm_key_VALUES{"CNF_REQ_TRIES"} = $CNF_REQ_TRIES;
815 push @EXPORT_OK, qw($CNF_DEBUG_AMANDAD);
816 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMANDAD);
818 $_confparm_key_VALUES{"CNF_DEBUG_AMANDAD"} = $CNF_DEBUG_AMANDAD;
820 push @EXPORT_OK, qw($CNF_DEBUG_AMIDXTAPED);
821 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMIDXTAPED);
823 $_confparm_key_VALUES{"CNF_DEBUG_AMIDXTAPED"} = $CNF_DEBUG_AMIDXTAPED;
825 push @EXPORT_OK, qw($CNF_DEBUG_AMINDEXD);
826 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMINDEXD);
828 $_confparm_key_VALUES{"CNF_DEBUG_AMINDEXD"} = $CNF_DEBUG_AMINDEXD;
830 push @EXPORT_OK, qw($CNF_DEBUG_AMRECOVER);
831 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMRECOVER);
833 $_confparm_key_VALUES{"CNF_DEBUG_AMRECOVER"} = $CNF_DEBUG_AMRECOVER;
835 push @EXPORT_OK, qw($CNF_DEBUG_AUTH);
836 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AUTH);
838 $_confparm_key_VALUES{"CNF_DEBUG_AUTH"} = $CNF_DEBUG_AUTH;
840 push @EXPORT_OK, qw($CNF_DEBUG_EVENT);
841 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_EVENT);
843 $_confparm_key_VALUES{"CNF_DEBUG_EVENT"} = $CNF_DEBUG_EVENT;
845 push @EXPORT_OK, qw($CNF_DEBUG_HOLDING);
846 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_HOLDING);
848 $_confparm_key_VALUES{"CNF_DEBUG_HOLDING"} = $CNF_DEBUG_HOLDING;
850 push @EXPORT_OK, qw($CNF_DEBUG_PROTOCOL);
851 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_PROTOCOL);
853 $_confparm_key_VALUES{"CNF_DEBUG_PROTOCOL"} = $CNF_DEBUG_PROTOCOL;
855 push @EXPORT_OK, qw($CNF_DEBUG_PLANNER);
856 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_PLANNER);
858 $_confparm_key_VALUES{"CNF_DEBUG_PLANNER"} = $CNF_DEBUG_PLANNER;
860 push @EXPORT_OK, qw($CNF_DEBUG_DRIVER);
861 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_DRIVER);
863 $_confparm_key_VALUES{"CNF_DEBUG_DRIVER"} = $CNF_DEBUG_DRIVER;
865 push @EXPORT_OK, qw($CNF_DEBUG_DUMPER);
866 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_DUMPER);
868 $_confparm_key_VALUES{"CNF_DEBUG_DUMPER"} = $CNF_DEBUG_DUMPER;
870 push @EXPORT_OK, qw($CNF_DEBUG_CHUNKER);
871 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_CHUNKER);
873 $_confparm_key_VALUES{"CNF_DEBUG_CHUNKER"} = $CNF_DEBUG_CHUNKER;
875 push @EXPORT_OK, qw($CNF_DEBUG_TAPER);
876 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_TAPER);
878 $_confparm_key_VALUES{"CNF_DEBUG_TAPER"} = $CNF_DEBUG_TAPER;
880 push @EXPORT_OK, qw($CNF_DEBUG_SELFCHECK);
881 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_SELFCHECK);
883 $_confparm_key_VALUES{"CNF_DEBUG_SELFCHECK"} = $CNF_DEBUG_SELFCHECK;
885 push @EXPORT_OK, qw($CNF_DEBUG_SENDSIZE);
886 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_SENDSIZE);
888 $_confparm_key_VALUES{"CNF_DEBUG_SENDSIZE"} = $CNF_DEBUG_SENDSIZE;
890 push @EXPORT_OK, qw($CNF_DEBUG_SENDBACKUP);
891 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_SENDBACKUP);
893 $_confparm_key_VALUES{"CNF_DEBUG_SENDBACKUP"} = $CNF_DEBUG_SENDBACKUP;
895 push @EXPORT_OK, qw($CNF_RESERVED_UDP_PORT);
896 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RESERVED_UDP_PORT);
898 $_confparm_key_VALUES{"CNF_RESERVED_UDP_PORT"} = $CNF_RESERVED_UDP_PORT;
900 push @EXPORT_OK, qw($CNF_RESERVED_TCP_PORT);
901 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RESERVED_TCP_PORT);
903 $_confparm_key_VALUES{"CNF_RESERVED_TCP_PORT"} = $CNF_RESERVED_TCP_PORT;
905 push @EXPORT_OK, qw($CNF_UNRESERVED_TCP_PORT);
906 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_UNRESERVED_TCP_PORT);
908 $_confparm_key_VALUES{"CNF_UNRESERVED_TCP_PORT"} = $CNF_UNRESERVED_TCP_PORT;
910 #copy symbols in confparm_key to getconf
911 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"confparm_key"}};
913 push @EXPORT_OK, qw(tapetype_key_to_string);
914 push @{$EXPORT_TAGS{"tapetype_key"}}, qw(tapetype_key_to_string);
916 my %_tapetype_key_VALUES;
917 #Convert an enum value to a single string
918 sub tapetype_key_to_string {
921 for my $k (keys %_tapetype_key_VALUES) {
922 my $v = $_tapetype_key_VALUES{$k};
924 #is this a matching flag?
925 if ($enumval == $v) {
930 #default, just return the number
934 push @EXPORT_OK, qw($TAPETYPE_COMMENT);
935 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_COMMENT);
937 $_tapetype_key_VALUES{"TAPETYPE_COMMENT"} = $TAPETYPE_COMMENT;
939 push @EXPORT_OK, qw($TAPETYPE_LBL_TEMPL);
940 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_LBL_TEMPL);
942 $_tapetype_key_VALUES{"TAPETYPE_LBL_TEMPL"} = $TAPETYPE_LBL_TEMPL;
944 push @EXPORT_OK, qw($TAPETYPE_BLOCKSIZE);
945 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_BLOCKSIZE);
947 $_tapetype_key_VALUES{"TAPETYPE_BLOCKSIZE"} = $TAPETYPE_BLOCKSIZE;
949 push @EXPORT_OK, qw($TAPETYPE_READBLOCKSIZE);
950 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_READBLOCKSIZE);
952 $_tapetype_key_VALUES{"TAPETYPE_READBLOCKSIZE"} = $TAPETYPE_READBLOCKSIZE;
954 push @EXPORT_OK, qw($TAPETYPE_LENGTH);
955 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_LENGTH);
957 $_tapetype_key_VALUES{"TAPETYPE_LENGTH"} = $TAPETYPE_LENGTH;
959 push @EXPORT_OK, qw($TAPETYPE_FILEMARK);
960 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_FILEMARK);
962 $_tapetype_key_VALUES{"TAPETYPE_FILEMARK"} = $TAPETYPE_FILEMARK;
964 push @EXPORT_OK, qw($TAPETYPE_SPEED);
965 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_SPEED);
967 $_tapetype_key_VALUES{"TAPETYPE_SPEED"} = $TAPETYPE_SPEED;
969 push @EXPORT_OK, qw($TAPETYPE_FILE_PAD);
970 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_FILE_PAD);
972 $_tapetype_key_VALUES{"TAPETYPE_FILE_PAD"} = $TAPETYPE_FILE_PAD;
974 #copy symbols in tapetype_key to getconf
975 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"tapetype_key"}};
977 push @EXPORT_OK, qw(dumptype_key_to_string);
978 push @{$EXPORT_TAGS{"dumptype_key"}}, qw(dumptype_key_to_string);
980 my %_dumptype_key_VALUES;
981 #Convert an enum value to a single string
982 sub dumptype_key_to_string {
985 for my $k (keys %_dumptype_key_VALUES) {
986 my $v = $_dumptype_key_VALUES{$k};
988 #is this a matching flag?
989 if ($enumval == $v) {
994 #default, just return the number
998 push @EXPORT_OK, qw($DUMPTYPE_COMMENT);
999 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_COMMENT);
1001 $_dumptype_key_VALUES{"DUMPTYPE_COMMENT"} = $DUMPTYPE_COMMENT;
1003 push @EXPORT_OK, qw($DUMPTYPE_PROGRAM);
1004 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_PROGRAM);
1006 $_dumptype_key_VALUES{"DUMPTYPE_PROGRAM"} = $DUMPTYPE_PROGRAM;
1008 push @EXPORT_OK, qw($DUMPTYPE_SRVCOMPPROG);
1009 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SRVCOMPPROG);
1011 $_dumptype_key_VALUES{"DUMPTYPE_SRVCOMPPROG"} = $DUMPTYPE_SRVCOMPPROG;
1013 push @EXPORT_OK, qw($DUMPTYPE_CLNTCOMPPROG);
1014 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLNTCOMPPROG);
1016 $_dumptype_key_VALUES{"DUMPTYPE_CLNTCOMPPROG"} = $DUMPTYPE_CLNTCOMPPROG;
1018 push @EXPORT_OK, qw($DUMPTYPE_SRV_ENCRYPT);
1019 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SRV_ENCRYPT);
1021 $_dumptype_key_VALUES{"DUMPTYPE_SRV_ENCRYPT"} = $DUMPTYPE_SRV_ENCRYPT;
1023 push @EXPORT_OK, qw($DUMPTYPE_CLNT_ENCRYPT);
1024 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLNT_ENCRYPT);
1026 $_dumptype_key_VALUES{"DUMPTYPE_CLNT_ENCRYPT"} = $DUMPTYPE_CLNT_ENCRYPT;
1028 push @EXPORT_OK, qw($DUMPTYPE_AMANDAD_PATH);
1029 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_AMANDAD_PATH);
1031 $_dumptype_key_VALUES{"DUMPTYPE_AMANDAD_PATH"} = $DUMPTYPE_AMANDAD_PATH;
1033 push @EXPORT_OK, qw($DUMPTYPE_CLIENT_USERNAME);
1034 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLIENT_USERNAME);
1036 $_dumptype_key_VALUES{"DUMPTYPE_CLIENT_USERNAME"} = $DUMPTYPE_CLIENT_USERNAME;
1038 push @EXPORT_OK, qw($DUMPTYPE_SSH_KEYS);
1039 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SSH_KEYS);
1041 $_dumptype_key_VALUES{"DUMPTYPE_SSH_KEYS"} = $DUMPTYPE_SSH_KEYS;
1043 push @EXPORT_OK, qw($DUMPTYPE_SECURITY_DRIVER);
1044 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SECURITY_DRIVER);
1046 $_dumptype_key_VALUES{"DUMPTYPE_SECURITY_DRIVER"} = $DUMPTYPE_SECURITY_DRIVER;
1048 push @EXPORT_OK, qw($DUMPTYPE_EXCLUDE);
1049 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_EXCLUDE);
1051 $_dumptype_key_VALUES{"DUMPTYPE_EXCLUDE"} = $DUMPTYPE_EXCLUDE;
1053 push @EXPORT_OK, qw($DUMPTYPE_INCLUDE);
1054 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_INCLUDE);
1056 $_dumptype_key_VALUES{"DUMPTYPE_INCLUDE"} = $DUMPTYPE_INCLUDE;
1058 push @EXPORT_OK, qw($DUMPTYPE_PRIORITY);
1059 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_PRIORITY);
1061 $_dumptype_key_VALUES{"DUMPTYPE_PRIORITY"} = $DUMPTYPE_PRIORITY;
1063 push @EXPORT_OK, qw($DUMPTYPE_DUMPCYCLE);
1064 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_DUMPCYCLE);
1066 $_dumptype_key_VALUES{"DUMPTYPE_DUMPCYCLE"} = $DUMPTYPE_DUMPCYCLE;
1068 push @EXPORT_OK, qw($DUMPTYPE_MAXDUMPS);
1069 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_MAXDUMPS);
1071 $_dumptype_key_VALUES{"DUMPTYPE_MAXDUMPS"} = $DUMPTYPE_MAXDUMPS;
1073 push @EXPORT_OK, qw($DUMPTYPE_MAXPROMOTEDAY);
1074 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_MAXPROMOTEDAY);
1076 $_dumptype_key_VALUES{"DUMPTYPE_MAXPROMOTEDAY"} = $DUMPTYPE_MAXPROMOTEDAY;
1078 push @EXPORT_OK, qw($DUMPTYPE_BUMPPERCENT);
1079 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPPERCENT);
1081 $_dumptype_key_VALUES{"DUMPTYPE_BUMPPERCENT"} = $DUMPTYPE_BUMPPERCENT;
1083 push @EXPORT_OK, qw($DUMPTYPE_BUMPSIZE);
1084 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPSIZE);
1086 $_dumptype_key_VALUES{"DUMPTYPE_BUMPSIZE"} = $DUMPTYPE_BUMPSIZE;
1088 push @EXPORT_OK, qw($DUMPTYPE_BUMPDAYS);
1089 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPDAYS);
1091 $_dumptype_key_VALUES{"DUMPTYPE_BUMPDAYS"} = $DUMPTYPE_BUMPDAYS;
1093 push @EXPORT_OK, qw($DUMPTYPE_BUMPMULT);
1094 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPMULT);
1096 $_dumptype_key_VALUES{"DUMPTYPE_BUMPMULT"} = $DUMPTYPE_BUMPMULT;
1098 push @EXPORT_OK, qw($DUMPTYPE_STARTTIME);
1099 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_STARTTIME);
1101 $_dumptype_key_VALUES{"DUMPTYPE_STARTTIME"} = $DUMPTYPE_STARTTIME;
1103 push @EXPORT_OK, qw($DUMPTYPE_STRATEGY);
1104 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_STRATEGY);
1106 $_dumptype_key_VALUES{"DUMPTYPE_STRATEGY"} = $DUMPTYPE_STRATEGY;
1108 push @EXPORT_OK, qw($DUMPTYPE_ESTIMATE);
1109 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_ESTIMATE);
1111 $_dumptype_key_VALUES{"DUMPTYPE_ESTIMATE"} = $DUMPTYPE_ESTIMATE;
1113 push @EXPORT_OK, qw($DUMPTYPE_COMPRESS);
1114 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_COMPRESS);
1116 $_dumptype_key_VALUES{"DUMPTYPE_COMPRESS"} = $DUMPTYPE_COMPRESS;
1118 push @EXPORT_OK, qw($DUMPTYPE_ENCRYPT);
1119 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_ENCRYPT);
1121 $_dumptype_key_VALUES{"DUMPTYPE_ENCRYPT"} = $DUMPTYPE_ENCRYPT;
1123 push @EXPORT_OK, qw($DUMPTYPE_SRV_DECRYPT_OPT);
1124 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SRV_DECRYPT_OPT);
1126 $_dumptype_key_VALUES{"DUMPTYPE_SRV_DECRYPT_OPT"} = $DUMPTYPE_SRV_DECRYPT_OPT;
1128 push @EXPORT_OK, qw($DUMPTYPE_CLNT_DECRYPT_OPT);
1129 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLNT_DECRYPT_OPT);
1131 $_dumptype_key_VALUES{"DUMPTYPE_CLNT_DECRYPT_OPT"} = $DUMPTYPE_CLNT_DECRYPT_OPT;
1133 push @EXPORT_OK, qw($DUMPTYPE_COMPRATE);
1134 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_COMPRATE);
1136 $_dumptype_key_VALUES{"DUMPTYPE_COMPRATE"} = $DUMPTYPE_COMPRATE;
1138 push @EXPORT_OK, qw($DUMPTYPE_TAPE_SPLITSIZE);
1139 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_TAPE_SPLITSIZE);
1141 $_dumptype_key_VALUES{"DUMPTYPE_TAPE_SPLITSIZE"} = $DUMPTYPE_TAPE_SPLITSIZE;
1143 push @EXPORT_OK, qw($DUMPTYPE_FALLBACK_SPLITSIZE);
1144 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_FALLBACK_SPLITSIZE);
1146 $_dumptype_key_VALUES{"DUMPTYPE_FALLBACK_SPLITSIZE"} = $DUMPTYPE_FALLBACK_SPLITSIZE;
1148 push @EXPORT_OK, qw($DUMPTYPE_SPLIT_DISKBUFFER);
1149 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SPLIT_DISKBUFFER);
1151 $_dumptype_key_VALUES{"DUMPTYPE_SPLIT_DISKBUFFER"} = $DUMPTYPE_SPLIT_DISKBUFFER;
1153 push @EXPORT_OK, qw($DUMPTYPE_RECORD);
1154 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_RECORD);
1156 $_dumptype_key_VALUES{"DUMPTYPE_RECORD"} = $DUMPTYPE_RECORD;
1158 push @EXPORT_OK, qw($DUMPTYPE_SKIP_INCR);
1159 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SKIP_INCR);
1161 $_dumptype_key_VALUES{"DUMPTYPE_SKIP_INCR"} = $DUMPTYPE_SKIP_INCR;
1163 push @EXPORT_OK, qw($DUMPTYPE_SKIP_FULL);
1164 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SKIP_FULL);
1166 $_dumptype_key_VALUES{"DUMPTYPE_SKIP_FULL"} = $DUMPTYPE_SKIP_FULL;
1168 push @EXPORT_OK, qw($DUMPTYPE_HOLDINGDISK);
1169 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_HOLDINGDISK);
1171 $_dumptype_key_VALUES{"DUMPTYPE_HOLDINGDISK"} = $DUMPTYPE_HOLDINGDISK;
1173 push @EXPORT_OK, qw($DUMPTYPE_KENCRYPT);
1174 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_KENCRYPT);
1176 $_dumptype_key_VALUES{"DUMPTYPE_KENCRYPT"} = $DUMPTYPE_KENCRYPT;
1178 push @EXPORT_OK, qw($DUMPTYPE_IGNORE);
1179 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_IGNORE);
1181 $_dumptype_key_VALUES{"DUMPTYPE_IGNORE"} = $DUMPTYPE_IGNORE;
1183 push @EXPORT_OK, qw($DUMPTYPE_INDEX);
1184 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_INDEX);
1186 $_dumptype_key_VALUES{"DUMPTYPE_INDEX"} = $DUMPTYPE_INDEX;
1188 #copy symbols in dumptype_key to getconf
1189 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"dumptype_key"}};
1191 push @EXPORT_OK, qw(interface_key_to_string);
1192 push @{$EXPORT_TAGS{"interface_key"}}, qw(interface_key_to_string);
1194 my %_interface_key_VALUES;
1195 #Convert an enum value to a single string
1196 sub interface_key_to_string {
1199 for my $k (keys %_interface_key_VALUES) {
1200 my $v = $_interface_key_VALUES{$k};
1202 #is this a matching flag?
1203 if ($enumval == $v) {
1208 #default, just return the number
1212 push @EXPORT_OK, qw($INTER_COMMENT);
1213 push @{$EXPORT_TAGS{"interface_key"}}, qw($INTER_COMMENT);
1215 $_interface_key_VALUES{"INTER_COMMENT"} = $INTER_COMMENT;
1217 push @EXPORT_OK, qw($INTER_MAXUSAGE);
1218 push @{$EXPORT_TAGS{"interface_key"}}, qw($INTER_MAXUSAGE);
1220 $_interface_key_VALUES{"INTER_MAXUSAGE"} = $INTER_MAXUSAGE;
1222 #copy symbols in interface_key to getconf
1223 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"interface_key"}};
1225 push @EXPORT_OK, qw(holdingdisk_key_to_string);
1226 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw(holdingdisk_key_to_string);
1228 my %_holdingdisk_key_VALUES;
1229 #Convert an enum value to a single string
1230 sub holdingdisk_key_to_string {
1233 for my $k (keys %_holdingdisk_key_VALUES) {
1234 my $v = $_holdingdisk_key_VALUES{$k};
1236 #is this a matching flag?
1237 if ($enumval == $v) {
1242 #default, just return the number
1246 push @EXPORT_OK, qw($HOLDING_COMMENT);
1247 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_COMMENT);
1249 $_holdingdisk_key_VALUES{"HOLDING_COMMENT"} = $HOLDING_COMMENT;
1251 push @EXPORT_OK, qw($HOLDING_DISKDIR);
1252 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_DISKDIR);
1254 $_holdingdisk_key_VALUES{"HOLDING_DISKDIR"} = $HOLDING_DISKDIR;
1256 push @EXPORT_OK, qw($HOLDING_DISKSIZE);
1257 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_DISKSIZE);
1259 $_holdingdisk_key_VALUES{"HOLDING_DISKSIZE"} = $HOLDING_DISKSIZE;
1261 push @EXPORT_OK, qw($HOLDING_CHUNKSIZE);
1262 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_CHUNKSIZE);
1264 $_holdingdisk_key_VALUES{"HOLDING_CHUNKSIZE"} = $HOLDING_CHUNKSIZE;
1266 #copy symbols in holdingdisk_key to getconf
1267 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"holdingdisk_key"}};
1269 push @EXPORT_OK, qw(dump_holdingdisk_t_to_string);
1270 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw(dump_holdingdisk_t_to_string);
1272 my %_dump_holdingdisk_t_VALUES;
1273 #Convert an enum value to a single string
1274 sub dump_holdingdisk_t_to_string {
1277 for my $k (keys %_dump_holdingdisk_t_VALUES) {
1278 my $v = $_dump_holdingdisk_t_VALUES{$k};
1280 #is this a matching flag?
1281 if ($enumval == $v) {
1286 #default, just return the number
1290 push @EXPORT_OK, qw($HOLD_NEVER);
1291 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw($HOLD_NEVER);
1293 $_dump_holdingdisk_t_VALUES{"HOLD_NEVER"} = $HOLD_NEVER;
1295 push @EXPORT_OK, qw($HOLD_AUTO);
1296 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw($HOLD_AUTO);
1298 $_dump_holdingdisk_t_VALUES{"HOLD_AUTO"} = $HOLD_AUTO;
1300 push @EXPORT_OK, qw($HOLD_REQUIRED);
1301 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw($HOLD_REQUIRED);
1303 $_dump_holdingdisk_t_VALUES{"HOLD_REQUIRED"} = $HOLD_REQUIRED;
1305 #copy symbols in dump_holdingdisk_t to getconf
1306 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"dump_holdingdisk_t"}};
1308 push @EXPORT_OK, qw(comp_t_to_string);
1309 push @{$EXPORT_TAGS{"comp_t"}}, qw(comp_t_to_string);
1312 #Convert an enum value to a single string
1313 sub comp_t_to_string {
1316 for my $k (keys %_comp_t_VALUES) {
1317 my $v = $_comp_t_VALUES{$k};
1319 #is this a matching flag?
1320 if ($enumval == $v) {
1325 #default, just return the number
1329 push @EXPORT_OK, qw($COMP_NONE);
1330 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_NONE);
1332 $_comp_t_VALUES{"COMP_NONE"} = $COMP_NONE;
1334 push @EXPORT_OK, qw($COMP_FAST);
1335 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_FAST);
1337 $_comp_t_VALUES{"COMP_FAST"} = $COMP_FAST;
1339 push @EXPORT_OK, qw($COMP_BEST);
1340 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_BEST);
1342 $_comp_t_VALUES{"COMP_BEST"} = $COMP_BEST;
1344 push @EXPORT_OK, qw($COMP_CUST);
1345 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_CUST);
1347 $_comp_t_VALUES{"COMP_CUST"} = $COMP_CUST;
1349 push @EXPORT_OK, qw($COMP_SERVER_FAST);
1350 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_SERVER_FAST);
1352 $_comp_t_VALUES{"COMP_SERVER_FAST"} = $COMP_SERVER_FAST;
1354 push @EXPORT_OK, qw($COMP_SERVER_BEST);
1355 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_SERVER_BEST);
1357 $_comp_t_VALUES{"COMP_SERVER_BEST"} = $COMP_SERVER_BEST;
1359 push @EXPORT_OK, qw($COMP_SERVER_CUST);
1360 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_SERVER_CUST);
1362 $_comp_t_VALUES{"COMP_SERVER_CUST"} = $COMP_SERVER_CUST;
1364 #copy symbols in comp_t to getconf
1365 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"comp_t"}};
1367 push @EXPORT_OK, qw(encrypt_t_to_string);
1368 push @{$EXPORT_TAGS{"encrypt_t"}}, qw(encrypt_t_to_string);
1370 my %_encrypt_t_VALUES;
1371 #Convert an enum value to a single string
1372 sub encrypt_t_to_string {
1375 for my $k (keys %_encrypt_t_VALUES) {
1376 my $v = $_encrypt_t_VALUES{$k};
1378 #is this a matching flag?
1379 if ($enumval == $v) {
1384 #default, just return the number
1388 push @EXPORT_OK, qw($ENCRYPT_NONE);
1389 push @{$EXPORT_TAGS{"encrypt_t"}}, qw($ENCRYPT_NONE);
1391 $_encrypt_t_VALUES{"ENCRYPT_NONE"} = $ENCRYPT_NONE;
1393 push @EXPORT_OK, qw($ENCRYPT_CUST);
1394 push @{$EXPORT_TAGS{"encrypt_t"}}, qw($ENCRYPT_CUST);
1396 $_encrypt_t_VALUES{"ENCRYPT_CUST"} = $ENCRYPT_CUST;
1398 push @EXPORT_OK, qw($ENCRYPT_SERV_CUST);
1399 push @{$EXPORT_TAGS{"encrypt_t"}}, qw($ENCRYPT_SERV_CUST);
1401 $_encrypt_t_VALUES{"ENCRYPT_SERV_CUST"} = $ENCRYPT_SERV_CUST;
1403 #copy symbols in encrypt_t to getconf
1404 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"encrypt_t"}};
1406 push @EXPORT_OK, qw(strategy_t_to_string);
1407 push @{$EXPORT_TAGS{"strategy_t"}}, qw(strategy_t_to_string);
1409 my %_strategy_t_VALUES;
1410 #Convert an enum value to a single string
1411 sub strategy_t_to_string {
1414 for my $k (keys %_strategy_t_VALUES) {
1415 my $v = $_strategy_t_VALUES{$k};
1417 #is this a matching flag?
1418 if ($enumval == $v) {
1423 #default, just return the number
1427 push @EXPORT_OK, qw($DS_SKIP);
1428 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_SKIP);
1430 $_strategy_t_VALUES{"DS_SKIP"} = $DS_SKIP;
1432 push @EXPORT_OK, qw($DS_STANDARD);
1433 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_STANDARD);
1435 $_strategy_t_VALUES{"DS_STANDARD"} = $DS_STANDARD;
1437 push @EXPORT_OK, qw($DS_NOFULL);
1438 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_NOFULL);
1440 $_strategy_t_VALUES{"DS_NOFULL"} = $DS_NOFULL;
1442 push @EXPORT_OK, qw($DS_NOINC);
1443 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_NOINC);
1445 $_strategy_t_VALUES{"DS_NOINC"} = $DS_NOINC;
1447 push @EXPORT_OK, qw($DS_4);
1448 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_4);
1450 $_strategy_t_VALUES{"DS_4"} = $DS_4;
1452 push @EXPORT_OK, qw($DS_5);
1453 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_5);
1455 $_strategy_t_VALUES{"DS_5"} = $DS_5;
1457 push @EXPORT_OK, qw($DS_HANOI);
1458 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_HANOI);
1460 $_strategy_t_VALUES{"DS_HANOI"} = $DS_HANOI;
1462 push @EXPORT_OK, qw($DS_INCRONLY);
1463 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_INCRONLY);
1465 $_strategy_t_VALUES{"DS_INCRONLY"} = $DS_INCRONLY;
1467 #copy symbols in strategy_t to getconf
1468 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"strategy_t"}};
1470 push @EXPORT_OK, qw(estimate_t_to_string);
1471 push @{$EXPORT_TAGS{"estimate_t"}}, qw(estimate_t_to_string);
1473 my %_estimate_t_VALUES;
1474 #Convert an enum value to a single string
1475 sub estimate_t_to_string {
1478 for my $k (keys %_estimate_t_VALUES) {
1479 my $v = $_estimate_t_VALUES{$k};
1481 #is this a matching flag?
1482 if ($enumval == $v) {
1487 #default, just return the number
1491 push @EXPORT_OK, qw($ES_CLIENT);
1492 push @{$EXPORT_TAGS{"estimate_t"}}, qw($ES_CLIENT);
1494 $_estimate_t_VALUES{"ES_CLIENT"} = $ES_CLIENT;
1496 push @EXPORT_OK, qw($ES_SERVER);
1497 push @{$EXPORT_TAGS{"estimate_t"}}, qw($ES_SERVER);
1499 $_estimate_t_VALUES{"ES_SERVER"} = $ES_SERVER;
1501 push @EXPORT_OK, qw($ES_CALCSIZE);
1502 push @{$EXPORT_TAGS{"estimate_t"}}, qw($ES_CALCSIZE);
1504 $_estimate_t_VALUES{"ES_CALCSIZE"} = $ES_CALCSIZE;
1506 #copy symbols in estimate_t to getconf
1507 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"estimate_t"}};
1509 push @EXPORT_OK, qw(taperalgo_t_to_string);
1510 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw(taperalgo_t_to_string);
1512 my %_taperalgo_t_VALUES;
1513 #Convert an enum value to a single string
1514 sub taperalgo_t_to_string {
1517 for my $k (keys %_taperalgo_t_VALUES) {
1518 my $v = $_taperalgo_t_VALUES{$k};
1520 #is this a matching flag?
1521 if ($enumval == $v) {
1526 #default, just return the number
1530 push @EXPORT_OK, qw($ALGO_FIRST);
1531 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_FIRST);
1533 $_taperalgo_t_VALUES{"ALGO_FIRST"} = $ALGO_FIRST;
1535 push @EXPORT_OK, qw($ALGO_FIRSTFIT);
1536 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_FIRSTFIT);
1538 $_taperalgo_t_VALUES{"ALGO_FIRSTFIT"} = $ALGO_FIRSTFIT;
1540 push @EXPORT_OK, qw($ALGO_LARGEST);
1541 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_LARGEST);
1543 $_taperalgo_t_VALUES{"ALGO_LARGEST"} = $ALGO_LARGEST;
1545 push @EXPORT_OK, qw($ALGO_LARGESTFIT);
1546 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_LARGESTFIT);
1548 $_taperalgo_t_VALUES{"ALGO_LARGESTFIT"} = $ALGO_LARGESTFIT;
1550 push @EXPORT_OK, qw($ALGO_SMALLEST);
1551 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_SMALLEST);
1553 $_taperalgo_t_VALUES{"ALGO_SMALLEST"} = $ALGO_SMALLEST;
1555 push @EXPORT_OK, qw($ALGO_LAST);
1556 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_LAST);
1558 $_taperalgo_t_VALUES{"ALGO_LAST"} = $ALGO_LAST;
1560 #copy symbols in taperalgo_t to getconf
1561 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"taperalgo_t"}};
1563 push @EXPORT_OK, qw(getconf getconf_seen
1564 getconf_byname getconf_list);
1565 push @{$EXPORT_TAGS{"getconf"}}, qw(getconf getconf_seen
1566 getconf_byname getconf_list);
1568 push @EXPORT_OK, qw(lookup_tapetype tapetype_getconf tapetype_name
1569 tapetype_seen tapetype_seen);
1570 push @{$EXPORT_TAGS{"getconf"}}, qw(lookup_tapetype tapetype_getconf tapetype_name
1571 tapetype_seen tapetype_seen);
1573 push @EXPORT_OK, qw(lookup_dumptype dumptype_getconf dumptype_name
1574 dumptype_seen dumptype_seen);
1575 push @{$EXPORT_TAGS{"getconf"}}, qw(lookup_dumptype dumptype_getconf dumptype_name
1576 dumptype_seen dumptype_seen);
1578 push @EXPORT_OK, qw(lookup_interface interface_getconf interface_name
1579 interface_seen interface_seen);
1580 push @{$EXPORT_TAGS{"getconf"}}, qw(lookup_interface interface_getconf interface_name
1581 interface_seen interface_seen);
1583 push @EXPORT_OK, qw(lookup_holdingdisk holdingdisk_getconf holdingdisk_name
1584 getconf_holdingdisks holdingdisk_next
1585 holdingdisk_seen holdingdisk_seen);
1586 push @{$EXPORT_TAGS{"getconf"}}, qw(lookup_holdingdisk holdingdisk_getconf holdingdisk_name
1587 getconf_holdingdisks holdingdisk_next
1588 holdingdisk_seen holdingdisk_seen);
1590 push @EXPORT_OK, qw(getconf_unit_divisor
1592 $debug_amandad $debug_amidxtaped $debug_amindexd $debug_amrecover
1593 $debug_auth $debug_event $debug_holding $debug_protocol
1594 $debug_planner $debug_driver $debug_dumper $debug_chunker
1595 $debug_taper $debug_selfcheck $debug_sendsize $debug_sendbackup);
1596 push @{$EXPORT_TAGS{"getconf"}}, qw(getconf_unit_divisor
1598 $debug_amandad $debug_amidxtaped $debug_amindexd $debug_amrecover
1599 $debug_auth $debug_event $debug_holding $debug_protocol
1600 $debug_planner $debug_driver $debug_dumper $debug_chunker
1601 $debug_taper $debug_selfcheck $debug_sendsize $debug_sendbackup);
1603 push @EXPORT_OK, qw(new_config_overwrites free_config_overwrites add_config_overwrite
1604 add_config_overwrite_opt apply_config_overwrites);
1605 push @{$EXPORT_TAGS{"init"}}, qw(new_config_overwrites free_config_overwrites add_config_overwrite
1606 add_config_overwrite_opt apply_config_overwrites);
1608 push @EXPORT_OK, qw(config_init_flags_to_strings);
1609 push @{$EXPORT_TAGS{"config_init_flags"}}, qw(config_init_flags_to_strings);
1611 my %_config_init_flags_VALUES;
1612 #Convert a flag value to a list of names for flags that are set.
1613 sub config_init_flags_to_strings {
1617 for my $k (keys %_config_init_flags_VALUES) {
1618 my $v = $_config_init_flags_VALUES{$k};
1620 #is this a matching flag?
1621 if (($v == 0 && $flags == 0) || ($v != 0 && ($flags & $v) == $v)) {
1626 #by default, just return the number as a 1-element list
1634 push @EXPORT_OK, qw($CONFIG_INIT_EXPLICIT_NAME);
1635 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_EXPLICIT_NAME);
1637 $_config_init_flags_VALUES{"CONFIG_INIT_EXPLICIT_NAME"} = $CONFIG_INIT_EXPLICIT_NAME;
1639 push @EXPORT_OK, qw($CONFIG_INIT_USE_CWD);
1640 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_USE_CWD);
1642 $_config_init_flags_VALUES{"CONFIG_INIT_USE_CWD"} = $CONFIG_INIT_USE_CWD;
1644 push @EXPORT_OK, qw($CONFIG_INIT_CLIENT);
1645 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_CLIENT);
1647 $_config_init_flags_VALUES{"CONFIG_INIT_CLIENT"} = $CONFIG_INIT_CLIENT;
1649 push @EXPORT_OK, qw($CONFIG_INIT_OVERLAY);
1650 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_OVERLAY);
1652 $_config_init_flags_VALUES{"CONFIG_INIT_OVERLAY"} = $CONFIG_INIT_OVERLAY;
1654 push @EXPORT_OK, qw($CONFIG_INIT_FATAL);
1655 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_FATAL);
1657 $_config_init_flags_VALUES{"CONFIG_INIT_FATAL"} = $CONFIG_INIT_FATAL;
1659 #copy symbols in config_init_flags to init
1660 push @{$EXPORT_TAGS{"init"}}, @{$EXPORT_TAGS{"config_init_flags"}};
1662 push @EXPORT_OK, qw(config_init config_uninit get_config_options);
1663 push @{$EXPORT_TAGS{"init"}}, qw(config_init config_uninit get_config_options);
1665 push @EXPORT_OK, qw(get_config_name
1667 get_config_filename);
1668 push @{$EXPORT_TAGS{"init"}}, qw(get_config_name
1670 get_config_filename);
1672 push @EXPORT_OK, qw(dump_configuration config_dir_relative taperalgo2str find_multiplier);