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 L<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>, 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)>, which returns an opaque object
406 (C<$ss>) representing the subsection, or C<undef> if no subsection
407 with that name exists;
409 =item C<TYP_name($ss)>, returning the name of the subsection;
411 =item C<TYP_getconf($ss, $cnf)>, which fetches a parameter value from
414 =item C<TYP_seen($ss, $cnf)>, which returns a true value if <$cnf>
415 was seen in the subsection.
423 =item C<tapetype>, with constants beginning with C<$TAPETYPE_>,
425 =item C<dumptype>, with constants beginning with C<$DUMPTYPE_>,
427 =item C<interface>, with constants beginning with C<$INTER_>, and
429 =item C<holdingdisk>, with constants beginning with C<$HOLDING_>.
433 See C<conffile.h> for the names of the constants themselves.
435 Parameter values are available by name from C<getconf_byname($name)>.
436 This function implements the C<TYP:NAME:PARAM> syntax advertised by
437 C<amgetconf> to access values in subsections. C<getconf_list($typ)>
438 returns a list of the names of all subsections of the given type.
440 The C<$CNF_DISPLAYUNIT> implies a certain divisor to convert from
441 kilobytes to the desired unit. This divisor is available from
442 C<getconf_unit_divisor()>. Note carefully that it is a I<divisor>
443 for a value in I<kilobytes>!
445 Finally, various subsections of Amanda enable verbose debugging via
446 configuration parameters. The status of each parameter is available
447 a similarly-named variable, e.g., C<$debug_auth>.
449 All parameter access functions and constants can be imported with
454 These functions defy categorization.
456 The function C<config_dir_relative> will interpret a path relative to
457 the current configuration directory. Absolute paths are passed through
458 unchanged, while relative paths are converted to absolute paths.
460 C<dump_configuration()> dumps the current configuration, in a format
461 suitable for re-evaluation for this module, to standard output.
462 This function may be revised to return a string.
464 Several parts of Amanda need to convert unit modifier value like
465 "gbytes" to a multiplier. The function C<find_multiplier($str)>
466 returns the unit multiplier for such a string. For example, "mbytes"
467 is converted to 1048576 (1024*1024).
471 push @EXPORT_OK, qw(confparm_key_to_string);
472 push @{$EXPORT_TAGS{"confparm_key"}}, qw(confparm_key_to_string);
474 my %_confparm_key_VALUES;
475 #Convert an enum value to a single string
476 sub confparm_key_to_string {
479 for my $k (keys %_confparm_key_VALUES) {
480 my $v = $_confparm_key_VALUES{$k};
482 #is this a matching flag?
483 if ($enumval == $v) {
488 #default, just return the number
492 push @EXPORT_OK, qw($CNF_ORG);
493 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_ORG);
495 $_confparm_key_VALUES{"CNF_ORG"} = $CNF_ORG;
497 push @EXPORT_OK, qw($CNF_CONF);
498 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CONF);
500 $_confparm_key_VALUES{"CNF_CONF"} = $CNF_CONF;
502 push @EXPORT_OK, qw($CNF_INDEX_SERVER);
503 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INDEX_SERVER);
505 $_confparm_key_VALUES{"CNF_INDEX_SERVER"} = $CNF_INDEX_SERVER;
507 push @EXPORT_OK, qw($CNF_TAPE_SERVER);
508 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPE_SERVER);
510 $_confparm_key_VALUES{"CNF_TAPE_SERVER"} = $CNF_TAPE_SERVER;
512 push @EXPORT_OK, qw($CNF_AUTH);
513 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AUTH);
515 $_confparm_key_VALUES{"CNF_AUTH"} = $CNF_AUTH;
517 push @EXPORT_OK, qw($CNF_SSH_KEYS);
518 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_SSH_KEYS);
520 $_confparm_key_VALUES{"CNF_SSH_KEYS"} = $CNF_SSH_KEYS;
522 push @EXPORT_OK, qw($CNF_AMANDAD_PATH);
523 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMANDAD_PATH);
525 $_confparm_key_VALUES{"CNF_AMANDAD_PATH"} = $CNF_AMANDAD_PATH;
527 push @EXPORT_OK, qw($CNF_CLIENT_USERNAME);
528 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CLIENT_USERNAME);
530 $_confparm_key_VALUES{"CNF_CLIENT_USERNAME"} = $CNF_CLIENT_USERNAME;
532 push @EXPORT_OK, qw($CNF_GNUTAR_LIST_DIR);
533 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_GNUTAR_LIST_DIR);
535 $_confparm_key_VALUES{"CNF_GNUTAR_LIST_DIR"} = $CNF_GNUTAR_LIST_DIR;
537 push @EXPORT_OK, qw($CNF_AMANDATES);
538 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMANDATES);
540 $_confparm_key_VALUES{"CNF_AMANDATES"} = $CNF_AMANDATES;
542 push @EXPORT_OK, qw($CNF_MAILTO);
543 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_MAILTO);
545 $_confparm_key_VALUES{"CNF_MAILTO"} = $CNF_MAILTO;
547 push @EXPORT_OK, qw($CNF_DUMPUSER);
548 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DUMPUSER);
550 $_confparm_key_VALUES{"CNF_DUMPUSER"} = $CNF_DUMPUSER;
552 push @EXPORT_OK, qw($CNF_TAPEDEV);
553 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPEDEV);
555 $_confparm_key_VALUES{"CNF_TAPEDEV"} = $CNF_TAPEDEV;
557 push @EXPORT_OK, qw($CNF_DEVICE_PROPERTY);
558 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEVICE_PROPERTY);
560 $_confparm_key_VALUES{"CNF_DEVICE_PROPERTY"} = $CNF_DEVICE_PROPERTY;
562 push @EXPORT_OK, qw($CNF_CHANGERDEV);
563 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CHANGERDEV);
565 $_confparm_key_VALUES{"CNF_CHANGERDEV"} = $CNF_CHANGERDEV;
567 push @EXPORT_OK, qw($CNF_CHANGERFILE);
568 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CHANGERFILE);
570 $_confparm_key_VALUES{"CNF_CHANGERFILE"} = $CNF_CHANGERFILE;
572 push @EXPORT_OK, qw($CNF_LABELSTR);
573 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_LABELSTR);
575 $_confparm_key_VALUES{"CNF_LABELSTR"} = $CNF_LABELSTR;
577 push @EXPORT_OK, qw($CNF_TAPELIST);
578 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPELIST);
580 $_confparm_key_VALUES{"CNF_TAPELIST"} = $CNF_TAPELIST;
582 push @EXPORT_OK, qw($CNF_DISKFILE);
583 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DISKFILE);
585 $_confparm_key_VALUES{"CNF_DISKFILE"} = $CNF_DISKFILE;
587 push @EXPORT_OK, qw($CNF_INFOFILE);
588 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INFOFILE);
590 $_confparm_key_VALUES{"CNF_INFOFILE"} = $CNF_INFOFILE;
592 push @EXPORT_OK, qw($CNF_LOGDIR);
593 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_LOGDIR);
595 $_confparm_key_VALUES{"CNF_LOGDIR"} = $CNF_LOGDIR;
597 push @EXPORT_OK, qw($CNF_INDEXDIR);
598 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INDEXDIR);
600 $_confparm_key_VALUES{"CNF_INDEXDIR"} = $CNF_INDEXDIR;
602 push @EXPORT_OK, qw($CNF_TAPETYPE);
603 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPETYPE);
605 $_confparm_key_VALUES{"CNF_TAPETYPE"} = $CNF_TAPETYPE;
607 push @EXPORT_OK, qw($CNF_DUMPCYCLE);
608 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DUMPCYCLE);
610 $_confparm_key_VALUES{"CNF_DUMPCYCLE"} = $CNF_DUMPCYCLE;
612 push @EXPORT_OK, qw($CNF_RUNSPERCYCLE);
613 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RUNSPERCYCLE);
615 $_confparm_key_VALUES{"CNF_RUNSPERCYCLE"} = $CNF_RUNSPERCYCLE;
617 push @EXPORT_OK, qw($CNF_TAPECYCLE);
618 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPECYCLE);
620 $_confparm_key_VALUES{"CNF_TAPECYCLE"} = $CNF_TAPECYCLE;
622 push @EXPORT_OK, qw($CNF_NETUSAGE);
623 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_NETUSAGE);
625 $_confparm_key_VALUES{"CNF_NETUSAGE"} = $CNF_NETUSAGE;
627 push @EXPORT_OK, qw($CNF_INPARALLEL);
628 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INPARALLEL);
630 $_confparm_key_VALUES{"CNF_INPARALLEL"} = $CNF_INPARALLEL;
632 push @EXPORT_OK, qw($CNF_DUMPORDER);
633 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DUMPORDER);
635 $_confparm_key_VALUES{"CNF_DUMPORDER"} = $CNF_DUMPORDER;
637 push @EXPORT_OK, qw($CNF_BUMPPERCENT);
638 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPPERCENT);
640 $_confparm_key_VALUES{"CNF_BUMPPERCENT"} = $CNF_BUMPPERCENT;
642 push @EXPORT_OK, qw($CNF_BUMPSIZE);
643 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPSIZE);
645 $_confparm_key_VALUES{"CNF_BUMPSIZE"} = $CNF_BUMPSIZE;
647 push @EXPORT_OK, qw($CNF_BUMPMULT);
648 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPMULT);
650 $_confparm_key_VALUES{"CNF_BUMPMULT"} = $CNF_BUMPMULT;
652 push @EXPORT_OK, qw($CNF_BUMPDAYS);
653 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPDAYS);
655 $_confparm_key_VALUES{"CNF_BUMPDAYS"} = $CNF_BUMPDAYS;
657 push @EXPORT_OK, qw($CNF_TPCHANGER);
658 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TPCHANGER);
660 $_confparm_key_VALUES{"CNF_TPCHANGER"} = $CNF_TPCHANGER;
662 push @EXPORT_OK, qw($CNF_RUNTAPES);
663 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RUNTAPES);
665 $_confparm_key_VALUES{"CNF_RUNTAPES"} = $CNF_RUNTAPES;
667 push @EXPORT_OK, qw($CNF_MAXDUMPS);
668 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_MAXDUMPS);
670 $_confparm_key_VALUES{"CNF_MAXDUMPS"} = $CNF_MAXDUMPS;
672 push @EXPORT_OK, qw($CNF_ETIMEOUT);
673 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_ETIMEOUT);
675 $_confparm_key_VALUES{"CNF_ETIMEOUT"} = $CNF_ETIMEOUT;
677 push @EXPORT_OK, qw($CNF_DTIMEOUT);
678 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DTIMEOUT);
680 $_confparm_key_VALUES{"CNF_DTIMEOUT"} = $CNF_DTIMEOUT;
682 push @EXPORT_OK, qw($CNF_CTIMEOUT);
683 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CTIMEOUT);
685 $_confparm_key_VALUES{"CNF_CTIMEOUT"} = $CNF_CTIMEOUT;
687 push @EXPORT_OK, qw($CNF_TAPEBUFS);
688 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPEBUFS);
690 $_confparm_key_VALUES{"CNF_TAPEBUFS"} = $CNF_TAPEBUFS;
692 push @EXPORT_OK, qw($CNF_DEVICE_OUTPUT_BUFFER_SIZE);
693 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEVICE_OUTPUT_BUFFER_SIZE);
695 $_confparm_key_VALUES{"CNF_DEVICE_OUTPUT_BUFFER_SIZE"} = $CNF_DEVICE_OUTPUT_BUFFER_SIZE;
697 push @EXPORT_OK, qw($CNF_PRINTER);
698 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_PRINTER);
700 $_confparm_key_VALUES{"CNF_PRINTER"} = $CNF_PRINTER;
702 push @EXPORT_OK, qw($CNF_AUTOFLUSH);
703 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AUTOFLUSH);
705 $_confparm_key_VALUES{"CNF_AUTOFLUSH"} = $CNF_AUTOFLUSH;
707 push @EXPORT_OK, qw($CNF_RESERVE);
708 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RESERVE);
710 $_confparm_key_VALUES{"CNF_RESERVE"} = $CNF_RESERVE;
712 push @EXPORT_OK, qw($CNF_MAXDUMPSIZE);
713 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_MAXDUMPSIZE);
715 $_confparm_key_VALUES{"CNF_MAXDUMPSIZE"} = $CNF_MAXDUMPSIZE;
717 push @EXPORT_OK, qw($CNF_COLUMNSPEC);
718 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_COLUMNSPEC);
720 $_confparm_key_VALUES{"CNF_COLUMNSPEC"} = $CNF_COLUMNSPEC;
722 push @EXPORT_OK, qw($CNF_AMRECOVER_DO_FSF);
723 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMRECOVER_DO_FSF);
725 $_confparm_key_VALUES{"CNF_AMRECOVER_DO_FSF"} = $CNF_AMRECOVER_DO_FSF;
727 push @EXPORT_OK, qw($CNF_AMRECOVER_CHECK_LABEL);
728 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMRECOVER_CHECK_LABEL);
730 $_confparm_key_VALUES{"CNF_AMRECOVER_CHECK_LABEL"} = $CNF_AMRECOVER_CHECK_LABEL;
732 push @EXPORT_OK, qw($CNF_AMRECOVER_CHANGER);
733 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMRECOVER_CHANGER);
735 $_confparm_key_VALUES{"CNF_AMRECOVER_CHANGER"} = $CNF_AMRECOVER_CHANGER;
737 push @EXPORT_OK, qw($CNF_TAPERALGO);
738 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPERALGO);
740 $_confparm_key_VALUES{"CNF_TAPERALGO"} = $CNF_TAPERALGO;
742 push @EXPORT_OK, qw($CNF_FLUSH_THRESHOLD_DUMPED);
743 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_FLUSH_THRESHOLD_DUMPED);
745 $_confparm_key_VALUES{"CNF_FLUSH_THRESHOLD_DUMPED"} = $CNF_FLUSH_THRESHOLD_DUMPED;
747 push @EXPORT_OK, qw($CNF_FLUSH_THRESHOLD_SCHEDULED);
748 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_FLUSH_THRESHOLD_SCHEDULED);
750 $_confparm_key_VALUES{"CNF_FLUSH_THRESHOLD_SCHEDULED"} = $CNF_FLUSH_THRESHOLD_SCHEDULED;
752 push @EXPORT_OK, qw($CNF_TAPERFLUSH);
753 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPERFLUSH);
755 $_confparm_key_VALUES{"CNF_TAPERFLUSH"} = $CNF_TAPERFLUSH;
757 push @EXPORT_OK, qw($CNF_DISPLAYUNIT);
758 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DISPLAYUNIT);
760 $_confparm_key_VALUES{"CNF_DISPLAYUNIT"} = $CNF_DISPLAYUNIT;
762 push @EXPORT_OK, qw($CNF_KRB5KEYTAB);
763 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_KRB5KEYTAB);
765 $_confparm_key_VALUES{"CNF_KRB5KEYTAB"} = $CNF_KRB5KEYTAB;
767 push @EXPORT_OK, qw($CNF_KRB5PRINCIPAL);
768 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_KRB5PRINCIPAL);
770 $_confparm_key_VALUES{"CNF_KRB5PRINCIPAL"} = $CNF_KRB5PRINCIPAL;
772 push @EXPORT_OK, qw($CNF_LABEL_NEW_TAPES);
773 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_LABEL_NEW_TAPES);
775 $_confparm_key_VALUES{"CNF_LABEL_NEW_TAPES"} = $CNF_LABEL_NEW_TAPES;
777 push @EXPORT_OK, qw($CNF_USETIMESTAMPS);
778 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_USETIMESTAMPS);
780 $_confparm_key_VALUES{"CNF_USETIMESTAMPS"} = $CNF_USETIMESTAMPS;
782 push @EXPORT_OK, qw($CNF_REP_TRIES);
783 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_REP_TRIES);
785 $_confparm_key_VALUES{"CNF_REP_TRIES"} = $CNF_REP_TRIES;
787 push @EXPORT_OK, qw($CNF_CONNECT_TRIES);
788 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CONNECT_TRIES);
790 $_confparm_key_VALUES{"CNF_CONNECT_TRIES"} = $CNF_CONNECT_TRIES;
792 push @EXPORT_OK, qw($CNF_REQ_TRIES);
793 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_REQ_TRIES);
795 $_confparm_key_VALUES{"CNF_REQ_TRIES"} = $CNF_REQ_TRIES;
797 push @EXPORT_OK, qw($CNF_DEBUG_AMANDAD);
798 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMANDAD);
800 $_confparm_key_VALUES{"CNF_DEBUG_AMANDAD"} = $CNF_DEBUG_AMANDAD;
802 push @EXPORT_OK, qw($CNF_DEBUG_AMIDXTAPED);
803 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMIDXTAPED);
805 $_confparm_key_VALUES{"CNF_DEBUG_AMIDXTAPED"} = $CNF_DEBUG_AMIDXTAPED;
807 push @EXPORT_OK, qw($CNF_DEBUG_AMINDEXD);
808 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMINDEXD);
810 $_confparm_key_VALUES{"CNF_DEBUG_AMINDEXD"} = $CNF_DEBUG_AMINDEXD;
812 push @EXPORT_OK, qw($CNF_DEBUG_AMRECOVER);
813 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMRECOVER);
815 $_confparm_key_VALUES{"CNF_DEBUG_AMRECOVER"} = $CNF_DEBUG_AMRECOVER;
817 push @EXPORT_OK, qw($CNF_DEBUG_AUTH);
818 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AUTH);
820 $_confparm_key_VALUES{"CNF_DEBUG_AUTH"} = $CNF_DEBUG_AUTH;
822 push @EXPORT_OK, qw($CNF_DEBUG_EVENT);
823 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_EVENT);
825 $_confparm_key_VALUES{"CNF_DEBUG_EVENT"} = $CNF_DEBUG_EVENT;
827 push @EXPORT_OK, qw($CNF_DEBUG_HOLDING);
828 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_HOLDING);
830 $_confparm_key_VALUES{"CNF_DEBUG_HOLDING"} = $CNF_DEBUG_HOLDING;
832 push @EXPORT_OK, qw($CNF_DEBUG_PROTOCOL);
833 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_PROTOCOL);
835 $_confparm_key_VALUES{"CNF_DEBUG_PROTOCOL"} = $CNF_DEBUG_PROTOCOL;
837 push @EXPORT_OK, qw($CNF_DEBUG_PLANNER);
838 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_PLANNER);
840 $_confparm_key_VALUES{"CNF_DEBUG_PLANNER"} = $CNF_DEBUG_PLANNER;
842 push @EXPORT_OK, qw($CNF_DEBUG_DRIVER);
843 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_DRIVER);
845 $_confparm_key_VALUES{"CNF_DEBUG_DRIVER"} = $CNF_DEBUG_DRIVER;
847 push @EXPORT_OK, qw($CNF_DEBUG_DUMPER);
848 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_DUMPER);
850 $_confparm_key_VALUES{"CNF_DEBUG_DUMPER"} = $CNF_DEBUG_DUMPER;
852 push @EXPORT_OK, qw($CNF_DEBUG_CHUNKER);
853 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_CHUNKER);
855 $_confparm_key_VALUES{"CNF_DEBUG_CHUNKER"} = $CNF_DEBUG_CHUNKER;
857 push @EXPORT_OK, qw($CNF_DEBUG_TAPER);
858 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_TAPER);
860 $_confparm_key_VALUES{"CNF_DEBUG_TAPER"} = $CNF_DEBUG_TAPER;
862 push @EXPORT_OK, qw($CNF_DEBUG_SELFCHECK);
863 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_SELFCHECK);
865 $_confparm_key_VALUES{"CNF_DEBUG_SELFCHECK"} = $CNF_DEBUG_SELFCHECK;
867 push @EXPORT_OK, qw($CNF_DEBUG_SENDSIZE);
868 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_SENDSIZE);
870 $_confparm_key_VALUES{"CNF_DEBUG_SENDSIZE"} = $CNF_DEBUG_SENDSIZE;
872 push @EXPORT_OK, qw($CNF_DEBUG_SENDBACKUP);
873 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_SENDBACKUP);
875 $_confparm_key_VALUES{"CNF_DEBUG_SENDBACKUP"} = $CNF_DEBUG_SENDBACKUP;
877 push @EXPORT_OK, qw($CNF_RESERVED_UDP_PORT);
878 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RESERVED_UDP_PORT);
880 $_confparm_key_VALUES{"CNF_RESERVED_UDP_PORT"} = $CNF_RESERVED_UDP_PORT;
882 push @EXPORT_OK, qw($CNF_RESERVED_TCP_PORT);
883 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RESERVED_TCP_PORT);
885 $_confparm_key_VALUES{"CNF_RESERVED_TCP_PORT"} = $CNF_RESERVED_TCP_PORT;
887 push @EXPORT_OK, qw($CNF_UNRESERVED_TCP_PORT);
888 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_UNRESERVED_TCP_PORT);
890 $_confparm_key_VALUES{"CNF_UNRESERVED_TCP_PORT"} = $CNF_UNRESERVED_TCP_PORT;
892 #copy symbols in confparm_key to getconf
893 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"confparm_key"}};
895 push @EXPORT_OK, qw(tapetype_key_to_string);
896 push @{$EXPORT_TAGS{"tapetype_key"}}, qw(tapetype_key_to_string);
898 my %_tapetype_key_VALUES;
899 #Convert an enum value to a single string
900 sub tapetype_key_to_string {
903 for my $k (keys %_tapetype_key_VALUES) {
904 my $v = $_tapetype_key_VALUES{$k};
906 #is this a matching flag?
907 if ($enumval == $v) {
912 #default, just return the number
916 push @EXPORT_OK, qw($TAPETYPE_COMMENT);
917 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_COMMENT);
919 $_tapetype_key_VALUES{"TAPETYPE_COMMENT"} = $TAPETYPE_COMMENT;
921 push @EXPORT_OK, qw($TAPETYPE_LBL_TEMPL);
922 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_LBL_TEMPL);
924 $_tapetype_key_VALUES{"TAPETYPE_LBL_TEMPL"} = $TAPETYPE_LBL_TEMPL;
926 push @EXPORT_OK, qw($TAPETYPE_BLOCKSIZE);
927 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_BLOCKSIZE);
929 $_tapetype_key_VALUES{"TAPETYPE_BLOCKSIZE"} = $TAPETYPE_BLOCKSIZE;
931 push @EXPORT_OK, qw($TAPETYPE_READBLOCKSIZE);
932 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_READBLOCKSIZE);
934 $_tapetype_key_VALUES{"TAPETYPE_READBLOCKSIZE"} = $TAPETYPE_READBLOCKSIZE;
936 push @EXPORT_OK, qw($TAPETYPE_LENGTH);
937 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_LENGTH);
939 $_tapetype_key_VALUES{"TAPETYPE_LENGTH"} = $TAPETYPE_LENGTH;
941 push @EXPORT_OK, qw($TAPETYPE_FILEMARK);
942 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_FILEMARK);
944 $_tapetype_key_VALUES{"TAPETYPE_FILEMARK"} = $TAPETYPE_FILEMARK;
946 push @EXPORT_OK, qw($TAPETYPE_SPEED);
947 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_SPEED);
949 $_tapetype_key_VALUES{"TAPETYPE_SPEED"} = $TAPETYPE_SPEED;
951 push @EXPORT_OK, qw($TAPETYPE_FILE_PAD);
952 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_FILE_PAD);
954 $_tapetype_key_VALUES{"TAPETYPE_FILE_PAD"} = $TAPETYPE_FILE_PAD;
956 #copy symbols in tapetype_key to getconf
957 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"tapetype_key"}};
959 push @EXPORT_OK, qw(dumptype_key_to_string);
960 push @{$EXPORT_TAGS{"dumptype_key"}}, qw(dumptype_key_to_string);
962 my %_dumptype_key_VALUES;
963 #Convert an enum value to a single string
964 sub dumptype_key_to_string {
967 for my $k (keys %_dumptype_key_VALUES) {
968 my $v = $_dumptype_key_VALUES{$k};
970 #is this a matching flag?
971 if ($enumval == $v) {
976 #default, just return the number
980 push @EXPORT_OK, qw($DUMPTYPE_COMMENT);
981 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_COMMENT);
983 $_dumptype_key_VALUES{"DUMPTYPE_COMMENT"} = $DUMPTYPE_COMMENT;
985 push @EXPORT_OK, qw($DUMPTYPE_PROGRAM);
986 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_PROGRAM);
988 $_dumptype_key_VALUES{"DUMPTYPE_PROGRAM"} = $DUMPTYPE_PROGRAM;
990 push @EXPORT_OK, qw($DUMPTYPE_SRVCOMPPROG);
991 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SRVCOMPPROG);
993 $_dumptype_key_VALUES{"DUMPTYPE_SRVCOMPPROG"} = $DUMPTYPE_SRVCOMPPROG;
995 push @EXPORT_OK, qw($DUMPTYPE_CLNTCOMPPROG);
996 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLNTCOMPPROG);
998 $_dumptype_key_VALUES{"DUMPTYPE_CLNTCOMPPROG"} = $DUMPTYPE_CLNTCOMPPROG;
1000 push @EXPORT_OK, qw($DUMPTYPE_SRV_ENCRYPT);
1001 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SRV_ENCRYPT);
1003 $_dumptype_key_VALUES{"DUMPTYPE_SRV_ENCRYPT"} = $DUMPTYPE_SRV_ENCRYPT;
1005 push @EXPORT_OK, qw($DUMPTYPE_CLNT_ENCRYPT);
1006 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLNT_ENCRYPT);
1008 $_dumptype_key_VALUES{"DUMPTYPE_CLNT_ENCRYPT"} = $DUMPTYPE_CLNT_ENCRYPT;
1010 push @EXPORT_OK, qw($DUMPTYPE_AMANDAD_PATH);
1011 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_AMANDAD_PATH);
1013 $_dumptype_key_VALUES{"DUMPTYPE_AMANDAD_PATH"} = $DUMPTYPE_AMANDAD_PATH;
1015 push @EXPORT_OK, qw($DUMPTYPE_CLIENT_USERNAME);
1016 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLIENT_USERNAME);
1018 $_dumptype_key_VALUES{"DUMPTYPE_CLIENT_USERNAME"} = $DUMPTYPE_CLIENT_USERNAME;
1020 push @EXPORT_OK, qw($DUMPTYPE_SSH_KEYS);
1021 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SSH_KEYS);
1023 $_dumptype_key_VALUES{"DUMPTYPE_SSH_KEYS"} = $DUMPTYPE_SSH_KEYS;
1025 push @EXPORT_OK, qw($DUMPTYPE_SECURITY_DRIVER);
1026 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SECURITY_DRIVER);
1028 $_dumptype_key_VALUES{"DUMPTYPE_SECURITY_DRIVER"} = $DUMPTYPE_SECURITY_DRIVER;
1030 push @EXPORT_OK, qw($DUMPTYPE_EXCLUDE);
1031 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_EXCLUDE);
1033 $_dumptype_key_VALUES{"DUMPTYPE_EXCLUDE"} = $DUMPTYPE_EXCLUDE;
1035 push @EXPORT_OK, qw($DUMPTYPE_INCLUDE);
1036 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_INCLUDE);
1038 $_dumptype_key_VALUES{"DUMPTYPE_INCLUDE"} = $DUMPTYPE_INCLUDE;
1040 push @EXPORT_OK, qw($DUMPTYPE_PRIORITY);
1041 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_PRIORITY);
1043 $_dumptype_key_VALUES{"DUMPTYPE_PRIORITY"} = $DUMPTYPE_PRIORITY;
1045 push @EXPORT_OK, qw($DUMPTYPE_DUMPCYCLE);
1046 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_DUMPCYCLE);
1048 $_dumptype_key_VALUES{"DUMPTYPE_DUMPCYCLE"} = $DUMPTYPE_DUMPCYCLE;
1050 push @EXPORT_OK, qw($DUMPTYPE_MAXDUMPS);
1051 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_MAXDUMPS);
1053 $_dumptype_key_VALUES{"DUMPTYPE_MAXDUMPS"} = $DUMPTYPE_MAXDUMPS;
1055 push @EXPORT_OK, qw($DUMPTYPE_MAXPROMOTEDAY);
1056 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_MAXPROMOTEDAY);
1058 $_dumptype_key_VALUES{"DUMPTYPE_MAXPROMOTEDAY"} = $DUMPTYPE_MAXPROMOTEDAY;
1060 push @EXPORT_OK, qw($DUMPTYPE_BUMPPERCENT);
1061 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPPERCENT);
1063 $_dumptype_key_VALUES{"DUMPTYPE_BUMPPERCENT"} = $DUMPTYPE_BUMPPERCENT;
1065 push @EXPORT_OK, qw($DUMPTYPE_BUMPSIZE);
1066 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPSIZE);
1068 $_dumptype_key_VALUES{"DUMPTYPE_BUMPSIZE"} = $DUMPTYPE_BUMPSIZE;
1070 push @EXPORT_OK, qw($DUMPTYPE_BUMPDAYS);
1071 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPDAYS);
1073 $_dumptype_key_VALUES{"DUMPTYPE_BUMPDAYS"} = $DUMPTYPE_BUMPDAYS;
1075 push @EXPORT_OK, qw($DUMPTYPE_BUMPMULT);
1076 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPMULT);
1078 $_dumptype_key_VALUES{"DUMPTYPE_BUMPMULT"} = $DUMPTYPE_BUMPMULT;
1080 push @EXPORT_OK, qw($DUMPTYPE_STARTTIME);
1081 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_STARTTIME);
1083 $_dumptype_key_VALUES{"DUMPTYPE_STARTTIME"} = $DUMPTYPE_STARTTIME;
1085 push @EXPORT_OK, qw($DUMPTYPE_STRATEGY);
1086 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_STRATEGY);
1088 $_dumptype_key_VALUES{"DUMPTYPE_STRATEGY"} = $DUMPTYPE_STRATEGY;
1090 push @EXPORT_OK, qw($DUMPTYPE_ESTIMATE);
1091 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_ESTIMATE);
1093 $_dumptype_key_VALUES{"DUMPTYPE_ESTIMATE"} = $DUMPTYPE_ESTIMATE;
1095 push @EXPORT_OK, qw($DUMPTYPE_COMPRESS);
1096 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_COMPRESS);
1098 $_dumptype_key_VALUES{"DUMPTYPE_COMPRESS"} = $DUMPTYPE_COMPRESS;
1100 push @EXPORT_OK, qw($DUMPTYPE_ENCRYPT);
1101 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_ENCRYPT);
1103 $_dumptype_key_VALUES{"DUMPTYPE_ENCRYPT"} = $DUMPTYPE_ENCRYPT;
1105 push @EXPORT_OK, qw($DUMPTYPE_SRV_DECRYPT_OPT);
1106 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SRV_DECRYPT_OPT);
1108 $_dumptype_key_VALUES{"DUMPTYPE_SRV_DECRYPT_OPT"} = $DUMPTYPE_SRV_DECRYPT_OPT;
1110 push @EXPORT_OK, qw($DUMPTYPE_CLNT_DECRYPT_OPT);
1111 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLNT_DECRYPT_OPT);
1113 $_dumptype_key_VALUES{"DUMPTYPE_CLNT_DECRYPT_OPT"} = $DUMPTYPE_CLNT_DECRYPT_OPT;
1115 push @EXPORT_OK, qw($DUMPTYPE_COMPRATE);
1116 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_COMPRATE);
1118 $_dumptype_key_VALUES{"DUMPTYPE_COMPRATE"} = $DUMPTYPE_COMPRATE;
1120 push @EXPORT_OK, qw($DUMPTYPE_TAPE_SPLITSIZE);
1121 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_TAPE_SPLITSIZE);
1123 $_dumptype_key_VALUES{"DUMPTYPE_TAPE_SPLITSIZE"} = $DUMPTYPE_TAPE_SPLITSIZE;
1125 push @EXPORT_OK, qw($DUMPTYPE_FALLBACK_SPLITSIZE);
1126 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_FALLBACK_SPLITSIZE);
1128 $_dumptype_key_VALUES{"DUMPTYPE_FALLBACK_SPLITSIZE"} = $DUMPTYPE_FALLBACK_SPLITSIZE;
1130 push @EXPORT_OK, qw($DUMPTYPE_SPLIT_DISKBUFFER);
1131 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SPLIT_DISKBUFFER);
1133 $_dumptype_key_VALUES{"DUMPTYPE_SPLIT_DISKBUFFER"} = $DUMPTYPE_SPLIT_DISKBUFFER;
1135 push @EXPORT_OK, qw($DUMPTYPE_RECORD);
1136 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_RECORD);
1138 $_dumptype_key_VALUES{"DUMPTYPE_RECORD"} = $DUMPTYPE_RECORD;
1140 push @EXPORT_OK, qw($DUMPTYPE_SKIP_INCR);
1141 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SKIP_INCR);
1143 $_dumptype_key_VALUES{"DUMPTYPE_SKIP_INCR"} = $DUMPTYPE_SKIP_INCR;
1145 push @EXPORT_OK, qw($DUMPTYPE_SKIP_FULL);
1146 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SKIP_FULL);
1148 $_dumptype_key_VALUES{"DUMPTYPE_SKIP_FULL"} = $DUMPTYPE_SKIP_FULL;
1150 push @EXPORT_OK, qw($DUMPTYPE_HOLDINGDISK);
1151 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_HOLDINGDISK);
1153 $_dumptype_key_VALUES{"DUMPTYPE_HOLDINGDISK"} = $DUMPTYPE_HOLDINGDISK;
1155 push @EXPORT_OK, qw($DUMPTYPE_KENCRYPT);
1156 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_KENCRYPT);
1158 $_dumptype_key_VALUES{"DUMPTYPE_KENCRYPT"} = $DUMPTYPE_KENCRYPT;
1160 push @EXPORT_OK, qw($DUMPTYPE_IGNORE);
1161 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_IGNORE);
1163 $_dumptype_key_VALUES{"DUMPTYPE_IGNORE"} = $DUMPTYPE_IGNORE;
1165 push @EXPORT_OK, qw($DUMPTYPE_INDEX);
1166 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_INDEX);
1168 $_dumptype_key_VALUES{"DUMPTYPE_INDEX"} = $DUMPTYPE_INDEX;
1170 #copy symbols in dumptype_key to getconf
1171 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"dumptype_key"}};
1173 push @EXPORT_OK, qw(interface_key_to_string);
1174 push @{$EXPORT_TAGS{"interface_key"}}, qw(interface_key_to_string);
1176 my %_interface_key_VALUES;
1177 #Convert an enum value to a single string
1178 sub interface_key_to_string {
1181 for my $k (keys %_interface_key_VALUES) {
1182 my $v = $_interface_key_VALUES{$k};
1184 #is this a matching flag?
1185 if ($enumval == $v) {
1190 #default, just return the number
1194 push @EXPORT_OK, qw($INTER_COMMENT);
1195 push @{$EXPORT_TAGS{"interface_key"}}, qw($INTER_COMMENT);
1197 $_interface_key_VALUES{"INTER_COMMENT"} = $INTER_COMMENT;
1199 push @EXPORT_OK, qw($INTER_MAXUSAGE);
1200 push @{$EXPORT_TAGS{"interface_key"}}, qw($INTER_MAXUSAGE);
1202 $_interface_key_VALUES{"INTER_MAXUSAGE"} = $INTER_MAXUSAGE;
1204 #copy symbols in interface_key to getconf
1205 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"interface_key"}};
1207 push @EXPORT_OK, qw(holdingdisk_key_to_string);
1208 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw(holdingdisk_key_to_string);
1210 my %_holdingdisk_key_VALUES;
1211 #Convert an enum value to a single string
1212 sub holdingdisk_key_to_string {
1215 for my $k (keys %_holdingdisk_key_VALUES) {
1216 my $v = $_holdingdisk_key_VALUES{$k};
1218 #is this a matching flag?
1219 if ($enumval == $v) {
1224 #default, just return the number
1228 push @EXPORT_OK, qw($HOLDING_COMMENT);
1229 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_COMMENT);
1231 $_holdingdisk_key_VALUES{"HOLDING_COMMENT"} = $HOLDING_COMMENT;
1233 push @EXPORT_OK, qw($HOLDING_DISKDIR);
1234 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_DISKDIR);
1236 $_holdingdisk_key_VALUES{"HOLDING_DISKDIR"} = $HOLDING_DISKDIR;
1238 push @EXPORT_OK, qw($HOLDING_DISKSIZE);
1239 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_DISKSIZE);
1241 $_holdingdisk_key_VALUES{"HOLDING_DISKSIZE"} = $HOLDING_DISKSIZE;
1243 push @EXPORT_OK, qw($HOLDING_CHUNKSIZE);
1244 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_CHUNKSIZE);
1246 $_holdingdisk_key_VALUES{"HOLDING_CHUNKSIZE"} = $HOLDING_CHUNKSIZE;
1248 #copy symbols in holdingdisk_key to getconf
1249 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"holdingdisk_key"}};
1251 push @EXPORT_OK, qw(dump_holdingdisk_t_to_string);
1252 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw(dump_holdingdisk_t_to_string);
1254 my %_dump_holdingdisk_t_VALUES;
1255 #Convert an enum value to a single string
1256 sub dump_holdingdisk_t_to_string {
1259 for my $k (keys %_dump_holdingdisk_t_VALUES) {
1260 my $v = $_dump_holdingdisk_t_VALUES{$k};
1262 #is this a matching flag?
1263 if ($enumval == $v) {
1268 #default, just return the number
1272 push @EXPORT_OK, qw($HOLD_NEVER);
1273 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw($HOLD_NEVER);
1275 $_dump_holdingdisk_t_VALUES{"HOLD_NEVER"} = $HOLD_NEVER;
1277 push @EXPORT_OK, qw($HOLD_AUTO);
1278 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw($HOLD_AUTO);
1280 $_dump_holdingdisk_t_VALUES{"HOLD_AUTO"} = $HOLD_AUTO;
1282 push @EXPORT_OK, qw($HOLD_REQUIRED);
1283 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw($HOLD_REQUIRED);
1285 $_dump_holdingdisk_t_VALUES{"HOLD_REQUIRED"} = $HOLD_REQUIRED;
1287 #copy symbols in dump_holdingdisk_t to getconf
1288 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"dump_holdingdisk_t"}};
1290 push @EXPORT_OK, qw(comp_t_to_string);
1291 push @{$EXPORT_TAGS{"comp_t"}}, qw(comp_t_to_string);
1294 #Convert an enum value to a single string
1295 sub comp_t_to_string {
1298 for my $k (keys %_comp_t_VALUES) {
1299 my $v = $_comp_t_VALUES{$k};
1301 #is this a matching flag?
1302 if ($enumval == $v) {
1307 #default, just return the number
1311 push @EXPORT_OK, qw($COMP_NONE);
1312 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_NONE);
1314 $_comp_t_VALUES{"COMP_NONE"} = $COMP_NONE;
1316 push @EXPORT_OK, qw($COMP_FAST);
1317 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_FAST);
1319 $_comp_t_VALUES{"COMP_FAST"} = $COMP_FAST;
1321 push @EXPORT_OK, qw($COMP_BEST);
1322 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_BEST);
1324 $_comp_t_VALUES{"COMP_BEST"} = $COMP_BEST;
1326 push @EXPORT_OK, qw($COMP_CUST);
1327 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_CUST);
1329 $_comp_t_VALUES{"COMP_CUST"} = $COMP_CUST;
1331 push @EXPORT_OK, qw($COMP_SERVER_FAST);
1332 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_SERVER_FAST);
1334 $_comp_t_VALUES{"COMP_SERVER_FAST"} = $COMP_SERVER_FAST;
1336 push @EXPORT_OK, qw($COMP_SERVER_BEST);
1337 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_SERVER_BEST);
1339 $_comp_t_VALUES{"COMP_SERVER_BEST"} = $COMP_SERVER_BEST;
1341 push @EXPORT_OK, qw($COMP_SERVER_CUST);
1342 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_SERVER_CUST);
1344 $_comp_t_VALUES{"COMP_SERVER_CUST"} = $COMP_SERVER_CUST;
1346 #copy symbols in comp_t to getconf
1347 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"comp_t"}};
1349 push @EXPORT_OK, qw(encrypt_t_to_string);
1350 push @{$EXPORT_TAGS{"encrypt_t"}}, qw(encrypt_t_to_string);
1352 my %_encrypt_t_VALUES;
1353 #Convert an enum value to a single string
1354 sub encrypt_t_to_string {
1357 for my $k (keys %_encrypt_t_VALUES) {
1358 my $v = $_encrypt_t_VALUES{$k};
1360 #is this a matching flag?
1361 if ($enumval == $v) {
1366 #default, just return the number
1370 push @EXPORT_OK, qw($ENCRYPT_NONE);
1371 push @{$EXPORT_TAGS{"encrypt_t"}}, qw($ENCRYPT_NONE);
1373 $_encrypt_t_VALUES{"ENCRYPT_NONE"} = $ENCRYPT_NONE;
1375 push @EXPORT_OK, qw($ENCRYPT_CUST);
1376 push @{$EXPORT_TAGS{"encrypt_t"}}, qw($ENCRYPT_CUST);
1378 $_encrypt_t_VALUES{"ENCRYPT_CUST"} = $ENCRYPT_CUST;
1380 push @EXPORT_OK, qw($ENCRYPT_SERV_CUST);
1381 push @{$EXPORT_TAGS{"encrypt_t"}}, qw($ENCRYPT_SERV_CUST);
1383 $_encrypt_t_VALUES{"ENCRYPT_SERV_CUST"} = $ENCRYPT_SERV_CUST;
1385 #copy symbols in encrypt_t to getconf
1386 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"encrypt_t"}};
1388 push @EXPORT_OK, qw(strategy_t_to_string);
1389 push @{$EXPORT_TAGS{"strategy_t"}}, qw(strategy_t_to_string);
1391 my %_strategy_t_VALUES;
1392 #Convert an enum value to a single string
1393 sub strategy_t_to_string {
1396 for my $k (keys %_strategy_t_VALUES) {
1397 my $v = $_strategy_t_VALUES{$k};
1399 #is this a matching flag?
1400 if ($enumval == $v) {
1405 #default, just return the number
1409 push @EXPORT_OK, qw($DS_SKIP);
1410 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_SKIP);
1412 $_strategy_t_VALUES{"DS_SKIP"} = $DS_SKIP;
1414 push @EXPORT_OK, qw($DS_STANDARD);
1415 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_STANDARD);
1417 $_strategy_t_VALUES{"DS_STANDARD"} = $DS_STANDARD;
1419 push @EXPORT_OK, qw($DS_NOFULL);
1420 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_NOFULL);
1422 $_strategy_t_VALUES{"DS_NOFULL"} = $DS_NOFULL;
1424 push @EXPORT_OK, qw($DS_NOINC);
1425 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_NOINC);
1427 $_strategy_t_VALUES{"DS_NOINC"} = $DS_NOINC;
1429 push @EXPORT_OK, qw($DS_4);
1430 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_4);
1432 $_strategy_t_VALUES{"DS_4"} = $DS_4;
1434 push @EXPORT_OK, qw($DS_5);
1435 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_5);
1437 $_strategy_t_VALUES{"DS_5"} = $DS_5;
1439 push @EXPORT_OK, qw($DS_HANOI);
1440 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_HANOI);
1442 $_strategy_t_VALUES{"DS_HANOI"} = $DS_HANOI;
1444 push @EXPORT_OK, qw($DS_INCRONLY);
1445 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_INCRONLY);
1447 $_strategy_t_VALUES{"DS_INCRONLY"} = $DS_INCRONLY;
1449 #copy symbols in strategy_t to getconf
1450 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"strategy_t"}};
1452 push @EXPORT_OK, qw(estimate_t_to_string);
1453 push @{$EXPORT_TAGS{"estimate_t"}}, qw(estimate_t_to_string);
1455 my %_estimate_t_VALUES;
1456 #Convert an enum value to a single string
1457 sub estimate_t_to_string {
1460 for my $k (keys %_estimate_t_VALUES) {
1461 my $v = $_estimate_t_VALUES{$k};
1463 #is this a matching flag?
1464 if ($enumval == $v) {
1469 #default, just return the number
1473 push @EXPORT_OK, qw($ES_CLIENT);
1474 push @{$EXPORT_TAGS{"estimate_t"}}, qw($ES_CLIENT);
1476 $_estimate_t_VALUES{"ES_CLIENT"} = $ES_CLIENT;
1478 push @EXPORT_OK, qw($ES_SERVER);
1479 push @{$EXPORT_TAGS{"estimate_t"}}, qw($ES_SERVER);
1481 $_estimate_t_VALUES{"ES_SERVER"} = $ES_SERVER;
1483 push @EXPORT_OK, qw($ES_CALCSIZE);
1484 push @{$EXPORT_TAGS{"estimate_t"}}, qw($ES_CALCSIZE);
1486 $_estimate_t_VALUES{"ES_CALCSIZE"} = $ES_CALCSIZE;
1488 #copy symbols in estimate_t to getconf
1489 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"estimate_t"}};
1491 push @EXPORT_OK, qw(taperalgo_t_to_string);
1492 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw(taperalgo_t_to_string);
1494 my %_taperalgo_t_VALUES;
1495 #Convert an enum value to a single string
1496 sub taperalgo_t_to_string {
1499 for my $k (keys %_taperalgo_t_VALUES) {
1500 my $v = $_taperalgo_t_VALUES{$k};
1502 #is this a matching flag?
1503 if ($enumval == $v) {
1508 #default, just return the number
1512 push @EXPORT_OK, qw($ALGO_FIRST);
1513 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_FIRST);
1515 $_taperalgo_t_VALUES{"ALGO_FIRST"} = $ALGO_FIRST;
1517 push @EXPORT_OK, qw($ALGO_FIRSTFIT);
1518 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_FIRSTFIT);
1520 $_taperalgo_t_VALUES{"ALGO_FIRSTFIT"} = $ALGO_FIRSTFIT;
1522 push @EXPORT_OK, qw($ALGO_LARGEST);
1523 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_LARGEST);
1525 $_taperalgo_t_VALUES{"ALGO_LARGEST"} = $ALGO_LARGEST;
1527 push @EXPORT_OK, qw($ALGO_LARGESTFIT);
1528 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_LARGESTFIT);
1530 $_taperalgo_t_VALUES{"ALGO_LARGESTFIT"} = $ALGO_LARGESTFIT;
1532 push @EXPORT_OK, qw($ALGO_SMALLEST);
1533 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_SMALLEST);
1535 $_taperalgo_t_VALUES{"ALGO_SMALLEST"} = $ALGO_SMALLEST;
1537 push @EXPORT_OK, qw($ALGO_LAST);
1538 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_LAST);
1540 $_taperalgo_t_VALUES{"ALGO_LAST"} = $ALGO_LAST;
1542 #copy symbols in taperalgo_t to getconf
1543 push @{$EXPORT_TAGS{"getconf"}}, @{$EXPORT_TAGS{"taperalgo_t"}};
1545 push @EXPORT_OK, qw(getconf getconf_seen
1546 getconf_byname getconf_list);
1547 push @{$EXPORT_TAGS{"getconf"}}, qw(getconf getconf_seen
1548 getconf_byname getconf_list);
1550 push @EXPORT_OK, qw(lookup_tapetype tapetype_getconf tapetype_name
1551 tapetype_seen tapetype_seen);
1552 push @{$EXPORT_TAGS{"getconf"}}, qw(lookup_tapetype tapetype_getconf tapetype_name
1553 tapetype_seen tapetype_seen);
1555 push @EXPORT_OK, qw(lookup_dumptype dumptype_getconf dumptype_name
1556 dumptype_seen dumptype_seen);
1557 push @{$EXPORT_TAGS{"getconf"}}, qw(lookup_dumptype dumptype_getconf dumptype_name
1558 dumptype_seen dumptype_seen);
1560 push @EXPORT_OK, qw(lookup_interface interface_getconf interface_name
1561 interface_seen interface_seen);
1562 push @{$EXPORT_TAGS{"getconf"}}, qw(lookup_interface interface_getconf interface_name
1563 interface_seen interface_seen);
1565 push @EXPORT_OK, qw(lookup_holdingdisk holdingdisk_getconf holdingdisk_name
1566 getconf_holdingdisks holdingdisk_next
1567 holdingdisk_seen holdingdisk_seen);
1568 push @{$EXPORT_TAGS{"getconf"}}, qw(lookup_holdingdisk holdingdisk_getconf holdingdisk_name
1569 getconf_holdingdisks holdingdisk_next
1570 holdingdisk_seen holdingdisk_seen);
1572 push @EXPORT_OK, qw(getconf_unit_divisor
1574 $debug_amandad $debug_amidxtaped $debug_amindexd $debug_amrecover
1575 $debug_auth $debug_event $debug_holding $debug_protocol
1576 $debug_planner $debug_driver $debug_dumper $debug_chunker
1577 $debug_taper $debug_selfcheck $debug_sendsize $debug_sendbackup);
1578 push @{$EXPORT_TAGS{"getconf"}}, qw(getconf_unit_divisor
1580 $debug_amandad $debug_amidxtaped $debug_amindexd $debug_amrecover
1581 $debug_auth $debug_event $debug_holding $debug_protocol
1582 $debug_planner $debug_driver $debug_dumper $debug_chunker
1583 $debug_taper $debug_selfcheck $debug_sendsize $debug_sendbackup);
1585 push @EXPORT_OK, qw(new_config_overwrites free_config_overwrites add_config_overwrite
1586 add_config_overwrite_opt apply_config_overwrites);
1587 push @{$EXPORT_TAGS{"init"}}, qw(new_config_overwrites free_config_overwrites add_config_overwrite
1588 add_config_overwrite_opt apply_config_overwrites);
1590 push @EXPORT_OK, qw(config_init_flags_to_strings);
1591 push @{$EXPORT_TAGS{"config_init_flags"}}, qw(config_init_flags_to_strings);
1593 my %_config_init_flags_VALUES;
1594 #Convert a flag value to a list of names for flags that are set.
1595 sub config_init_flags_to_strings {
1599 for my $k (keys %_config_init_flags_VALUES) {
1600 my $v = $_config_init_flags_VALUES{$k};
1602 #is this a matching flag?
1603 if (($v == 0 && $flags == 0) || ($v != 0 && ($flags & $v) == $v)) {
1608 #by default, just return the number as a 1-element list
1616 push @EXPORT_OK, qw($CONFIG_INIT_EXPLICIT_NAME);
1617 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_EXPLICIT_NAME);
1619 $_config_init_flags_VALUES{"CONFIG_INIT_EXPLICIT_NAME"} = $CONFIG_INIT_EXPLICIT_NAME;
1621 push @EXPORT_OK, qw($CONFIG_INIT_USE_CWD);
1622 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_USE_CWD);
1624 $_config_init_flags_VALUES{"CONFIG_INIT_USE_CWD"} = $CONFIG_INIT_USE_CWD;
1626 push @EXPORT_OK, qw($CONFIG_INIT_CLIENT);
1627 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_CLIENT);
1629 $_config_init_flags_VALUES{"CONFIG_INIT_CLIENT"} = $CONFIG_INIT_CLIENT;
1631 push @EXPORT_OK, qw($CONFIG_INIT_OVERLAY);
1632 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_OVERLAY);
1634 $_config_init_flags_VALUES{"CONFIG_INIT_OVERLAY"} = $CONFIG_INIT_OVERLAY;
1636 push @EXPORT_OK, qw($CONFIG_INIT_FATAL);
1637 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_FATAL);
1639 $_config_init_flags_VALUES{"CONFIG_INIT_FATAL"} = $CONFIG_INIT_FATAL;
1641 #copy symbols in config_init_flags to init
1642 push @{$EXPORT_TAGS{"init"}}, @{$EXPORT_TAGS{"config_init_flags"}};
1644 push @EXPORT_OK, qw(config_init config_uninit get_config_options);
1645 push @{$EXPORT_TAGS{"init"}}, qw(config_init config_uninit get_config_options);
1647 push @EXPORT_OK, qw(get_config_name
1649 get_config_filename);
1650 push @{$EXPORT_TAGS{"init"}}, qw(get_config_name
1652 get_config_filename);
1654 push @EXPORT_OK, qw(dump_configuration config_dir_relative taperalgo2str find_multiplier);