Imported Upstream version 2.6.0
[debian/amanda] / perl / Amanda / Config.pm
1 # This file was automatically generated by SWIG (http://www.swig.org).
2 # Version 1.3.33
3 #
4 # Don't modify this file, modify the SWIG interface instead.
5
6 package Amanda::Config;
7 require Exporter;
8 require DynaLoader;
9 @ISA = qw(Exporter DynaLoader);
10 package Amanda::Configc;
11 bootstrap Amanda::Config;
12 package Amanda::Config;
13 @EXPORT = qw( );
14
15 # ---------- BASE METHODS -------------
16
17 package Amanda::Config;
18
19 sub TIEHASH {
20     my ($classname,$obj) = @_;
21     return bless $obj, $classname;
22 }
23
24 sub CLEAR { }
25
26 sub FIRSTKEY { }
27
28 sub NEXTKEY { }
29
30 sub FETCH {
31     my ($self,$field) = @_;
32     my $member_func = "swig_${field}_get";
33     $self->$member_func();
34 }
35
36 sub STORE {
37     my ($self,$field,$newval) = @_;
38     my $member_func = "swig_${field}_set";
39     $self->$member_func($newval);
40 }
41
42 sub this {
43     my $ptr = shift;
44     return tied(%$ptr);
45 }
46
47
48 # ------- FUNCTION WRAPPERS --------
49
50 package Amanda::Config;
51
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;
90
91 # ------- VARIABLE STUBS --------
92
93 package Amanda::Config;
94
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;
278
279 @EXPORT_OK = ();
280 %EXPORT_TAGS = ();
281
282 =head1 NAME
283
284 Amanda::Config - access to Amanda configuration parameters
285
286 =head1 SYNOPSIS
287
288   use Amanda::Config qw( :init :getconf );
289
290   config_init($CONFIG_INIT_EXPLICIT_NAME, $ARGV[1])
291     or die("errors processing config file " . $Amanda::Config::get_config_filename());
292
293   print "tape device is ", getconf($CNF_TAPEDEV), "\n";
294
295 This API closely parallels the C API.  See L<conffile.h> for details
296 on the functions and constants available here.
297
298 =head1 API STATUS
299
300 Stable
301
302 =head1 INITIALIZATION
303
304 The Amanda configuration is treated as a global state for the
305 application.  It is not possible to load two configurations
306 simultaneously.
307
308 All initialization-related symbols can be imported with the tag
309 C<:init>.
310
311 =head2 LOADING CONFIGURATION
312
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.
317
318 =over
319
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.
322
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.
325
326 =item If C<CONFIG_INIT_CLIENT> is given, then a client configuration
327 is loaded.
328
329 =item If C<CONFIG_INIT_OVERLAY> is given, then any existing
330 configuration is not reset.
331
332 =item If C<CONFIG_INIT_FATAL> is given, then any errors are considered
333 fatal, and C<config_init> does not return.
334
335 =back
336
337 See C<conffile.h> for more detailed information on these flags and
338 their interactions.
339
340 C<config_uninit()> reverses the effects of C<config_init>.  It is
341 not often used.
342
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.
348
349 =head2 CONFIG OVERWRITES
350
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:
355
356   my $config_overwrites = new_config_overwrites($#ARGV+1);
357     GetOptions(
358         # ...
359         'o=s' => sub { add_config_overwrite_opt($config_overwrites, $_[1]); },
360     ) or usage();
361   my $cfg_ok = config_init($CONFIG_INIT_EXPLICIT_NAME | $CONFIG_INIT_USE_CWD, $config_name);
362   apply_config_overwrites($config_overwrites);
363
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.
371
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.
376
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
380 available yet)
381
382 =head1 PARAMETER ACCESS
383
384 Amanda configurations consist of "global" parameters and several
385 sets of "subsections" -- one set for dumptypes, one for tapetypes,
386 and so on.
387
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.
394
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.
400
401 Each subsection type has the following functions:
402
403 =over
404
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;
408
409 =item C<TYP_name($ss)>, returning the name of the subsection;
410
411 =item C<TYP_getconf($ss, $cnf)>, which fetches a parameter value from
412 C<$ss>; and
413
414 =item C<TYP_seen($ss, $cnf)>, which returns a true value if <$cnf>
415 was seen in the subsection.
416
417 =back
418
419 The subsections are:
420
421 =over
422
423 =item C<tapetype>, with constants beginning with C<$TAPETYPE_>,
424
425 =item C<dumptype>, with constants beginning with C<$DUMPTYPE_>,
426
427 =item C<interface>, with constants beginning with C<$INTER_>, and
428
429 =item C<holdingdisk>, with constants beginning with C<$HOLDING_>.
430
431 =back
432
433 See C<conffile.h> for the names of the constants themselves.
434
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.
439
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>!
444
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>.
448
449 All parameter access functions and constants can be imported with
450 the tag C<:getconf>.
451
452 =head1 MISCELLANEOUS
453
454 These functions defy categorization.
455
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.
459
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.
463
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).
468
469 =cut
470
471 push @EXPORT_OK, qw(confparm_key_to_string);
472 push @{$EXPORT_TAGS{"confparm_key"}}, qw(confparm_key_to_string);
473
474 my %_confparm_key_VALUES;
475 #Convert an enum value to a single string
476 sub confparm_key_to_string {
477     my ($enumval) = @_;
478
479     for my $k (keys %_confparm_key_VALUES) {
480         my $v = $_confparm_key_VALUES{$k};
481
482         #is this a matching flag?
483         if ($enumval == $v) {
484             return $k;
485         }
486     }
487
488 #default, just return the number
489     return $enumval;
490 }
491
492 push @EXPORT_OK, qw($CNF_ORG);
493 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_ORG);
494
495 $_confparm_key_VALUES{"CNF_ORG"} = $CNF_ORG;
496
497 push @EXPORT_OK, qw($CNF_CONF);
498 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CONF);
499
500 $_confparm_key_VALUES{"CNF_CONF"} = $CNF_CONF;
501
502 push @EXPORT_OK, qw($CNF_INDEX_SERVER);
503 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INDEX_SERVER);
504
505 $_confparm_key_VALUES{"CNF_INDEX_SERVER"} = $CNF_INDEX_SERVER;
506
507 push @EXPORT_OK, qw($CNF_TAPE_SERVER);
508 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPE_SERVER);
509
510 $_confparm_key_VALUES{"CNF_TAPE_SERVER"} = $CNF_TAPE_SERVER;
511
512 push @EXPORT_OK, qw($CNF_AUTH);
513 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AUTH);
514
515 $_confparm_key_VALUES{"CNF_AUTH"} = $CNF_AUTH;
516
517 push @EXPORT_OK, qw($CNF_SSH_KEYS);
518 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_SSH_KEYS);
519
520 $_confparm_key_VALUES{"CNF_SSH_KEYS"} = $CNF_SSH_KEYS;
521
522 push @EXPORT_OK, qw($CNF_AMANDAD_PATH);
523 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMANDAD_PATH);
524
525 $_confparm_key_VALUES{"CNF_AMANDAD_PATH"} = $CNF_AMANDAD_PATH;
526
527 push @EXPORT_OK, qw($CNF_CLIENT_USERNAME);
528 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CLIENT_USERNAME);
529
530 $_confparm_key_VALUES{"CNF_CLIENT_USERNAME"} = $CNF_CLIENT_USERNAME;
531
532 push @EXPORT_OK, qw($CNF_GNUTAR_LIST_DIR);
533 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_GNUTAR_LIST_DIR);
534
535 $_confparm_key_VALUES{"CNF_GNUTAR_LIST_DIR"} = $CNF_GNUTAR_LIST_DIR;
536
537 push @EXPORT_OK, qw($CNF_AMANDATES);
538 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMANDATES);
539
540 $_confparm_key_VALUES{"CNF_AMANDATES"} = $CNF_AMANDATES;
541
542 push @EXPORT_OK, qw($CNF_MAILTO);
543 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_MAILTO);
544
545 $_confparm_key_VALUES{"CNF_MAILTO"} = $CNF_MAILTO;
546
547 push @EXPORT_OK, qw($CNF_DUMPUSER);
548 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DUMPUSER);
549
550 $_confparm_key_VALUES{"CNF_DUMPUSER"} = $CNF_DUMPUSER;
551
552 push @EXPORT_OK, qw($CNF_TAPEDEV);
553 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPEDEV);
554
555 $_confparm_key_VALUES{"CNF_TAPEDEV"} = $CNF_TAPEDEV;
556
557 push @EXPORT_OK, qw($CNF_DEVICE_PROPERTY);
558 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEVICE_PROPERTY);
559
560 $_confparm_key_VALUES{"CNF_DEVICE_PROPERTY"} = $CNF_DEVICE_PROPERTY;
561
562 push @EXPORT_OK, qw($CNF_CHANGERDEV);
563 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CHANGERDEV);
564
565 $_confparm_key_VALUES{"CNF_CHANGERDEV"} = $CNF_CHANGERDEV;
566
567 push @EXPORT_OK, qw($CNF_CHANGERFILE);
568 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CHANGERFILE);
569
570 $_confparm_key_VALUES{"CNF_CHANGERFILE"} = $CNF_CHANGERFILE;
571
572 push @EXPORT_OK, qw($CNF_LABELSTR);
573 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_LABELSTR);
574
575 $_confparm_key_VALUES{"CNF_LABELSTR"} = $CNF_LABELSTR;
576
577 push @EXPORT_OK, qw($CNF_TAPELIST);
578 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPELIST);
579
580 $_confparm_key_VALUES{"CNF_TAPELIST"} = $CNF_TAPELIST;
581
582 push @EXPORT_OK, qw($CNF_DISKFILE);
583 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DISKFILE);
584
585 $_confparm_key_VALUES{"CNF_DISKFILE"} = $CNF_DISKFILE;
586
587 push @EXPORT_OK, qw($CNF_INFOFILE);
588 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INFOFILE);
589
590 $_confparm_key_VALUES{"CNF_INFOFILE"} = $CNF_INFOFILE;
591
592 push @EXPORT_OK, qw($CNF_LOGDIR);
593 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_LOGDIR);
594
595 $_confparm_key_VALUES{"CNF_LOGDIR"} = $CNF_LOGDIR;
596
597 push @EXPORT_OK, qw($CNF_INDEXDIR);
598 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INDEXDIR);
599
600 $_confparm_key_VALUES{"CNF_INDEXDIR"} = $CNF_INDEXDIR;
601
602 push @EXPORT_OK, qw($CNF_TAPETYPE);
603 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPETYPE);
604
605 $_confparm_key_VALUES{"CNF_TAPETYPE"} = $CNF_TAPETYPE;
606
607 push @EXPORT_OK, qw($CNF_DUMPCYCLE);
608 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DUMPCYCLE);
609
610 $_confparm_key_VALUES{"CNF_DUMPCYCLE"} = $CNF_DUMPCYCLE;
611
612 push @EXPORT_OK, qw($CNF_RUNSPERCYCLE);
613 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RUNSPERCYCLE);
614
615 $_confparm_key_VALUES{"CNF_RUNSPERCYCLE"} = $CNF_RUNSPERCYCLE;
616
617 push @EXPORT_OK, qw($CNF_TAPECYCLE);
618 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPECYCLE);
619
620 $_confparm_key_VALUES{"CNF_TAPECYCLE"} = $CNF_TAPECYCLE;
621
622 push @EXPORT_OK, qw($CNF_NETUSAGE);
623 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_NETUSAGE);
624
625 $_confparm_key_VALUES{"CNF_NETUSAGE"} = $CNF_NETUSAGE;
626
627 push @EXPORT_OK, qw($CNF_INPARALLEL);
628 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INPARALLEL);
629
630 $_confparm_key_VALUES{"CNF_INPARALLEL"} = $CNF_INPARALLEL;
631
632 push @EXPORT_OK, qw($CNF_DUMPORDER);
633 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DUMPORDER);
634
635 $_confparm_key_VALUES{"CNF_DUMPORDER"} = $CNF_DUMPORDER;
636
637 push @EXPORT_OK, qw($CNF_BUMPPERCENT);
638 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPPERCENT);
639
640 $_confparm_key_VALUES{"CNF_BUMPPERCENT"} = $CNF_BUMPPERCENT;
641
642 push @EXPORT_OK, qw($CNF_BUMPSIZE);
643 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPSIZE);
644
645 $_confparm_key_VALUES{"CNF_BUMPSIZE"} = $CNF_BUMPSIZE;
646
647 push @EXPORT_OK, qw($CNF_BUMPMULT);
648 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPMULT);
649
650 $_confparm_key_VALUES{"CNF_BUMPMULT"} = $CNF_BUMPMULT;
651
652 push @EXPORT_OK, qw($CNF_BUMPDAYS);
653 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPDAYS);
654
655 $_confparm_key_VALUES{"CNF_BUMPDAYS"} = $CNF_BUMPDAYS;
656
657 push @EXPORT_OK, qw($CNF_TPCHANGER);
658 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TPCHANGER);
659
660 $_confparm_key_VALUES{"CNF_TPCHANGER"} = $CNF_TPCHANGER;
661
662 push @EXPORT_OK, qw($CNF_RUNTAPES);
663 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RUNTAPES);
664
665 $_confparm_key_VALUES{"CNF_RUNTAPES"} = $CNF_RUNTAPES;
666
667 push @EXPORT_OK, qw($CNF_MAXDUMPS);
668 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_MAXDUMPS);
669
670 $_confparm_key_VALUES{"CNF_MAXDUMPS"} = $CNF_MAXDUMPS;
671
672 push @EXPORT_OK, qw($CNF_ETIMEOUT);
673 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_ETIMEOUT);
674
675 $_confparm_key_VALUES{"CNF_ETIMEOUT"} = $CNF_ETIMEOUT;
676
677 push @EXPORT_OK, qw($CNF_DTIMEOUT);
678 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DTIMEOUT);
679
680 $_confparm_key_VALUES{"CNF_DTIMEOUT"} = $CNF_DTIMEOUT;
681
682 push @EXPORT_OK, qw($CNF_CTIMEOUT);
683 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CTIMEOUT);
684
685 $_confparm_key_VALUES{"CNF_CTIMEOUT"} = $CNF_CTIMEOUT;
686
687 push @EXPORT_OK, qw($CNF_TAPEBUFS);
688 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPEBUFS);
689
690 $_confparm_key_VALUES{"CNF_TAPEBUFS"} = $CNF_TAPEBUFS;
691
692 push @EXPORT_OK, qw($CNF_DEVICE_OUTPUT_BUFFER_SIZE);
693 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEVICE_OUTPUT_BUFFER_SIZE);
694
695 $_confparm_key_VALUES{"CNF_DEVICE_OUTPUT_BUFFER_SIZE"} = $CNF_DEVICE_OUTPUT_BUFFER_SIZE;
696
697 push @EXPORT_OK, qw($CNF_PRINTER);
698 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_PRINTER);
699
700 $_confparm_key_VALUES{"CNF_PRINTER"} = $CNF_PRINTER;
701
702 push @EXPORT_OK, qw($CNF_AUTOFLUSH);
703 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AUTOFLUSH);
704
705 $_confparm_key_VALUES{"CNF_AUTOFLUSH"} = $CNF_AUTOFLUSH;
706
707 push @EXPORT_OK, qw($CNF_RESERVE);
708 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RESERVE);
709
710 $_confparm_key_VALUES{"CNF_RESERVE"} = $CNF_RESERVE;
711
712 push @EXPORT_OK, qw($CNF_MAXDUMPSIZE);
713 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_MAXDUMPSIZE);
714
715 $_confparm_key_VALUES{"CNF_MAXDUMPSIZE"} = $CNF_MAXDUMPSIZE;
716
717 push @EXPORT_OK, qw($CNF_COLUMNSPEC);
718 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_COLUMNSPEC);
719
720 $_confparm_key_VALUES{"CNF_COLUMNSPEC"} = $CNF_COLUMNSPEC;
721
722 push @EXPORT_OK, qw($CNF_AMRECOVER_DO_FSF);
723 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMRECOVER_DO_FSF);
724
725 $_confparm_key_VALUES{"CNF_AMRECOVER_DO_FSF"} = $CNF_AMRECOVER_DO_FSF;
726
727 push @EXPORT_OK, qw($CNF_AMRECOVER_CHECK_LABEL);
728 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMRECOVER_CHECK_LABEL);
729
730 $_confparm_key_VALUES{"CNF_AMRECOVER_CHECK_LABEL"} = $CNF_AMRECOVER_CHECK_LABEL;
731
732 push @EXPORT_OK, qw($CNF_AMRECOVER_CHANGER);
733 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMRECOVER_CHANGER);
734
735 $_confparm_key_VALUES{"CNF_AMRECOVER_CHANGER"} = $CNF_AMRECOVER_CHANGER;
736
737 push @EXPORT_OK, qw($CNF_TAPERALGO);
738 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPERALGO);
739
740 $_confparm_key_VALUES{"CNF_TAPERALGO"} = $CNF_TAPERALGO;
741
742 push @EXPORT_OK, qw($CNF_FLUSH_THRESHOLD_DUMPED);
743 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_FLUSH_THRESHOLD_DUMPED);
744
745 $_confparm_key_VALUES{"CNF_FLUSH_THRESHOLD_DUMPED"} = $CNF_FLUSH_THRESHOLD_DUMPED;
746
747 push @EXPORT_OK, qw($CNF_FLUSH_THRESHOLD_SCHEDULED);
748 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_FLUSH_THRESHOLD_SCHEDULED);
749
750 $_confparm_key_VALUES{"CNF_FLUSH_THRESHOLD_SCHEDULED"} = $CNF_FLUSH_THRESHOLD_SCHEDULED;
751
752 push @EXPORT_OK, qw($CNF_TAPERFLUSH);
753 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPERFLUSH);
754
755 $_confparm_key_VALUES{"CNF_TAPERFLUSH"} = $CNF_TAPERFLUSH;
756
757 push @EXPORT_OK, qw($CNF_DISPLAYUNIT);
758 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DISPLAYUNIT);
759
760 $_confparm_key_VALUES{"CNF_DISPLAYUNIT"} = $CNF_DISPLAYUNIT;
761
762 push @EXPORT_OK, qw($CNF_KRB5KEYTAB);
763 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_KRB5KEYTAB);
764
765 $_confparm_key_VALUES{"CNF_KRB5KEYTAB"} = $CNF_KRB5KEYTAB;
766
767 push @EXPORT_OK, qw($CNF_KRB5PRINCIPAL);
768 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_KRB5PRINCIPAL);
769
770 $_confparm_key_VALUES{"CNF_KRB5PRINCIPAL"} = $CNF_KRB5PRINCIPAL;
771
772 push @EXPORT_OK, qw($CNF_LABEL_NEW_TAPES);
773 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_LABEL_NEW_TAPES);
774
775 $_confparm_key_VALUES{"CNF_LABEL_NEW_TAPES"} = $CNF_LABEL_NEW_TAPES;
776
777 push @EXPORT_OK, qw($CNF_USETIMESTAMPS);
778 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_USETIMESTAMPS);
779
780 $_confparm_key_VALUES{"CNF_USETIMESTAMPS"} = $CNF_USETIMESTAMPS;
781
782 push @EXPORT_OK, qw($CNF_REP_TRIES);
783 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_REP_TRIES);
784
785 $_confparm_key_VALUES{"CNF_REP_TRIES"} = $CNF_REP_TRIES;
786
787 push @EXPORT_OK, qw($CNF_CONNECT_TRIES);
788 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CONNECT_TRIES);
789
790 $_confparm_key_VALUES{"CNF_CONNECT_TRIES"} = $CNF_CONNECT_TRIES;
791
792 push @EXPORT_OK, qw($CNF_REQ_TRIES);
793 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_REQ_TRIES);
794
795 $_confparm_key_VALUES{"CNF_REQ_TRIES"} = $CNF_REQ_TRIES;
796
797 push @EXPORT_OK, qw($CNF_DEBUG_AMANDAD);
798 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMANDAD);
799
800 $_confparm_key_VALUES{"CNF_DEBUG_AMANDAD"} = $CNF_DEBUG_AMANDAD;
801
802 push @EXPORT_OK, qw($CNF_DEBUG_AMIDXTAPED);
803 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMIDXTAPED);
804
805 $_confparm_key_VALUES{"CNF_DEBUG_AMIDXTAPED"} = $CNF_DEBUG_AMIDXTAPED;
806
807 push @EXPORT_OK, qw($CNF_DEBUG_AMINDEXD);
808 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMINDEXD);
809
810 $_confparm_key_VALUES{"CNF_DEBUG_AMINDEXD"} = $CNF_DEBUG_AMINDEXD;
811
812 push @EXPORT_OK, qw($CNF_DEBUG_AMRECOVER);
813 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMRECOVER);
814
815 $_confparm_key_VALUES{"CNF_DEBUG_AMRECOVER"} = $CNF_DEBUG_AMRECOVER;
816
817 push @EXPORT_OK, qw($CNF_DEBUG_AUTH);
818 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AUTH);
819
820 $_confparm_key_VALUES{"CNF_DEBUG_AUTH"} = $CNF_DEBUG_AUTH;
821
822 push @EXPORT_OK, qw($CNF_DEBUG_EVENT);
823 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_EVENT);
824
825 $_confparm_key_VALUES{"CNF_DEBUG_EVENT"} = $CNF_DEBUG_EVENT;
826
827 push @EXPORT_OK, qw($CNF_DEBUG_HOLDING);
828 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_HOLDING);
829
830 $_confparm_key_VALUES{"CNF_DEBUG_HOLDING"} = $CNF_DEBUG_HOLDING;
831
832 push @EXPORT_OK, qw($CNF_DEBUG_PROTOCOL);
833 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_PROTOCOL);
834
835 $_confparm_key_VALUES{"CNF_DEBUG_PROTOCOL"} = $CNF_DEBUG_PROTOCOL;
836
837 push @EXPORT_OK, qw($CNF_DEBUG_PLANNER);
838 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_PLANNER);
839
840 $_confparm_key_VALUES{"CNF_DEBUG_PLANNER"} = $CNF_DEBUG_PLANNER;
841
842 push @EXPORT_OK, qw($CNF_DEBUG_DRIVER);
843 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_DRIVER);
844
845 $_confparm_key_VALUES{"CNF_DEBUG_DRIVER"} = $CNF_DEBUG_DRIVER;
846
847 push @EXPORT_OK, qw($CNF_DEBUG_DUMPER);
848 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_DUMPER);
849
850 $_confparm_key_VALUES{"CNF_DEBUG_DUMPER"} = $CNF_DEBUG_DUMPER;
851
852 push @EXPORT_OK, qw($CNF_DEBUG_CHUNKER);
853 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_CHUNKER);
854
855 $_confparm_key_VALUES{"CNF_DEBUG_CHUNKER"} = $CNF_DEBUG_CHUNKER;
856
857 push @EXPORT_OK, qw($CNF_DEBUG_TAPER);
858 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_TAPER);
859
860 $_confparm_key_VALUES{"CNF_DEBUG_TAPER"} = $CNF_DEBUG_TAPER;
861
862 push @EXPORT_OK, qw($CNF_DEBUG_SELFCHECK);
863 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_SELFCHECK);
864
865 $_confparm_key_VALUES{"CNF_DEBUG_SELFCHECK"} = $CNF_DEBUG_SELFCHECK;
866
867 push @EXPORT_OK, qw($CNF_DEBUG_SENDSIZE);
868 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_SENDSIZE);
869
870 $_confparm_key_VALUES{"CNF_DEBUG_SENDSIZE"} = $CNF_DEBUG_SENDSIZE;
871
872 push @EXPORT_OK, qw($CNF_DEBUG_SENDBACKUP);
873 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_SENDBACKUP);
874
875 $_confparm_key_VALUES{"CNF_DEBUG_SENDBACKUP"} = $CNF_DEBUG_SENDBACKUP;
876
877 push @EXPORT_OK, qw($CNF_RESERVED_UDP_PORT);
878 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RESERVED_UDP_PORT);
879
880 $_confparm_key_VALUES{"CNF_RESERVED_UDP_PORT"} = $CNF_RESERVED_UDP_PORT;
881
882 push @EXPORT_OK, qw($CNF_RESERVED_TCP_PORT);
883 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RESERVED_TCP_PORT);
884
885 $_confparm_key_VALUES{"CNF_RESERVED_TCP_PORT"} = $CNF_RESERVED_TCP_PORT;
886
887 push @EXPORT_OK, qw($CNF_UNRESERVED_TCP_PORT);
888 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_UNRESERVED_TCP_PORT);
889
890 $_confparm_key_VALUES{"CNF_UNRESERVED_TCP_PORT"} = $CNF_UNRESERVED_TCP_PORT;
891
892 #copy symbols in confparm_key to getconf
893 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"confparm_key"}};
894
895 push @EXPORT_OK, qw(tapetype_key_to_string);
896 push @{$EXPORT_TAGS{"tapetype_key"}}, qw(tapetype_key_to_string);
897
898 my %_tapetype_key_VALUES;
899 #Convert an enum value to a single string
900 sub tapetype_key_to_string {
901     my ($enumval) = @_;
902
903     for my $k (keys %_tapetype_key_VALUES) {
904         my $v = $_tapetype_key_VALUES{$k};
905
906         #is this a matching flag?
907         if ($enumval == $v) {
908             return $k;
909         }
910     }
911
912 #default, just return the number
913     return $enumval;
914 }
915
916 push @EXPORT_OK, qw($TAPETYPE_COMMENT);
917 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_COMMENT);
918
919 $_tapetype_key_VALUES{"TAPETYPE_COMMENT"} = $TAPETYPE_COMMENT;
920
921 push @EXPORT_OK, qw($TAPETYPE_LBL_TEMPL);
922 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_LBL_TEMPL);
923
924 $_tapetype_key_VALUES{"TAPETYPE_LBL_TEMPL"} = $TAPETYPE_LBL_TEMPL;
925
926 push @EXPORT_OK, qw($TAPETYPE_BLOCKSIZE);
927 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_BLOCKSIZE);
928
929 $_tapetype_key_VALUES{"TAPETYPE_BLOCKSIZE"} = $TAPETYPE_BLOCKSIZE;
930
931 push @EXPORT_OK, qw($TAPETYPE_READBLOCKSIZE);
932 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_READBLOCKSIZE);
933
934 $_tapetype_key_VALUES{"TAPETYPE_READBLOCKSIZE"} = $TAPETYPE_READBLOCKSIZE;
935
936 push @EXPORT_OK, qw($TAPETYPE_LENGTH);
937 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_LENGTH);
938
939 $_tapetype_key_VALUES{"TAPETYPE_LENGTH"} = $TAPETYPE_LENGTH;
940
941 push @EXPORT_OK, qw($TAPETYPE_FILEMARK);
942 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_FILEMARK);
943
944 $_tapetype_key_VALUES{"TAPETYPE_FILEMARK"} = $TAPETYPE_FILEMARK;
945
946 push @EXPORT_OK, qw($TAPETYPE_SPEED);
947 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_SPEED);
948
949 $_tapetype_key_VALUES{"TAPETYPE_SPEED"} = $TAPETYPE_SPEED;
950
951 push @EXPORT_OK, qw($TAPETYPE_FILE_PAD);
952 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_FILE_PAD);
953
954 $_tapetype_key_VALUES{"TAPETYPE_FILE_PAD"} = $TAPETYPE_FILE_PAD;
955
956 #copy symbols in tapetype_key to getconf
957 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"tapetype_key"}};
958
959 push @EXPORT_OK, qw(dumptype_key_to_string);
960 push @{$EXPORT_TAGS{"dumptype_key"}}, qw(dumptype_key_to_string);
961
962 my %_dumptype_key_VALUES;
963 #Convert an enum value to a single string
964 sub dumptype_key_to_string {
965     my ($enumval) = @_;
966
967     for my $k (keys %_dumptype_key_VALUES) {
968         my $v = $_dumptype_key_VALUES{$k};
969
970         #is this a matching flag?
971         if ($enumval == $v) {
972             return $k;
973         }
974     }
975
976 #default, just return the number
977     return $enumval;
978 }
979
980 push @EXPORT_OK, qw($DUMPTYPE_COMMENT);
981 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_COMMENT);
982
983 $_dumptype_key_VALUES{"DUMPTYPE_COMMENT"} = $DUMPTYPE_COMMENT;
984
985 push @EXPORT_OK, qw($DUMPTYPE_PROGRAM);
986 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_PROGRAM);
987
988 $_dumptype_key_VALUES{"DUMPTYPE_PROGRAM"} = $DUMPTYPE_PROGRAM;
989
990 push @EXPORT_OK, qw($DUMPTYPE_SRVCOMPPROG);
991 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SRVCOMPPROG);
992
993 $_dumptype_key_VALUES{"DUMPTYPE_SRVCOMPPROG"} = $DUMPTYPE_SRVCOMPPROG;
994
995 push @EXPORT_OK, qw($DUMPTYPE_CLNTCOMPPROG);
996 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLNTCOMPPROG);
997
998 $_dumptype_key_VALUES{"DUMPTYPE_CLNTCOMPPROG"} = $DUMPTYPE_CLNTCOMPPROG;
999
1000 push @EXPORT_OK, qw($DUMPTYPE_SRV_ENCRYPT);
1001 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SRV_ENCRYPT);
1002
1003 $_dumptype_key_VALUES{"DUMPTYPE_SRV_ENCRYPT"} = $DUMPTYPE_SRV_ENCRYPT;
1004
1005 push @EXPORT_OK, qw($DUMPTYPE_CLNT_ENCRYPT);
1006 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLNT_ENCRYPT);
1007
1008 $_dumptype_key_VALUES{"DUMPTYPE_CLNT_ENCRYPT"} = $DUMPTYPE_CLNT_ENCRYPT;
1009
1010 push @EXPORT_OK, qw($DUMPTYPE_AMANDAD_PATH);
1011 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_AMANDAD_PATH);
1012
1013 $_dumptype_key_VALUES{"DUMPTYPE_AMANDAD_PATH"} = $DUMPTYPE_AMANDAD_PATH;
1014
1015 push @EXPORT_OK, qw($DUMPTYPE_CLIENT_USERNAME);
1016 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLIENT_USERNAME);
1017
1018 $_dumptype_key_VALUES{"DUMPTYPE_CLIENT_USERNAME"} = $DUMPTYPE_CLIENT_USERNAME;
1019
1020 push @EXPORT_OK, qw($DUMPTYPE_SSH_KEYS);
1021 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SSH_KEYS);
1022
1023 $_dumptype_key_VALUES{"DUMPTYPE_SSH_KEYS"} = $DUMPTYPE_SSH_KEYS;
1024
1025 push @EXPORT_OK, qw($DUMPTYPE_SECURITY_DRIVER);
1026 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SECURITY_DRIVER);
1027
1028 $_dumptype_key_VALUES{"DUMPTYPE_SECURITY_DRIVER"} = $DUMPTYPE_SECURITY_DRIVER;
1029
1030 push @EXPORT_OK, qw($DUMPTYPE_EXCLUDE);
1031 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_EXCLUDE);
1032
1033 $_dumptype_key_VALUES{"DUMPTYPE_EXCLUDE"} = $DUMPTYPE_EXCLUDE;
1034
1035 push @EXPORT_OK, qw($DUMPTYPE_INCLUDE);
1036 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_INCLUDE);
1037
1038 $_dumptype_key_VALUES{"DUMPTYPE_INCLUDE"} = $DUMPTYPE_INCLUDE;
1039
1040 push @EXPORT_OK, qw($DUMPTYPE_PRIORITY);
1041 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_PRIORITY);
1042
1043 $_dumptype_key_VALUES{"DUMPTYPE_PRIORITY"} = $DUMPTYPE_PRIORITY;
1044
1045 push @EXPORT_OK, qw($DUMPTYPE_DUMPCYCLE);
1046 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_DUMPCYCLE);
1047
1048 $_dumptype_key_VALUES{"DUMPTYPE_DUMPCYCLE"} = $DUMPTYPE_DUMPCYCLE;
1049
1050 push @EXPORT_OK, qw($DUMPTYPE_MAXDUMPS);
1051 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_MAXDUMPS);
1052
1053 $_dumptype_key_VALUES{"DUMPTYPE_MAXDUMPS"} = $DUMPTYPE_MAXDUMPS;
1054
1055 push @EXPORT_OK, qw($DUMPTYPE_MAXPROMOTEDAY);
1056 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_MAXPROMOTEDAY);
1057
1058 $_dumptype_key_VALUES{"DUMPTYPE_MAXPROMOTEDAY"} = $DUMPTYPE_MAXPROMOTEDAY;
1059
1060 push @EXPORT_OK, qw($DUMPTYPE_BUMPPERCENT);
1061 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPPERCENT);
1062
1063 $_dumptype_key_VALUES{"DUMPTYPE_BUMPPERCENT"} = $DUMPTYPE_BUMPPERCENT;
1064
1065 push @EXPORT_OK, qw($DUMPTYPE_BUMPSIZE);
1066 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPSIZE);
1067
1068 $_dumptype_key_VALUES{"DUMPTYPE_BUMPSIZE"} = $DUMPTYPE_BUMPSIZE;
1069
1070 push @EXPORT_OK, qw($DUMPTYPE_BUMPDAYS);
1071 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPDAYS);
1072
1073 $_dumptype_key_VALUES{"DUMPTYPE_BUMPDAYS"} = $DUMPTYPE_BUMPDAYS;
1074
1075 push @EXPORT_OK, qw($DUMPTYPE_BUMPMULT);
1076 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPMULT);
1077
1078 $_dumptype_key_VALUES{"DUMPTYPE_BUMPMULT"} = $DUMPTYPE_BUMPMULT;
1079
1080 push @EXPORT_OK, qw($DUMPTYPE_STARTTIME);
1081 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_STARTTIME);
1082
1083 $_dumptype_key_VALUES{"DUMPTYPE_STARTTIME"} = $DUMPTYPE_STARTTIME;
1084
1085 push @EXPORT_OK, qw($DUMPTYPE_STRATEGY);
1086 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_STRATEGY);
1087
1088 $_dumptype_key_VALUES{"DUMPTYPE_STRATEGY"} = $DUMPTYPE_STRATEGY;
1089
1090 push @EXPORT_OK, qw($DUMPTYPE_ESTIMATE);
1091 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_ESTIMATE);
1092
1093 $_dumptype_key_VALUES{"DUMPTYPE_ESTIMATE"} = $DUMPTYPE_ESTIMATE;
1094
1095 push @EXPORT_OK, qw($DUMPTYPE_COMPRESS);
1096 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_COMPRESS);
1097
1098 $_dumptype_key_VALUES{"DUMPTYPE_COMPRESS"} = $DUMPTYPE_COMPRESS;
1099
1100 push @EXPORT_OK, qw($DUMPTYPE_ENCRYPT);
1101 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_ENCRYPT);
1102
1103 $_dumptype_key_VALUES{"DUMPTYPE_ENCRYPT"} = $DUMPTYPE_ENCRYPT;
1104
1105 push @EXPORT_OK, qw($DUMPTYPE_SRV_DECRYPT_OPT);
1106 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SRV_DECRYPT_OPT);
1107
1108 $_dumptype_key_VALUES{"DUMPTYPE_SRV_DECRYPT_OPT"} = $DUMPTYPE_SRV_DECRYPT_OPT;
1109
1110 push @EXPORT_OK, qw($DUMPTYPE_CLNT_DECRYPT_OPT);
1111 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLNT_DECRYPT_OPT);
1112
1113 $_dumptype_key_VALUES{"DUMPTYPE_CLNT_DECRYPT_OPT"} = $DUMPTYPE_CLNT_DECRYPT_OPT;
1114
1115 push @EXPORT_OK, qw($DUMPTYPE_COMPRATE);
1116 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_COMPRATE);
1117
1118 $_dumptype_key_VALUES{"DUMPTYPE_COMPRATE"} = $DUMPTYPE_COMPRATE;
1119
1120 push @EXPORT_OK, qw($DUMPTYPE_TAPE_SPLITSIZE);
1121 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_TAPE_SPLITSIZE);
1122
1123 $_dumptype_key_VALUES{"DUMPTYPE_TAPE_SPLITSIZE"} = $DUMPTYPE_TAPE_SPLITSIZE;
1124
1125 push @EXPORT_OK, qw($DUMPTYPE_FALLBACK_SPLITSIZE);
1126 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_FALLBACK_SPLITSIZE);
1127
1128 $_dumptype_key_VALUES{"DUMPTYPE_FALLBACK_SPLITSIZE"} = $DUMPTYPE_FALLBACK_SPLITSIZE;
1129
1130 push @EXPORT_OK, qw($DUMPTYPE_SPLIT_DISKBUFFER);
1131 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SPLIT_DISKBUFFER);
1132
1133 $_dumptype_key_VALUES{"DUMPTYPE_SPLIT_DISKBUFFER"} = $DUMPTYPE_SPLIT_DISKBUFFER;
1134
1135 push @EXPORT_OK, qw($DUMPTYPE_RECORD);
1136 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_RECORD);
1137
1138 $_dumptype_key_VALUES{"DUMPTYPE_RECORD"} = $DUMPTYPE_RECORD;
1139
1140 push @EXPORT_OK, qw($DUMPTYPE_SKIP_INCR);
1141 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SKIP_INCR);
1142
1143 $_dumptype_key_VALUES{"DUMPTYPE_SKIP_INCR"} = $DUMPTYPE_SKIP_INCR;
1144
1145 push @EXPORT_OK, qw($DUMPTYPE_SKIP_FULL);
1146 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SKIP_FULL);
1147
1148 $_dumptype_key_VALUES{"DUMPTYPE_SKIP_FULL"} = $DUMPTYPE_SKIP_FULL;
1149
1150 push @EXPORT_OK, qw($DUMPTYPE_HOLDINGDISK);
1151 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_HOLDINGDISK);
1152
1153 $_dumptype_key_VALUES{"DUMPTYPE_HOLDINGDISK"} = $DUMPTYPE_HOLDINGDISK;
1154
1155 push @EXPORT_OK, qw($DUMPTYPE_KENCRYPT);
1156 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_KENCRYPT);
1157
1158 $_dumptype_key_VALUES{"DUMPTYPE_KENCRYPT"} = $DUMPTYPE_KENCRYPT;
1159
1160 push @EXPORT_OK, qw($DUMPTYPE_IGNORE);
1161 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_IGNORE);
1162
1163 $_dumptype_key_VALUES{"DUMPTYPE_IGNORE"} = $DUMPTYPE_IGNORE;
1164
1165 push @EXPORT_OK, qw($DUMPTYPE_INDEX);
1166 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_INDEX);
1167
1168 $_dumptype_key_VALUES{"DUMPTYPE_INDEX"} = $DUMPTYPE_INDEX;
1169
1170 #copy symbols in dumptype_key to getconf
1171 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"dumptype_key"}};
1172
1173 push @EXPORT_OK, qw(interface_key_to_string);
1174 push @{$EXPORT_TAGS{"interface_key"}}, qw(interface_key_to_string);
1175
1176 my %_interface_key_VALUES;
1177 #Convert an enum value to a single string
1178 sub interface_key_to_string {
1179     my ($enumval) = @_;
1180
1181     for my $k (keys %_interface_key_VALUES) {
1182         my $v = $_interface_key_VALUES{$k};
1183
1184         #is this a matching flag?
1185         if ($enumval == $v) {
1186             return $k;
1187         }
1188     }
1189
1190 #default, just return the number
1191     return $enumval;
1192 }
1193
1194 push @EXPORT_OK, qw($INTER_COMMENT);
1195 push @{$EXPORT_TAGS{"interface_key"}}, qw($INTER_COMMENT);
1196
1197 $_interface_key_VALUES{"INTER_COMMENT"} = $INTER_COMMENT;
1198
1199 push @EXPORT_OK, qw($INTER_MAXUSAGE);
1200 push @{$EXPORT_TAGS{"interface_key"}}, qw($INTER_MAXUSAGE);
1201
1202 $_interface_key_VALUES{"INTER_MAXUSAGE"} = $INTER_MAXUSAGE;
1203
1204 #copy symbols in interface_key to getconf
1205 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"interface_key"}};
1206
1207 push @EXPORT_OK, qw(holdingdisk_key_to_string);
1208 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw(holdingdisk_key_to_string);
1209
1210 my %_holdingdisk_key_VALUES;
1211 #Convert an enum value to a single string
1212 sub holdingdisk_key_to_string {
1213     my ($enumval) = @_;
1214
1215     for my $k (keys %_holdingdisk_key_VALUES) {
1216         my $v = $_holdingdisk_key_VALUES{$k};
1217
1218         #is this a matching flag?
1219         if ($enumval == $v) {
1220             return $k;
1221         }
1222     }
1223
1224 #default, just return the number
1225     return $enumval;
1226 }
1227
1228 push @EXPORT_OK, qw($HOLDING_COMMENT);
1229 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_COMMENT);
1230
1231 $_holdingdisk_key_VALUES{"HOLDING_COMMENT"} = $HOLDING_COMMENT;
1232
1233 push @EXPORT_OK, qw($HOLDING_DISKDIR);
1234 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_DISKDIR);
1235
1236 $_holdingdisk_key_VALUES{"HOLDING_DISKDIR"} = $HOLDING_DISKDIR;
1237
1238 push @EXPORT_OK, qw($HOLDING_DISKSIZE);
1239 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_DISKSIZE);
1240
1241 $_holdingdisk_key_VALUES{"HOLDING_DISKSIZE"} = $HOLDING_DISKSIZE;
1242
1243 push @EXPORT_OK, qw($HOLDING_CHUNKSIZE);
1244 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_CHUNKSIZE);
1245
1246 $_holdingdisk_key_VALUES{"HOLDING_CHUNKSIZE"} = $HOLDING_CHUNKSIZE;
1247
1248 #copy symbols in holdingdisk_key to getconf
1249 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"holdingdisk_key"}};
1250
1251 push @EXPORT_OK, qw(dump_holdingdisk_t_to_string);
1252 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw(dump_holdingdisk_t_to_string);
1253
1254 my %_dump_holdingdisk_t_VALUES;
1255 #Convert an enum value to a single string
1256 sub dump_holdingdisk_t_to_string {
1257     my ($enumval) = @_;
1258
1259     for my $k (keys %_dump_holdingdisk_t_VALUES) {
1260         my $v = $_dump_holdingdisk_t_VALUES{$k};
1261
1262         #is this a matching flag?
1263         if ($enumval == $v) {
1264             return $k;
1265         }
1266     }
1267
1268 #default, just return the number
1269     return $enumval;
1270 }
1271
1272 push @EXPORT_OK, qw($HOLD_NEVER);
1273 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw($HOLD_NEVER);
1274
1275 $_dump_holdingdisk_t_VALUES{"HOLD_NEVER"} = $HOLD_NEVER;
1276
1277 push @EXPORT_OK, qw($HOLD_AUTO);
1278 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw($HOLD_AUTO);
1279
1280 $_dump_holdingdisk_t_VALUES{"HOLD_AUTO"} = $HOLD_AUTO;
1281
1282 push @EXPORT_OK, qw($HOLD_REQUIRED);
1283 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw($HOLD_REQUIRED);
1284
1285 $_dump_holdingdisk_t_VALUES{"HOLD_REQUIRED"} = $HOLD_REQUIRED;
1286
1287 #copy symbols in dump_holdingdisk_t to getconf
1288 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"dump_holdingdisk_t"}};
1289
1290 push @EXPORT_OK, qw(comp_t_to_string);
1291 push @{$EXPORT_TAGS{"comp_t"}}, qw(comp_t_to_string);
1292
1293 my %_comp_t_VALUES;
1294 #Convert an enum value to a single string
1295 sub comp_t_to_string {
1296     my ($enumval) = @_;
1297
1298     for my $k (keys %_comp_t_VALUES) {
1299         my $v = $_comp_t_VALUES{$k};
1300
1301         #is this a matching flag?
1302         if ($enumval == $v) {
1303             return $k;
1304         }
1305     }
1306
1307 #default, just return the number
1308     return $enumval;
1309 }
1310
1311 push @EXPORT_OK, qw($COMP_NONE);
1312 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_NONE);
1313
1314 $_comp_t_VALUES{"COMP_NONE"} = $COMP_NONE;
1315
1316 push @EXPORT_OK, qw($COMP_FAST);
1317 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_FAST);
1318
1319 $_comp_t_VALUES{"COMP_FAST"} = $COMP_FAST;
1320
1321 push @EXPORT_OK, qw($COMP_BEST);
1322 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_BEST);
1323
1324 $_comp_t_VALUES{"COMP_BEST"} = $COMP_BEST;
1325
1326 push @EXPORT_OK, qw($COMP_CUST);
1327 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_CUST);
1328
1329 $_comp_t_VALUES{"COMP_CUST"} = $COMP_CUST;
1330
1331 push @EXPORT_OK, qw($COMP_SERVER_FAST);
1332 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_SERVER_FAST);
1333
1334 $_comp_t_VALUES{"COMP_SERVER_FAST"} = $COMP_SERVER_FAST;
1335
1336 push @EXPORT_OK, qw($COMP_SERVER_BEST);
1337 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_SERVER_BEST);
1338
1339 $_comp_t_VALUES{"COMP_SERVER_BEST"} = $COMP_SERVER_BEST;
1340
1341 push @EXPORT_OK, qw($COMP_SERVER_CUST);
1342 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_SERVER_CUST);
1343
1344 $_comp_t_VALUES{"COMP_SERVER_CUST"} = $COMP_SERVER_CUST;
1345
1346 #copy symbols in comp_t to getconf
1347 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"comp_t"}};
1348
1349 push @EXPORT_OK, qw(encrypt_t_to_string);
1350 push @{$EXPORT_TAGS{"encrypt_t"}}, qw(encrypt_t_to_string);
1351
1352 my %_encrypt_t_VALUES;
1353 #Convert an enum value to a single string
1354 sub encrypt_t_to_string {
1355     my ($enumval) = @_;
1356
1357     for my $k (keys %_encrypt_t_VALUES) {
1358         my $v = $_encrypt_t_VALUES{$k};
1359
1360         #is this a matching flag?
1361         if ($enumval == $v) {
1362             return $k;
1363         }
1364     }
1365
1366 #default, just return the number
1367     return $enumval;
1368 }
1369
1370 push @EXPORT_OK, qw($ENCRYPT_NONE);
1371 push @{$EXPORT_TAGS{"encrypt_t"}}, qw($ENCRYPT_NONE);
1372
1373 $_encrypt_t_VALUES{"ENCRYPT_NONE"} = $ENCRYPT_NONE;
1374
1375 push @EXPORT_OK, qw($ENCRYPT_CUST);
1376 push @{$EXPORT_TAGS{"encrypt_t"}}, qw($ENCRYPT_CUST);
1377
1378 $_encrypt_t_VALUES{"ENCRYPT_CUST"} = $ENCRYPT_CUST;
1379
1380 push @EXPORT_OK, qw($ENCRYPT_SERV_CUST);
1381 push @{$EXPORT_TAGS{"encrypt_t"}}, qw($ENCRYPT_SERV_CUST);
1382
1383 $_encrypt_t_VALUES{"ENCRYPT_SERV_CUST"} = $ENCRYPT_SERV_CUST;
1384
1385 #copy symbols in encrypt_t to getconf
1386 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"encrypt_t"}};
1387
1388 push @EXPORT_OK, qw(strategy_t_to_string);
1389 push @{$EXPORT_TAGS{"strategy_t"}}, qw(strategy_t_to_string);
1390
1391 my %_strategy_t_VALUES;
1392 #Convert an enum value to a single string
1393 sub strategy_t_to_string {
1394     my ($enumval) = @_;
1395
1396     for my $k (keys %_strategy_t_VALUES) {
1397         my $v = $_strategy_t_VALUES{$k};
1398
1399         #is this a matching flag?
1400         if ($enumval == $v) {
1401             return $k;
1402         }
1403     }
1404
1405 #default, just return the number
1406     return $enumval;
1407 }
1408
1409 push @EXPORT_OK, qw($DS_SKIP);
1410 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_SKIP);
1411
1412 $_strategy_t_VALUES{"DS_SKIP"} = $DS_SKIP;
1413
1414 push @EXPORT_OK, qw($DS_STANDARD);
1415 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_STANDARD);
1416
1417 $_strategy_t_VALUES{"DS_STANDARD"} = $DS_STANDARD;
1418
1419 push @EXPORT_OK, qw($DS_NOFULL);
1420 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_NOFULL);
1421
1422 $_strategy_t_VALUES{"DS_NOFULL"} = $DS_NOFULL;
1423
1424 push @EXPORT_OK, qw($DS_NOINC);
1425 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_NOINC);
1426
1427 $_strategy_t_VALUES{"DS_NOINC"} = $DS_NOINC;
1428
1429 push @EXPORT_OK, qw($DS_4);
1430 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_4);
1431
1432 $_strategy_t_VALUES{"DS_4"} = $DS_4;
1433
1434 push @EXPORT_OK, qw($DS_5);
1435 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_5);
1436
1437 $_strategy_t_VALUES{"DS_5"} = $DS_5;
1438
1439 push @EXPORT_OK, qw($DS_HANOI);
1440 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_HANOI);
1441
1442 $_strategy_t_VALUES{"DS_HANOI"} = $DS_HANOI;
1443
1444 push @EXPORT_OK, qw($DS_INCRONLY);
1445 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_INCRONLY);
1446
1447 $_strategy_t_VALUES{"DS_INCRONLY"} = $DS_INCRONLY;
1448
1449 #copy symbols in strategy_t to getconf
1450 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"strategy_t"}};
1451
1452 push @EXPORT_OK, qw(estimate_t_to_string);
1453 push @{$EXPORT_TAGS{"estimate_t"}}, qw(estimate_t_to_string);
1454
1455 my %_estimate_t_VALUES;
1456 #Convert an enum value to a single string
1457 sub estimate_t_to_string {
1458     my ($enumval) = @_;
1459
1460     for my $k (keys %_estimate_t_VALUES) {
1461         my $v = $_estimate_t_VALUES{$k};
1462
1463         #is this a matching flag?
1464         if ($enumval == $v) {
1465             return $k;
1466         }
1467     }
1468
1469 #default, just return the number
1470     return $enumval;
1471 }
1472
1473 push @EXPORT_OK, qw($ES_CLIENT);
1474 push @{$EXPORT_TAGS{"estimate_t"}}, qw($ES_CLIENT);
1475
1476 $_estimate_t_VALUES{"ES_CLIENT"} = $ES_CLIENT;
1477
1478 push @EXPORT_OK, qw($ES_SERVER);
1479 push @{$EXPORT_TAGS{"estimate_t"}}, qw($ES_SERVER);
1480
1481 $_estimate_t_VALUES{"ES_SERVER"} = $ES_SERVER;
1482
1483 push @EXPORT_OK, qw($ES_CALCSIZE);
1484 push @{$EXPORT_TAGS{"estimate_t"}}, qw($ES_CALCSIZE);
1485
1486 $_estimate_t_VALUES{"ES_CALCSIZE"} = $ES_CALCSIZE;
1487
1488 #copy symbols in estimate_t to getconf
1489 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"estimate_t"}};
1490
1491 push @EXPORT_OK, qw(taperalgo_t_to_string);
1492 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw(taperalgo_t_to_string);
1493
1494 my %_taperalgo_t_VALUES;
1495 #Convert an enum value to a single string
1496 sub taperalgo_t_to_string {
1497     my ($enumval) = @_;
1498
1499     for my $k (keys %_taperalgo_t_VALUES) {
1500         my $v = $_taperalgo_t_VALUES{$k};
1501
1502         #is this a matching flag?
1503         if ($enumval == $v) {
1504             return $k;
1505         }
1506     }
1507
1508 #default, just return the number
1509     return $enumval;
1510 }
1511
1512 push @EXPORT_OK, qw($ALGO_FIRST);
1513 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_FIRST);
1514
1515 $_taperalgo_t_VALUES{"ALGO_FIRST"} = $ALGO_FIRST;
1516
1517 push @EXPORT_OK, qw($ALGO_FIRSTFIT);
1518 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_FIRSTFIT);
1519
1520 $_taperalgo_t_VALUES{"ALGO_FIRSTFIT"} = $ALGO_FIRSTFIT;
1521
1522 push @EXPORT_OK, qw($ALGO_LARGEST);
1523 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_LARGEST);
1524
1525 $_taperalgo_t_VALUES{"ALGO_LARGEST"} = $ALGO_LARGEST;
1526
1527 push @EXPORT_OK, qw($ALGO_LARGESTFIT);
1528 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_LARGESTFIT);
1529
1530 $_taperalgo_t_VALUES{"ALGO_LARGESTFIT"} = $ALGO_LARGESTFIT;
1531
1532 push @EXPORT_OK, qw($ALGO_SMALLEST);
1533 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_SMALLEST);
1534
1535 $_taperalgo_t_VALUES{"ALGO_SMALLEST"} = $ALGO_SMALLEST;
1536
1537 push @EXPORT_OK, qw($ALGO_LAST);
1538 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_LAST);
1539
1540 $_taperalgo_t_VALUES{"ALGO_LAST"} = $ALGO_LAST;
1541
1542 #copy symbols in taperalgo_t to getconf
1543 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"taperalgo_t"}};
1544
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);
1549
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);
1554
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);
1559
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);
1564
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);
1571
1572 push @EXPORT_OK, qw(getconf_unit_divisor
1573
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
1579
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);
1584
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);
1589
1590 push @EXPORT_OK, qw(config_init_flags_to_strings);
1591 push @{$EXPORT_TAGS{"config_init_flags"}}, qw(config_init_flags_to_strings);
1592
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 {
1596     my ($flags) = @_;
1597     my @result = ();
1598
1599     for my $k (keys %_config_init_flags_VALUES) {
1600         my $v = $_config_init_flags_VALUES{$k};
1601
1602         #is this a matching flag?
1603         if (($v == 0 && $flags == 0) || ($v != 0 && ($flags & $v) == $v)) {
1604             push @result, $k;
1605         }
1606     }
1607
1608 #by default, just return the number as a 1-element list
1609     if (!@result) {
1610         return ($flags);
1611     }
1612
1613     return @result;
1614 }
1615
1616 push @EXPORT_OK, qw($CONFIG_INIT_EXPLICIT_NAME);
1617 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_EXPLICIT_NAME);
1618
1619 $_config_init_flags_VALUES{"CONFIG_INIT_EXPLICIT_NAME"} = $CONFIG_INIT_EXPLICIT_NAME;
1620
1621 push @EXPORT_OK, qw($CONFIG_INIT_USE_CWD);
1622 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_USE_CWD);
1623
1624 $_config_init_flags_VALUES{"CONFIG_INIT_USE_CWD"} = $CONFIG_INIT_USE_CWD;
1625
1626 push @EXPORT_OK, qw($CONFIG_INIT_CLIENT);
1627 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_CLIENT);
1628
1629 $_config_init_flags_VALUES{"CONFIG_INIT_CLIENT"} = $CONFIG_INIT_CLIENT;
1630
1631 push @EXPORT_OK, qw($CONFIG_INIT_OVERLAY);
1632 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_OVERLAY);
1633
1634 $_config_init_flags_VALUES{"CONFIG_INIT_OVERLAY"} = $CONFIG_INIT_OVERLAY;
1635
1636 push @EXPORT_OK, qw($CONFIG_INIT_FATAL);
1637 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_FATAL);
1638
1639 $_config_init_flags_VALUES{"CONFIG_INIT_FATAL"} = $CONFIG_INIT_FATAL;
1640
1641 #copy symbols in config_init_flags to init
1642 push @{$EXPORT_TAGS{"init"}},  @{$EXPORT_TAGS{"config_init_flags"}};
1643
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);
1646
1647 push @EXPORT_OK, qw(get_config_name 
1648     get_config_dir 
1649     get_config_filename);
1650 push @{$EXPORT_TAGS{"init"}}, qw(get_config_name 
1651     get_config_dir 
1652     get_config_filename);
1653
1654 push @EXPORT_OK, qw(dump_configuration config_dir_relative taperalgo2str find_multiplier);
1655 1;