Imported Upstream version 2.6.0p2
[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 F<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|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)>
406
407 which returns an opaque object
408 (C<$ss>) representing the subsection, or C<undef> if no subsection
409 with that name exists;
410
411 =item C<TYP_name($ss)>
412
413 returning the name of the subsection;
414
415 =item C<TYP_getconf($ss, $cnf)>
416
417 which fetches a parameter value from C<$ss>; and
418
419 =item C<TYP_seen($ss, $cnf)>
420
421 which returns a true value if <$cnf> was seen in the subsection.
422
423 =back
424
425 The subsections are:
426
427 =over
428
429 =item C<tapetype>
430
431 with constants beginning with C<$TAPETYPE_>
432
433 =item C<dumptype>
434
435 with constants beginning with C<$DUMPTYPE_>
436
437 =item C<holdingdisk>
438
439 with constants beginning with C<$HOLDING_>
440
441 =item C<application>
442
443 with constants beginning with C<$APPLICATION_>
444
445 =item C<script>
446
447 with constants beginning with C<$PP_SCRIPT_>
448
449 =back
450
451 See C<conffile.h> for the names of the constants themselves.
452
453 Parameter values are available by name from C<getconf_byname($name)>.
454 This function implements the C<TYP:NAME:PARAM> syntax advertised by
455 C<amgetconf> to access values in subsections.  C<getconf_list($typ)>
456 returns a list of the names of all subsections of the given type.
457
458 The C<$CNF_DISPLAYUNIT> implies a certain divisor to convert from
459 kilobytes to the desired unit.  This divisor is available from
460 C<getconf_unit_divisor()>.  Note carefully that it is a I<divisor>
461 for a value in I<kilobytes>!
462
463 Finally, various subsections of Amanda enable verbose debugging via
464 configuration parameters.  The status of each parameter is available
465 a similarly-named variable, e.g., C<$debug_auth>.
466
467 All parameter access functions and constants can be imported with
468 the tag C<:getconf>.
469
470 =head1 MISCELLANEOUS
471
472 These functions defy categorization.
473
474 The function C<config_dir_relative> will interpret a path relative to
475 the current configuration directory.  Absolute paths are passed through
476 unchanged, while relative paths are converted to absolute paths.
477
478 C<dump_configuration()> dumps the current configuration, in a format
479 suitable for re-evaluation for this module, to standard output.
480 This function may be revised to return a string.
481
482 Several parts of Amanda need to convert unit modifier value like
483 "gbytes" to a multiplier.  The function C<find_multiplier($str)>
484 returns the unit multiplier for such a string.  For example, "mbytes"
485 is converted to 1048576 (1024*1024).
486
487 =cut
488
489 push @EXPORT_OK, qw(confparm_key_to_string);
490 push @{$EXPORT_TAGS{"confparm_key"}}, qw(confparm_key_to_string);
491
492 my %_confparm_key_VALUES;
493 #Convert an enum value to a single string
494 sub confparm_key_to_string {
495     my ($enumval) = @_;
496
497     for my $k (keys %_confparm_key_VALUES) {
498         my $v = $_confparm_key_VALUES{$k};
499
500         #is this a matching flag?
501         if ($enumval == $v) {
502             return $k;
503         }
504     }
505
506 #default, just return the number
507     return $enumval;
508 }
509
510 push @EXPORT_OK, qw($CNF_ORG);
511 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_ORG);
512
513 $_confparm_key_VALUES{"CNF_ORG"} = $CNF_ORG;
514
515 push @EXPORT_OK, qw($CNF_CONF);
516 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CONF);
517
518 $_confparm_key_VALUES{"CNF_CONF"} = $CNF_CONF;
519
520 push @EXPORT_OK, qw($CNF_INDEX_SERVER);
521 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INDEX_SERVER);
522
523 $_confparm_key_VALUES{"CNF_INDEX_SERVER"} = $CNF_INDEX_SERVER;
524
525 push @EXPORT_OK, qw($CNF_TAPE_SERVER);
526 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPE_SERVER);
527
528 $_confparm_key_VALUES{"CNF_TAPE_SERVER"} = $CNF_TAPE_SERVER;
529
530 push @EXPORT_OK, qw($CNF_AUTH);
531 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AUTH);
532
533 $_confparm_key_VALUES{"CNF_AUTH"} = $CNF_AUTH;
534
535 push @EXPORT_OK, qw($CNF_SSH_KEYS);
536 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_SSH_KEYS);
537
538 $_confparm_key_VALUES{"CNF_SSH_KEYS"} = $CNF_SSH_KEYS;
539
540 push @EXPORT_OK, qw($CNF_AMANDAD_PATH);
541 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMANDAD_PATH);
542
543 $_confparm_key_VALUES{"CNF_AMANDAD_PATH"} = $CNF_AMANDAD_PATH;
544
545 push @EXPORT_OK, qw($CNF_CLIENT_USERNAME);
546 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CLIENT_USERNAME);
547
548 $_confparm_key_VALUES{"CNF_CLIENT_USERNAME"} = $CNF_CLIENT_USERNAME;
549
550 push @EXPORT_OK, qw($CNF_GNUTAR_LIST_DIR);
551 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_GNUTAR_LIST_DIR);
552
553 $_confparm_key_VALUES{"CNF_GNUTAR_LIST_DIR"} = $CNF_GNUTAR_LIST_DIR;
554
555 push @EXPORT_OK, qw($CNF_AMANDATES);
556 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMANDATES);
557
558 $_confparm_key_VALUES{"CNF_AMANDATES"} = $CNF_AMANDATES;
559
560 push @EXPORT_OK, qw($CNF_MAILTO);
561 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_MAILTO);
562
563 $_confparm_key_VALUES{"CNF_MAILTO"} = $CNF_MAILTO;
564
565 push @EXPORT_OK, qw($CNF_DUMPUSER);
566 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DUMPUSER);
567
568 $_confparm_key_VALUES{"CNF_DUMPUSER"} = $CNF_DUMPUSER;
569
570 push @EXPORT_OK, qw($CNF_TAPEDEV);
571 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPEDEV);
572
573 $_confparm_key_VALUES{"CNF_TAPEDEV"} = $CNF_TAPEDEV;
574
575 push @EXPORT_OK, qw($CNF_DEVICE_PROPERTY);
576 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEVICE_PROPERTY);
577
578 $_confparm_key_VALUES{"CNF_DEVICE_PROPERTY"} = $CNF_DEVICE_PROPERTY;
579
580 push @EXPORT_OK, qw($CNF_CHANGERDEV);
581 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CHANGERDEV);
582
583 $_confparm_key_VALUES{"CNF_CHANGERDEV"} = $CNF_CHANGERDEV;
584
585 push @EXPORT_OK, qw($CNF_CHANGERFILE);
586 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CHANGERFILE);
587
588 $_confparm_key_VALUES{"CNF_CHANGERFILE"} = $CNF_CHANGERFILE;
589
590 push @EXPORT_OK, qw($CNF_LABELSTR);
591 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_LABELSTR);
592
593 $_confparm_key_VALUES{"CNF_LABELSTR"} = $CNF_LABELSTR;
594
595 push @EXPORT_OK, qw($CNF_TAPELIST);
596 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPELIST);
597
598 $_confparm_key_VALUES{"CNF_TAPELIST"} = $CNF_TAPELIST;
599
600 push @EXPORT_OK, qw($CNF_DISKFILE);
601 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DISKFILE);
602
603 $_confparm_key_VALUES{"CNF_DISKFILE"} = $CNF_DISKFILE;
604
605 push @EXPORT_OK, qw($CNF_INFOFILE);
606 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INFOFILE);
607
608 $_confparm_key_VALUES{"CNF_INFOFILE"} = $CNF_INFOFILE;
609
610 push @EXPORT_OK, qw($CNF_LOGDIR);
611 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_LOGDIR);
612
613 $_confparm_key_VALUES{"CNF_LOGDIR"} = $CNF_LOGDIR;
614
615 push @EXPORT_OK, qw($CNF_INDEXDIR);
616 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INDEXDIR);
617
618 $_confparm_key_VALUES{"CNF_INDEXDIR"} = $CNF_INDEXDIR;
619
620 push @EXPORT_OK, qw($CNF_TAPETYPE);
621 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPETYPE);
622
623 $_confparm_key_VALUES{"CNF_TAPETYPE"} = $CNF_TAPETYPE;
624
625 push @EXPORT_OK, qw($CNF_DUMPCYCLE);
626 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DUMPCYCLE);
627
628 $_confparm_key_VALUES{"CNF_DUMPCYCLE"} = $CNF_DUMPCYCLE;
629
630 push @EXPORT_OK, qw($CNF_RUNSPERCYCLE);
631 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RUNSPERCYCLE);
632
633 $_confparm_key_VALUES{"CNF_RUNSPERCYCLE"} = $CNF_RUNSPERCYCLE;
634
635 push @EXPORT_OK, qw($CNF_TAPECYCLE);
636 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPECYCLE);
637
638 $_confparm_key_VALUES{"CNF_TAPECYCLE"} = $CNF_TAPECYCLE;
639
640 push @EXPORT_OK, qw($CNF_NETUSAGE);
641 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_NETUSAGE);
642
643 $_confparm_key_VALUES{"CNF_NETUSAGE"} = $CNF_NETUSAGE;
644
645 push @EXPORT_OK, qw($CNF_INPARALLEL);
646 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_INPARALLEL);
647
648 $_confparm_key_VALUES{"CNF_INPARALLEL"} = $CNF_INPARALLEL;
649
650 push @EXPORT_OK, qw($CNF_DUMPORDER);
651 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DUMPORDER);
652
653 $_confparm_key_VALUES{"CNF_DUMPORDER"} = $CNF_DUMPORDER;
654
655 push @EXPORT_OK, qw($CNF_BUMPPERCENT);
656 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPPERCENT);
657
658 $_confparm_key_VALUES{"CNF_BUMPPERCENT"} = $CNF_BUMPPERCENT;
659
660 push @EXPORT_OK, qw($CNF_BUMPSIZE);
661 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPSIZE);
662
663 $_confparm_key_VALUES{"CNF_BUMPSIZE"} = $CNF_BUMPSIZE;
664
665 push @EXPORT_OK, qw($CNF_BUMPMULT);
666 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPMULT);
667
668 $_confparm_key_VALUES{"CNF_BUMPMULT"} = $CNF_BUMPMULT;
669
670 push @EXPORT_OK, qw($CNF_BUMPDAYS);
671 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_BUMPDAYS);
672
673 $_confparm_key_VALUES{"CNF_BUMPDAYS"} = $CNF_BUMPDAYS;
674
675 push @EXPORT_OK, qw($CNF_TPCHANGER);
676 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TPCHANGER);
677
678 $_confparm_key_VALUES{"CNF_TPCHANGER"} = $CNF_TPCHANGER;
679
680 push @EXPORT_OK, qw($CNF_RUNTAPES);
681 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RUNTAPES);
682
683 $_confparm_key_VALUES{"CNF_RUNTAPES"} = $CNF_RUNTAPES;
684
685 push @EXPORT_OK, qw($CNF_MAXDUMPS);
686 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_MAXDUMPS);
687
688 $_confparm_key_VALUES{"CNF_MAXDUMPS"} = $CNF_MAXDUMPS;
689
690 push @EXPORT_OK, qw($CNF_ETIMEOUT);
691 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_ETIMEOUT);
692
693 $_confparm_key_VALUES{"CNF_ETIMEOUT"} = $CNF_ETIMEOUT;
694
695 push @EXPORT_OK, qw($CNF_DTIMEOUT);
696 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DTIMEOUT);
697
698 $_confparm_key_VALUES{"CNF_DTIMEOUT"} = $CNF_DTIMEOUT;
699
700 push @EXPORT_OK, qw($CNF_CTIMEOUT);
701 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CTIMEOUT);
702
703 $_confparm_key_VALUES{"CNF_CTIMEOUT"} = $CNF_CTIMEOUT;
704
705 push @EXPORT_OK, qw($CNF_TAPEBUFS);
706 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPEBUFS);
707
708 $_confparm_key_VALUES{"CNF_TAPEBUFS"} = $CNF_TAPEBUFS;
709
710 push @EXPORT_OK, qw($CNF_DEVICE_OUTPUT_BUFFER_SIZE);
711 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEVICE_OUTPUT_BUFFER_SIZE);
712
713 $_confparm_key_VALUES{"CNF_DEVICE_OUTPUT_BUFFER_SIZE"} = $CNF_DEVICE_OUTPUT_BUFFER_SIZE;
714
715 push @EXPORT_OK, qw($CNF_PRINTER);
716 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_PRINTER);
717
718 $_confparm_key_VALUES{"CNF_PRINTER"} = $CNF_PRINTER;
719
720 push @EXPORT_OK, qw($CNF_AUTOFLUSH);
721 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AUTOFLUSH);
722
723 $_confparm_key_VALUES{"CNF_AUTOFLUSH"} = $CNF_AUTOFLUSH;
724
725 push @EXPORT_OK, qw($CNF_RESERVE);
726 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RESERVE);
727
728 $_confparm_key_VALUES{"CNF_RESERVE"} = $CNF_RESERVE;
729
730 push @EXPORT_OK, qw($CNF_MAXDUMPSIZE);
731 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_MAXDUMPSIZE);
732
733 $_confparm_key_VALUES{"CNF_MAXDUMPSIZE"} = $CNF_MAXDUMPSIZE;
734
735 push @EXPORT_OK, qw($CNF_COLUMNSPEC);
736 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_COLUMNSPEC);
737
738 $_confparm_key_VALUES{"CNF_COLUMNSPEC"} = $CNF_COLUMNSPEC;
739
740 push @EXPORT_OK, qw($CNF_AMRECOVER_DO_FSF);
741 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMRECOVER_DO_FSF);
742
743 $_confparm_key_VALUES{"CNF_AMRECOVER_DO_FSF"} = $CNF_AMRECOVER_DO_FSF;
744
745 push @EXPORT_OK, qw($CNF_AMRECOVER_CHECK_LABEL);
746 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMRECOVER_CHECK_LABEL);
747
748 $_confparm_key_VALUES{"CNF_AMRECOVER_CHECK_LABEL"} = $CNF_AMRECOVER_CHECK_LABEL;
749
750 push @EXPORT_OK, qw($CNF_AMRECOVER_CHANGER);
751 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_AMRECOVER_CHANGER);
752
753 $_confparm_key_VALUES{"CNF_AMRECOVER_CHANGER"} = $CNF_AMRECOVER_CHANGER;
754
755 push @EXPORT_OK, qw($CNF_TAPERALGO);
756 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPERALGO);
757
758 $_confparm_key_VALUES{"CNF_TAPERALGO"} = $CNF_TAPERALGO;
759
760 push @EXPORT_OK, qw($CNF_FLUSH_THRESHOLD_DUMPED);
761 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_FLUSH_THRESHOLD_DUMPED);
762
763 $_confparm_key_VALUES{"CNF_FLUSH_THRESHOLD_DUMPED"} = $CNF_FLUSH_THRESHOLD_DUMPED;
764
765 push @EXPORT_OK, qw($CNF_FLUSH_THRESHOLD_SCHEDULED);
766 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_FLUSH_THRESHOLD_SCHEDULED);
767
768 $_confparm_key_VALUES{"CNF_FLUSH_THRESHOLD_SCHEDULED"} = $CNF_FLUSH_THRESHOLD_SCHEDULED;
769
770 push @EXPORT_OK, qw($CNF_TAPERFLUSH);
771 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_TAPERFLUSH);
772
773 $_confparm_key_VALUES{"CNF_TAPERFLUSH"} = $CNF_TAPERFLUSH;
774
775 push @EXPORT_OK, qw($CNF_DISPLAYUNIT);
776 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DISPLAYUNIT);
777
778 $_confparm_key_VALUES{"CNF_DISPLAYUNIT"} = $CNF_DISPLAYUNIT;
779
780 push @EXPORT_OK, qw($CNF_KRB5KEYTAB);
781 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_KRB5KEYTAB);
782
783 $_confparm_key_VALUES{"CNF_KRB5KEYTAB"} = $CNF_KRB5KEYTAB;
784
785 push @EXPORT_OK, qw($CNF_KRB5PRINCIPAL);
786 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_KRB5PRINCIPAL);
787
788 $_confparm_key_VALUES{"CNF_KRB5PRINCIPAL"} = $CNF_KRB5PRINCIPAL;
789
790 push @EXPORT_OK, qw($CNF_LABEL_NEW_TAPES);
791 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_LABEL_NEW_TAPES);
792
793 $_confparm_key_VALUES{"CNF_LABEL_NEW_TAPES"} = $CNF_LABEL_NEW_TAPES;
794
795 push @EXPORT_OK, qw($CNF_USETIMESTAMPS);
796 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_USETIMESTAMPS);
797
798 $_confparm_key_VALUES{"CNF_USETIMESTAMPS"} = $CNF_USETIMESTAMPS;
799
800 push @EXPORT_OK, qw($CNF_REP_TRIES);
801 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_REP_TRIES);
802
803 $_confparm_key_VALUES{"CNF_REP_TRIES"} = $CNF_REP_TRIES;
804
805 push @EXPORT_OK, qw($CNF_CONNECT_TRIES);
806 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_CONNECT_TRIES);
807
808 $_confparm_key_VALUES{"CNF_CONNECT_TRIES"} = $CNF_CONNECT_TRIES;
809
810 push @EXPORT_OK, qw($CNF_REQ_TRIES);
811 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_REQ_TRIES);
812
813 $_confparm_key_VALUES{"CNF_REQ_TRIES"} = $CNF_REQ_TRIES;
814
815 push @EXPORT_OK, qw($CNF_DEBUG_AMANDAD);
816 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMANDAD);
817
818 $_confparm_key_VALUES{"CNF_DEBUG_AMANDAD"} = $CNF_DEBUG_AMANDAD;
819
820 push @EXPORT_OK, qw($CNF_DEBUG_AMIDXTAPED);
821 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMIDXTAPED);
822
823 $_confparm_key_VALUES{"CNF_DEBUG_AMIDXTAPED"} = $CNF_DEBUG_AMIDXTAPED;
824
825 push @EXPORT_OK, qw($CNF_DEBUG_AMINDEXD);
826 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMINDEXD);
827
828 $_confparm_key_VALUES{"CNF_DEBUG_AMINDEXD"} = $CNF_DEBUG_AMINDEXD;
829
830 push @EXPORT_OK, qw($CNF_DEBUG_AMRECOVER);
831 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AMRECOVER);
832
833 $_confparm_key_VALUES{"CNF_DEBUG_AMRECOVER"} = $CNF_DEBUG_AMRECOVER;
834
835 push @EXPORT_OK, qw($CNF_DEBUG_AUTH);
836 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_AUTH);
837
838 $_confparm_key_VALUES{"CNF_DEBUG_AUTH"} = $CNF_DEBUG_AUTH;
839
840 push @EXPORT_OK, qw($CNF_DEBUG_EVENT);
841 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_EVENT);
842
843 $_confparm_key_VALUES{"CNF_DEBUG_EVENT"} = $CNF_DEBUG_EVENT;
844
845 push @EXPORT_OK, qw($CNF_DEBUG_HOLDING);
846 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_HOLDING);
847
848 $_confparm_key_VALUES{"CNF_DEBUG_HOLDING"} = $CNF_DEBUG_HOLDING;
849
850 push @EXPORT_OK, qw($CNF_DEBUG_PROTOCOL);
851 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_PROTOCOL);
852
853 $_confparm_key_VALUES{"CNF_DEBUG_PROTOCOL"} = $CNF_DEBUG_PROTOCOL;
854
855 push @EXPORT_OK, qw($CNF_DEBUG_PLANNER);
856 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_PLANNER);
857
858 $_confparm_key_VALUES{"CNF_DEBUG_PLANNER"} = $CNF_DEBUG_PLANNER;
859
860 push @EXPORT_OK, qw($CNF_DEBUG_DRIVER);
861 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_DRIVER);
862
863 $_confparm_key_VALUES{"CNF_DEBUG_DRIVER"} = $CNF_DEBUG_DRIVER;
864
865 push @EXPORT_OK, qw($CNF_DEBUG_DUMPER);
866 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_DUMPER);
867
868 $_confparm_key_VALUES{"CNF_DEBUG_DUMPER"} = $CNF_DEBUG_DUMPER;
869
870 push @EXPORT_OK, qw($CNF_DEBUG_CHUNKER);
871 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_CHUNKER);
872
873 $_confparm_key_VALUES{"CNF_DEBUG_CHUNKER"} = $CNF_DEBUG_CHUNKER;
874
875 push @EXPORT_OK, qw($CNF_DEBUG_TAPER);
876 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_TAPER);
877
878 $_confparm_key_VALUES{"CNF_DEBUG_TAPER"} = $CNF_DEBUG_TAPER;
879
880 push @EXPORT_OK, qw($CNF_DEBUG_SELFCHECK);
881 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_SELFCHECK);
882
883 $_confparm_key_VALUES{"CNF_DEBUG_SELFCHECK"} = $CNF_DEBUG_SELFCHECK;
884
885 push @EXPORT_OK, qw($CNF_DEBUG_SENDSIZE);
886 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_SENDSIZE);
887
888 $_confparm_key_VALUES{"CNF_DEBUG_SENDSIZE"} = $CNF_DEBUG_SENDSIZE;
889
890 push @EXPORT_OK, qw($CNF_DEBUG_SENDBACKUP);
891 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_DEBUG_SENDBACKUP);
892
893 $_confparm_key_VALUES{"CNF_DEBUG_SENDBACKUP"} = $CNF_DEBUG_SENDBACKUP;
894
895 push @EXPORT_OK, qw($CNF_RESERVED_UDP_PORT);
896 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RESERVED_UDP_PORT);
897
898 $_confparm_key_VALUES{"CNF_RESERVED_UDP_PORT"} = $CNF_RESERVED_UDP_PORT;
899
900 push @EXPORT_OK, qw($CNF_RESERVED_TCP_PORT);
901 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_RESERVED_TCP_PORT);
902
903 $_confparm_key_VALUES{"CNF_RESERVED_TCP_PORT"} = $CNF_RESERVED_TCP_PORT;
904
905 push @EXPORT_OK, qw($CNF_UNRESERVED_TCP_PORT);
906 push @{$EXPORT_TAGS{"confparm_key"}}, qw($CNF_UNRESERVED_TCP_PORT);
907
908 $_confparm_key_VALUES{"CNF_UNRESERVED_TCP_PORT"} = $CNF_UNRESERVED_TCP_PORT;
909
910 #copy symbols in confparm_key to getconf
911 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"confparm_key"}};
912
913 push @EXPORT_OK, qw(tapetype_key_to_string);
914 push @{$EXPORT_TAGS{"tapetype_key"}}, qw(tapetype_key_to_string);
915
916 my %_tapetype_key_VALUES;
917 #Convert an enum value to a single string
918 sub tapetype_key_to_string {
919     my ($enumval) = @_;
920
921     for my $k (keys %_tapetype_key_VALUES) {
922         my $v = $_tapetype_key_VALUES{$k};
923
924         #is this a matching flag?
925         if ($enumval == $v) {
926             return $k;
927         }
928     }
929
930 #default, just return the number
931     return $enumval;
932 }
933
934 push @EXPORT_OK, qw($TAPETYPE_COMMENT);
935 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_COMMENT);
936
937 $_tapetype_key_VALUES{"TAPETYPE_COMMENT"} = $TAPETYPE_COMMENT;
938
939 push @EXPORT_OK, qw($TAPETYPE_LBL_TEMPL);
940 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_LBL_TEMPL);
941
942 $_tapetype_key_VALUES{"TAPETYPE_LBL_TEMPL"} = $TAPETYPE_LBL_TEMPL;
943
944 push @EXPORT_OK, qw($TAPETYPE_BLOCKSIZE);
945 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_BLOCKSIZE);
946
947 $_tapetype_key_VALUES{"TAPETYPE_BLOCKSIZE"} = $TAPETYPE_BLOCKSIZE;
948
949 push @EXPORT_OK, qw($TAPETYPE_READBLOCKSIZE);
950 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_READBLOCKSIZE);
951
952 $_tapetype_key_VALUES{"TAPETYPE_READBLOCKSIZE"} = $TAPETYPE_READBLOCKSIZE;
953
954 push @EXPORT_OK, qw($TAPETYPE_LENGTH);
955 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_LENGTH);
956
957 $_tapetype_key_VALUES{"TAPETYPE_LENGTH"} = $TAPETYPE_LENGTH;
958
959 push @EXPORT_OK, qw($TAPETYPE_FILEMARK);
960 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_FILEMARK);
961
962 $_tapetype_key_VALUES{"TAPETYPE_FILEMARK"} = $TAPETYPE_FILEMARK;
963
964 push @EXPORT_OK, qw($TAPETYPE_SPEED);
965 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_SPEED);
966
967 $_tapetype_key_VALUES{"TAPETYPE_SPEED"} = $TAPETYPE_SPEED;
968
969 push @EXPORT_OK, qw($TAPETYPE_FILE_PAD);
970 push @{$EXPORT_TAGS{"tapetype_key"}}, qw($TAPETYPE_FILE_PAD);
971
972 $_tapetype_key_VALUES{"TAPETYPE_FILE_PAD"} = $TAPETYPE_FILE_PAD;
973
974 #copy symbols in tapetype_key to getconf
975 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"tapetype_key"}};
976
977 push @EXPORT_OK, qw(dumptype_key_to_string);
978 push @{$EXPORT_TAGS{"dumptype_key"}}, qw(dumptype_key_to_string);
979
980 my %_dumptype_key_VALUES;
981 #Convert an enum value to a single string
982 sub dumptype_key_to_string {
983     my ($enumval) = @_;
984
985     for my $k (keys %_dumptype_key_VALUES) {
986         my $v = $_dumptype_key_VALUES{$k};
987
988         #is this a matching flag?
989         if ($enumval == $v) {
990             return $k;
991         }
992     }
993
994 #default, just return the number
995     return $enumval;
996 }
997
998 push @EXPORT_OK, qw($DUMPTYPE_COMMENT);
999 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_COMMENT);
1000
1001 $_dumptype_key_VALUES{"DUMPTYPE_COMMENT"} = $DUMPTYPE_COMMENT;
1002
1003 push @EXPORT_OK, qw($DUMPTYPE_PROGRAM);
1004 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_PROGRAM);
1005
1006 $_dumptype_key_VALUES{"DUMPTYPE_PROGRAM"} = $DUMPTYPE_PROGRAM;
1007
1008 push @EXPORT_OK, qw($DUMPTYPE_SRVCOMPPROG);
1009 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SRVCOMPPROG);
1010
1011 $_dumptype_key_VALUES{"DUMPTYPE_SRVCOMPPROG"} = $DUMPTYPE_SRVCOMPPROG;
1012
1013 push @EXPORT_OK, qw($DUMPTYPE_CLNTCOMPPROG);
1014 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLNTCOMPPROG);
1015
1016 $_dumptype_key_VALUES{"DUMPTYPE_CLNTCOMPPROG"} = $DUMPTYPE_CLNTCOMPPROG;
1017
1018 push @EXPORT_OK, qw($DUMPTYPE_SRV_ENCRYPT);
1019 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SRV_ENCRYPT);
1020
1021 $_dumptype_key_VALUES{"DUMPTYPE_SRV_ENCRYPT"} = $DUMPTYPE_SRV_ENCRYPT;
1022
1023 push @EXPORT_OK, qw($DUMPTYPE_CLNT_ENCRYPT);
1024 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLNT_ENCRYPT);
1025
1026 $_dumptype_key_VALUES{"DUMPTYPE_CLNT_ENCRYPT"} = $DUMPTYPE_CLNT_ENCRYPT;
1027
1028 push @EXPORT_OK, qw($DUMPTYPE_AMANDAD_PATH);
1029 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_AMANDAD_PATH);
1030
1031 $_dumptype_key_VALUES{"DUMPTYPE_AMANDAD_PATH"} = $DUMPTYPE_AMANDAD_PATH;
1032
1033 push @EXPORT_OK, qw($DUMPTYPE_CLIENT_USERNAME);
1034 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLIENT_USERNAME);
1035
1036 $_dumptype_key_VALUES{"DUMPTYPE_CLIENT_USERNAME"} = $DUMPTYPE_CLIENT_USERNAME;
1037
1038 push @EXPORT_OK, qw($DUMPTYPE_SSH_KEYS);
1039 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SSH_KEYS);
1040
1041 $_dumptype_key_VALUES{"DUMPTYPE_SSH_KEYS"} = $DUMPTYPE_SSH_KEYS;
1042
1043 push @EXPORT_OK, qw($DUMPTYPE_SECURITY_DRIVER);
1044 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SECURITY_DRIVER);
1045
1046 $_dumptype_key_VALUES{"DUMPTYPE_SECURITY_DRIVER"} = $DUMPTYPE_SECURITY_DRIVER;
1047
1048 push @EXPORT_OK, qw($DUMPTYPE_EXCLUDE);
1049 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_EXCLUDE);
1050
1051 $_dumptype_key_VALUES{"DUMPTYPE_EXCLUDE"} = $DUMPTYPE_EXCLUDE;
1052
1053 push @EXPORT_OK, qw($DUMPTYPE_INCLUDE);
1054 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_INCLUDE);
1055
1056 $_dumptype_key_VALUES{"DUMPTYPE_INCLUDE"} = $DUMPTYPE_INCLUDE;
1057
1058 push @EXPORT_OK, qw($DUMPTYPE_PRIORITY);
1059 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_PRIORITY);
1060
1061 $_dumptype_key_VALUES{"DUMPTYPE_PRIORITY"} = $DUMPTYPE_PRIORITY;
1062
1063 push @EXPORT_OK, qw($DUMPTYPE_DUMPCYCLE);
1064 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_DUMPCYCLE);
1065
1066 $_dumptype_key_VALUES{"DUMPTYPE_DUMPCYCLE"} = $DUMPTYPE_DUMPCYCLE;
1067
1068 push @EXPORT_OK, qw($DUMPTYPE_MAXDUMPS);
1069 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_MAXDUMPS);
1070
1071 $_dumptype_key_VALUES{"DUMPTYPE_MAXDUMPS"} = $DUMPTYPE_MAXDUMPS;
1072
1073 push @EXPORT_OK, qw($DUMPTYPE_MAXPROMOTEDAY);
1074 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_MAXPROMOTEDAY);
1075
1076 $_dumptype_key_VALUES{"DUMPTYPE_MAXPROMOTEDAY"} = $DUMPTYPE_MAXPROMOTEDAY;
1077
1078 push @EXPORT_OK, qw($DUMPTYPE_BUMPPERCENT);
1079 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPPERCENT);
1080
1081 $_dumptype_key_VALUES{"DUMPTYPE_BUMPPERCENT"} = $DUMPTYPE_BUMPPERCENT;
1082
1083 push @EXPORT_OK, qw($DUMPTYPE_BUMPSIZE);
1084 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPSIZE);
1085
1086 $_dumptype_key_VALUES{"DUMPTYPE_BUMPSIZE"} = $DUMPTYPE_BUMPSIZE;
1087
1088 push @EXPORT_OK, qw($DUMPTYPE_BUMPDAYS);
1089 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPDAYS);
1090
1091 $_dumptype_key_VALUES{"DUMPTYPE_BUMPDAYS"} = $DUMPTYPE_BUMPDAYS;
1092
1093 push @EXPORT_OK, qw($DUMPTYPE_BUMPMULT);
1094 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_BUMPMULT);
1095
1096 $_dumptype_key_VALUES{"DUMPTYPE_BUMPMULT"} = $DUMPTYPE_BUMPMULT;
1097
1098 push @EXPORT_OK, qw($DUMPTYPE_STARTTIME);
1099 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_STARTTIME);
1100
1101 $_dumptype_key_VALUES{"DUMPTYPE_STARTTIME"} = $DUMPTYPE_STARTTIME;
1102
1103 push @EXPORT_OK, qw($DUMPTYPE_STRATEGY);
1104 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_STRATEGY);
1105
1106 $_dumptype_key_VALUES{"DUMPTYPE_STRATEGY"} = $DUMPTYPE_STRATEGY;
1107
1108 push @EXPORT_OK, qw($DUMPTYPE_ESTIMATE);
1109 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_ESTIMATE);
1110
1111 $_dumptype_key_VALUES{"DUMPTYPE_ESTIMATE"} = $DUMPTYPE_ESTIMATE;
1112
1113 push @EXPORT_OK, qw($DUMPTYPE_COMPRESS);
1114 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_COMPRESS);
1115
1116 $_dumptype_key_VALUES{"DUMPTYPE_COMPRESS"} = $DUMPTYPE_COMPRESS;
1117
1118 push @EXPORT_OK, qw($DUMPTYPE_ENCRYPT);
1119 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_ENCRYPT);
1120
1121 $_dumptype_key_VALUES{"DUMPTYPE_ENCRYPT"} = $DUMPTYPE_ENCRYPT;
1122
1123 push @EXPORT_OK, qw($DUMPTYPE_SRV_DECRYPT_OPT);
1124 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SRV_DECRYPT_OPT);
1125
1126 $_dumptype_key_VALUES{"DUMPTYPE_SRV_DECRYPT_OPT"} = $DUMPTYPE_SRV_DECRYPT_OPT;
1127
1128 push @EXPORT_OK, qw($DUMPTYPE_CLNT_DECRYPT_OPT);
1129 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_CLNT_DECRYPT_OPT);
1130
1131 $_dumptype_key_VALUES{"DUMPTYPE_CLNT_DECRYPT_OPT"} = $DUMPTYPE_CLNT_DECRYPT_OPT;
1132
1133 push @EXPORT_OK, qw($DUMPTYPE_COMPRATE);
1134 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_COMPRATE);
1135
1136 $_dumptype_key_VALUES{"DUMPTYPE_COMPRATE"} = $DUMPTYPE_COMPRATE;
1137
1138 push @EXPORT_OK, qw($DUMPTYPE_TAPE_SPLITSIZE);
1139 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_TAPE_SPLITSIZE);
1140
1141 $_dumptype_key_VALUES{"DUMPTYPE_TAPE_SPLITSIZE"} = $DUMPTYPE_TAPE_SPLITSIZE;
1142
1143 push @EXPORT_OK, qw($DUMPTYPE_FALLBACK_SPLITSIZE);
1144 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_FALLBACK_SPLITSIZE);
1145
1146 $_dumptype_key_VALUES{"DUMPTYPE_FALLBACK_SPLITSIZE"} = $DUMPTYPE_FALLBACK_SPLITSIZE;
1147
1148 push @EXPORT_OK, qw($DUMPTYPE_SPLIT_DISKBUFFER);
1149 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SPLIT_DISKBUFFER);
1150
1151 $_dumptype_key_VALUES{"DUMPTYPE_SPLIT_DISKBUFFER"} = $DUMPTYPE_SPLIT_DISKBUFFER;
1152
1153 push @EXPORT_OK, qw($DUMPTYPE_RECORD);
1154 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_RECORD);
1155
1156 $_dumptype_key_VALUES{"DUMPTYPE_RECORD"} = $DUMPTYPE_RECORD;
1157
1158 push @EXPORT_OK, qw($DUMPTYPE_SKIP_INCR);
1159 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SKIP_INCR);
1160
1161 $_dumptype_key_VALUES{"DUMPTYPE_SKIP_INCR"} = $DUMPTYPE_SKIP_INCR;
1162
1163 push @EXPORT_OK, qw($DUMPTYPE_SKIP_FULL);
1164 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_SKIP_FULL);
1165
1166 $_dumptype_key_VALUES{"DUMPTYPE_SKIP_FULL"} = $DUMPTYPE_SKIP_FULL;
1167
1168 push @EXPORT_OK, qw($DUMPTYPE_HOLDINGDISK);
1169 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_HOLDINGDISK);
1170
1171 $_dumptype_key_VALUES{"DUMPTYPE_HOLDINGDISK"} = $DUMPTYPE_HOLDINGDISK;
1172
1173 push @EXPORT_OK, qw($DUMPTYPE_KENCRYPT);
1174 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_KENCRYPT);
1175
1176 $_dumptype_key_VALUES{"DUMPTYPE_KENCRYPT"} = $DUMPTYPE_KENCRYPT;
1177
1178 push @EXPORT_OK, qw($DUMPTYPE_IGNORE);
1179 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_IGNORE);
1180
1181 $_dumptype_key_VALUES{"DUMPTYPE_IGNORE"} = $DUMPTYPE_IGNORE;
1182
1183 push @EXPORT_OK, qw($DUMPTYPE_INDEX);
1184 push @{$EXPORT_TAGS{"dumptype_key"}}, qw($DUMPTYPE_INDEX);
1185
1186 $_dumptype_key_VALUES{"DUMPTYPE_INDEX"} = $DUMPTYPE_INDEX;
1187
1188 #copy symbols in dumptype_key to getconf
1189 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"dumptype_key"}};
1190
1191 push @EXPORT_OK, qw(interface_key_to_string);
1192 push @{$EXPORT_TAGS{"interface_key"}}, qw(interface_key_to_string);
1193
1194 my %_interface_key_VALUES;
1195 #Convert an enum value to a single string
1196 sub interface_key_to_string {
1197     my ($enumval) = @_;
1198
1199     for my $k (keys %_interface_key_VALUES) {
1200         my $v = $_interface_key_VALUES{$k};
1201
1202         #is this a matching flag?
1203         if ($enumval == $v) {
1204             return $k;
1205         }
1206     }
1207
1208 #default, just return the number
1209     return $enumval;
1210 }
1211
1212 push @EXPORT_OK, qw($INTER_COMMENT);
1213 push @{$EXPORT_TAGS{"interface_key"}}, qw($INTER_COMMENT);
1214
1215 $_interface_key_VALUES{"INTER_COMMENT"} = $INTER_COMMENT;
1216
1217 push @EXPORT_OK, qw($INTER_MAXUSAGE);
1218 push @{$EXPORT_TAGS{"interface_key"}}, qw($INTER_MAXUSAGE);
1219
1220 $_interface_key_VALUES{"INTER_MAXUSAGE"} = $INTER_MAXUSAGE;
1221
1222 #copy symbols in interface_key to getconf
1223 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"interface_key"}};
1224
1225 push @EXPORT_OK, qw(holdingdisk_key_to_string);
1226 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw(holdingdisk_key_to_string);
1227
1228 my %_holdingdisk_key_VALUES;
1229 #Convert an enum value to a single string
1230 sub holdingdisk_key_to_string {
1231     my ($enumval) = @_;
1232
1233     for my $k (keys %_holdingdisk_key_VALUES) {
1234         my $v = $_holdingdisk_key_VALUES{$k};
1235
1236         #is this a matching flag?
1237         if ($enumval == $v) {
1238             return $k;
1239         }
1240     }
1241
1242 #default, just return the number
1243     return $enumval;
1244 }
1245
1246 push @EXPORT_OK, qw($HOLDING_COMMENT);
1247 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_COMMENT);
1248
1249 $_holdingdisk_key_VALUES{"HOLDING_COMMENT"} = $HOLDING_COMMENT;
1250
1251 push @EXPORT_OK, qw($HOLDING_DISKDIR);
1252 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_DISKDIR);
1253
1254 $_holdingdisk_key_VALUES{"HOLDING_DISKDIR"} = $HOLDING_DISKDIR;
1255
1256 push @EXPORT_OK, qw($HOLDING_DISKSIZE);
1257 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_DISKSIZE);
1258
1259 $_holdingdisk_key_VALUES{"HOLDING_DISKSIZE"} = $HOLDING_DISKSIZE;
1260
1261 push @EXPORT_OK, qw($HOLDING_CHUNKSIZE);
1262 push @{$EXPORT_TAGS{"holdingdisk_key"}}, qw($HOLDING_CHUNKSIZE);
1263
1264 $_holdingdisk_key_VALUES{"HOLDING_CHUNKSIZE"} = $HOLDING_CHUNKSIZE;
1265
1266 #copy symbols in holdingdisk_key to getconf
1267 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"holdingdisk_key"}};
1268
1269 push @EXPORT_OK, qw(dump_holdingdisk_t_to_string);
1270 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw(dump_holdingdisk_t_to_string);
1271
1272 my %_dump_holdingdisk_t_VALUES;
1273 #Convert an enum value to a single string
1274 sub dump_holdingdisk_t_to_string {
1275     my ($enumval) = @_;
1276
1277     for my $k (keys %_dump_holdingdisk_t_VALUES) {
1278         my $v = $_dump_holdingdisk_t_VALUES{$k};
1279
1280         #is this a matching flag?
1281         if ($enumval == $v) {
1282             return $k;
1283         }
1284     }
1285
1286 #default, just return the number
1287     return $enumval;
1288 }
1289
1290 push @EXPORT_OK, qw($HOLD_NEVER);
1291 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw($HOLD_NEVER);
1292
1293 $_dump_holdingdisk_t_VALUES{"HOLD_NEVER"} = $HOLD_NEVER;
1294
1295 push @EXPORT_OK, qw($HOLD_AUTO);
1296 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw($HOLD_AUTO);
1297
1298 $_dump_holdingdisk_t_VALUES{"HOLD_AUTO"} = $HOLD_AUTO;
1299
1300 push @EXPORT_OK, qw($HOLD_REQUIRED);
1301 push @{$EXPORT_TAGS{"dump_holdingdisk_t"}}, qw($HOLD_REQUIRED);
1302
1303 $_dump_holdingdisk_t_VALUES{"HOLD_REQUIRED"} = $HOLD_REQUIRED;
1304
1305 #copy symbols in dump_holdingdisk_t to getconf
1306 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"dump_holdingdisk_t"}};
1307
1308 push @EXPORT_OK, qw(comp_t_to_string);
1309 push @{$EXPORT_TAGS{"comp_t"}}, qw(comp_t_to_string);
1310
1311 my %_comp_t_VALUES;
1312 #Convert an enum value to a single string
1313 sub comp_t_to_string {
1314     my ($enumval) = @_;
1315
1316     for my $k (keys %_comp_t_VALUES) {
1317         my $v = $_comp_t_VALUES{$k};
1318
1319         #is this a matching flag?
1320         if ($enumval == $v) {
1321             return $k;
1322         }
1323     }
1324
1325 #default, just return the number
1326     return $enumval;
1327 }
1328
1329 push @EXPORT_OK, qw($COMP_NONE);
1330 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_NONE);
1331
1332 $_comp_t_VALUES{"COMP_NONE"} = $COMP_NONE;
1333
1334 push @EXPORT_OK, qw($COMP_FAST);
1335 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_FAST);
1336
1337 $_comp_t_VALUES{"COMP_FAST"} = $COMP_FAST;
1338
1339 push @EXPORT_OK, qw($COMP_BEST);
1340 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_BEST);
1341
1342 $_comp_t_VALUES{"COMP_BEST"} = $COMP_BEST;
1343
1344 push @EXPORT_OK, qw($COMP_CUST);
1345 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_CUST);
1346
1347 $_comp_t_VALUES{"COMP_CUST"} = $COMP_CUST;
1348
1349 push @EXPORT_OK, qw($COMP_SERVER_FAST);
1350 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_SERVER_FAST);
1351
1352 $_comp_t_VALUES{"COMP_SERVER_FAST"} = $COMP_SERVER_FAST;
1353
1354 push @EXPORT_OK, qw($COMP_SERVER_BEST);
1355 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_SERVER_BEST);
1356
1357 $_comp_t_VALUES{"COMP_SERVER_BEST"} = $COMP_SERVER_BEST;
1358
1359 push @EXPORT_OK, qw($COMP_SERVER_CUST);
1360 push @{$EXPORT_TAGS{"comp_t"}}, qw($COMP_SERVER_CUST);
1361
1362 $_comp_t_VALUES{"COMP_SERVER_CUST"} = $COMP_SERVER_CUST;
1363
1364 #copy symbols in comp_t to getconf
1365 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"comp_t"}};
1366
1367 push @EXPORT_OK, qw(encrypt_t_to_string);
1368 push @{$EXPORT_TAGS{"encrypt_t"}}, qw(encrypt_t_to_string);
1369
1370 my %_encrypt_t_VALUES;
1371 #Convert an enum value to a single string
1372 sub encrypt_t_to_string {
1373     my ($enumval) = @_;
1374
1375     for my $k (keys %_encrypt_t_VALUES) {
1376         my $v = $_encrypt_t_VALUES{$k};
1377
1378         #is this a matching flag?
1379         if ($enumval == $v) {
1380             return $k;
1381         }
1382     }
1383
1384 #default, just return the number
1385     return $enumval;
1386 }
1387
1388 push @EXPORT_OK, qw($ENCRYPT_NONE);
1389 push @{$EXPORT_TAGS{"encrypt_t"}}, qw($ENCRYPT_NONE);
1390
1391 $_encrypt_t_VALUES{"ENCRYPT_NONE"} = $ENCRYPT_NONE;
1392
1393 push @EXPORT_OK, qw($ENCRYPT_CUST);
1394 push @{$EXPORT_TAGS{"encrypt_t"}}, qw($ENCRYPT_CUST);
1395
1396 $_encrypt_t_VALUES{"ENCRYPT_CUST"} = $ENCRYPT_CUST;
1397
1398 push @EXPORT_OK, qw($ENCRYPT_SERV_CUST);
1399 push @{$EXPORT_TAGS{"encrypt_t"}}, qw($ENCRYPT_SERV_CUST);
1400
1401 $_encrypt_t_VALUES{"ENCRYPT_SERV_CUST"} = $ENCRYPT_SERV_CUST;
1402
1403 #copy symbols in encrypt_t to getconf
1404 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"encrypt_t"}};
1405
1406 push @EXPORT_OK, qw(strategy_t_to_string);
1407 push @{$EXPORT_TAGS{"strategy_t"}}, qw(strategy_t_to_string);
1408
1409 my %_strategy_t_VALUES;
1410 #Convert an enum value to a single string
1411 sub strategy_t_to_string {
1412     my ($enumval) = @_;
1413
1414     for my $k (keys %_strategy_t_VALUES) {
1415         my $v = $_strategy_t_VALUES{$k};
1416
1417         #is this a matching flag?
1418         if ($enumval == $v) {
1419             return $k;
1420         }
1421     }
1422
1423 #default, just return the number
1424     return $enumval;
1425 }
1426
1427 push @EXPORT_OK, qw($DS_SKIP);
1428 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_SKIP);
1429
1430 $_strategy_t_VALUES{"DS_SKIP"} = $DS_SKIP;
1431
1432 push @EXPORT_OK, qw($DS_STANDARD);
1433 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_STANDARD);
1434
1435 $_strategy_t_VALUES{"DS_STANDARD"} = $DS_STANDARD;
1436
1437 push @EXPORT_OK, qw($DS_NOFULL);
1438 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_NOFULL);
1439
1440 $_strategy_t_VALUES{"DS_NOFULL"} = $DS_NOFULL;
1441
1442 push @EXPORT_OK, qw($DS_NOINC);
1443 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_NOINC);
1444
1445 $_strategy_t_VALUES{"DS_NOINC"} = $DS_NOINC;
1446
1447 push @EXPORT_OK, qw($DS_4);
1448 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_4);
1449
1450 $_strategy_t_VALUES{"DS_4"} = $DS_4;
1451
1452 push @EXPORT_OK, qw($DS_5);
1453 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_5);
1454
1455 $_strategy_t_VALUES{"DS_5"} = $DS_5;
1456
1457 push @EXPORT_OK, qw($DS_HANOI);
1458 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_HANOI);
1459
1460 $_strategy_t_VALUES{"DS_HANOI"} = $DS_HANOI;
1461
1462 push @EXPORT_OK, qw($DS_INCRONLY);
1463 push @{$EXPORT_TAGS{"strategy_t"}}, qw($DS_INCRONLY);
1464
1465 $_strategy_t_VALUES{"DS_INCRONLY"} = $DS_INCRONLY;
1466
1467 #copy symbols in strategy_t to getconf
1468 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"strategy_t"}};
1469
1470 push @EXPORT_OK, qw(estimate_t_to_string);
1471 push @{$EXPORT_TAGS{"estimate_t"}}, qw(estimate_t_to_string);
1472
1473 my %_estimate_t_VALUES;
1474 #Convert an enum value to a single string
1475 sub estimate_t_to_string {
1476     my ($enumval) = @_;
1477
1478     for my $k (keys %_estimate_t_VALUES) {
1479         my $v = $_estimate_t_VALUES{$k};
1480
1481         #is this a matching flag?
1482         if ($enumval == $v) {
1483             return $k;
1484         }
1485     }
1486
1487 #default, just return the number
1488     return $enumval;
1489 }
1490
1491 push @EXPORT_OK, qw($ES_CLIENT);
1492 push @{$EXPORT_TAGS{"estimate_t"}}, qw($ES_CLIENT);
1493
1494 $_estimate_t_VALUES{"ES_CLIENT"} = $ES_CLIENT;
1495
1496 push @EXPORT_OK, qw($ES_SERVER);
1497 push @{$EXPORT_TAGS{"estimate_t"}}, qw($ES_SERVER);
1498
1499 $_estimate_t_VALUES{"ES_SERVER"} = $ES_SERVER;
1500
1501 push @EXPORT_OK, qw($ES_CALCSIZE);
1502 push @{$EXPORT_TAGS{"estimate_t"}}, qw($ES_CALCSIZE);
1503
1504 $_estimate_t_VALUES{"ES_CALCSIZE"} = $ES_CALCSIZE;
1505
1506 #copy symbols in estimate_t to getconf
1507 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"estimate_t"}};
1508
1509 push @EXPORT_OK, qw(taperalgo_t_to_string);
1510 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw(taperalgo_t_to_string);
1511
1512 my %_taperalgo_t_VALUES;
1513 #Convert an enum value to a single string
1514 sub taperalgo_t_to_string {
1515     my ($enumval) = @_;
1516
1517     for my $k (keys %_taperalgo_t_VALUES) {
1518         my $v = $_taperalgo_t_VALUES{$k};
1519
1520         #is this a matching flag?
1521         if ($enumval == $v) {
1522             return $k;
1523         }
1524     }
1525
1526 #default, just return the number
1527     return $enumval;
1528 }
1529
1530 push @EXPORT_OK, qw($ALGO_FIRST);
1531 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_FIRST);
1532
1533 $_taperalgo_t_VALUES{"ALGO_FIRST"} = $ALGO_FIRST;
1534
1535 push @EXPORT_OK, qw($ALGO_FIRSTFIT);
1536 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_FIRSTFIT);
1537
1538 $_taperalgo_t_VALUES{"ALGO_FIRSTFIT"} = $ALGO_FIRSTFIT;
1539
1540 push @EXPORT_OK, qw($ALGO_LARGEST);
1541 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_LARGEST);
1542
1543 $_taperalgo_t_VALUES{"ALGO_LARGEST"} = $ALGO_LARGEST;
1544
1545 push @EXPORT_OK, qw($ALGO_LARGESTFIT);
1546 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_LARGESTFIT);
1547
1548 $_taperalgo_t_VALUES{"ALGO_LARGESTFIT"} = $ALGO_LARGESTFIT;
1549
1550 push @EXPORT_OK, qw($ALGO_SMALLEST);
1551 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_SMALLEST);
1552
1553 $_taperalgo_t_VALUES{"ALGO_SMALLEST"} = $ALGO_SMALLEST;
1554
1555 push @EXPORT_OK, qw($ALGO_LAST);
1556 push @{$EXPORT_TAGS{"taperalgo_t"}}, qw($ALGO_LAST);
1557
1558 $_taperalgo_t_VALUES{"ALGO_LAST"} = $ALGO_LAST;
1559
1560 #copy symbols in taperalgo_t to getconf
1561 push @{$EXPORT_TAGS{"getconf"}},  @{$EXPORT_TAGS{"taperalgo_t"}};
1562
1563 push @EXPORT_OK, qw(getconf getconf_seen 
1564     getconf_byname getconf_list);
1565 push @{$EXPORT_TAGS{"getconf"}}, qw(getconf getconf_seen 
1566     getconf_byname getconf_list);
1567
1568 push @EXPORT_OK, qw(lookup_tapetype tapetype_getconf tapetype_name
1569     tapetype_seen tapetype_seen);
1570 push @{$EXPORT_TAGS{"getconf"}}, qw(lookup_tapetype tapetype_getconf tapetype_name
1571     tapetype_seen tapetype_seen);
1572
1573 push @EXPORT_OK, qw(lookup_dumptype dumptype_getconf dumptype_name
1574     dumptype_seen dumptype_seen);
1575 push @{$EXPORT_TAGS{"getconf"}}, qw(lookup_dumptype dumptype_getconf dumptype_name
1576     dumptype_seen dumptype_seen);
1577
1578 push @EXPORT_OK, qw(lookup_interface interface_getconf interface_name
1579     interface_seen interface_seen);
1580 push @{$EXPORT_TAGS{"getconf"}}, qw(lookup_interface interface_getconf interface_name
1581     interface_seen interface_seen);
1582
1583 push @EXPORT_OK, qw(lookup_holdingdisk holdingdisk_getconf holdingdisk_name
1584     getconf_holdingdisks holdingdisk_next
1585     holdingdisk_seen holdingdisk_seen);
1586 push @{$EXPORT_TAGS{"getconf"}}, qw(lookup_holdingdisk holdingdisk_getconf holdingdisk_name
1587     getconf_holdingdisks holdingdisk_next
1588     holdingdisk_seen holdingdisk_seen);
1589
1590 push @EXPORT_OK, qw(getconf_unit_divisor
1591
1592     $debug_amandad $debug_amidxtaped $debug_amindexd $debug_amrecover
1593     $debug_auth $debug_event $debug_holding $debug_protocol
1594     $debug_planner $debug_driver $debug_dumper $debug_chunker
1595     $debug_taper $debug_selfcheck $debug_sendsize $debug_sendbackup);
1596 push @{$EXPORT_TAGS{"getconf"}}, qw(getconf_unit_divisor
1597
1598     $debug_amandad $debug_amidxtaped $debug_amindexd $debug_amrecover
1599     $debug_auth $debug_event $debug_holding $debug_protocol
1600     $debug_planner $debug_driver $debug_dumper $debug_chunker
1601     $debug_taper $debug_selfcheck $debug_sendsize $debug_sendbackup);
1602
1603 push @EXPORT_OK, qw(new_config_overwrites free_config_overwrites add_config_overwrite
1604     add_config_overwrite_opt apply_config_overwrites);
1605 push @{$EXPORT_TAGS{"init"}}, qw(new_config_overwrites free_config_overwrites add_config_overwrite
1606     add_config_overwrite_opt apply_config_overwrites);
1607
1608 push @EXPORT_OK, qw(config_init_flags_to_strings);
1609 push @{$EXPORT_TAGS{"config_init_flags"}}, qw(config_init_flags_to_strings);
1610
1611 my %_config_init_flags_VALUES;
1612 #Convert a flag value to a list of names for flags that are set.
1613 sub config_init_flags_to_strings {
1614     my ($flags) = @_;
1615     my @result = ();
1616
1617     for my $k (keys %_config_init_flags_VALUES) {
1618         my $v = $_config_init_flags_VALUES{$k};
1619
1620         #is this a matching flag?
1621         if (($v == 0 && $flags == 0) || ($v != 0 && ($flags & $v) == $v)) {
1622             push @result, $k;
1623         }
1624     }
1625
1626 #by default, just return the number as a 1-element list
1627     if (!@result) {
1628         return ($flags);
1629     }
1630
1631     return @result;
1632 }
1633
1634 push @EXPORT_OK, qw($CONFIG_INIT_EXPLICIT_NAME);
1635 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_EXPLICIT_NAME);
1636
1637 $_config_init_flags_VALUES{"CONFIG_INIT_EXPLICIT_NAME"} = $CONFIG_INIT_EXPLICIT_NAME;
1638
1639 push @EXPORT_OK, qw($CONFIG_INIT_USE_CWD);
1640 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_USE_CWD);
1641
1642 $_config_init_flags_VALUES{"CONFIG_INIT_USE_CWD"} = $CONFIG_INIT_USE_CWD;
1643
1644 push @EXPORT_OK, qw($CONFIG_INIT_CLIENT);
1645 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_CLIENT);
1646
1647 $_config_init_flags_VALUES{"CONFIG_INIT_CLIENT"} = $CONFIG_INIT_CLIENT;
1648
1649 push @EXPORT_OK, qw($CONFIG_INIT_OVERLAY);
1650 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_OVERLAY);
1651
1652 $_config_init_flags_VALUES{"CONFIG_INIT_OVERLAY"} = $CONFIG_INIT_OVERLAY;
1653
1654 push @EXPORT_OK, qw($CONFIG_INIT_FATAL);
1655 push @{$EXPORT_TAGS{"config_init_flags"}}, qw($CONFIG_INIT_FATAL);
1656
1657 $_config_init_flags_VALUES{"CONFIG_INIT_FATAL"} = $CONFIG_INIT_FATAL;
1658
1659 #copy symbols in config_init_flags to init
1660 push @{$EXPORT_TAGS{"init"}},  @{$EXPORT_TAGS{"config_init_flags"}};
1661
1662 push @EXPORT_OK, qw(config_init config_uninit get_config_options);
1663 push @{$EXPORT_TAGS{"init"}}, qw(config_init config_uninit get_config_options);
1664
1665 push @EXPORT_OK, qw(get_config_name 
1666     get_config_dir 
1667     get_config_filename);
1668 push @{$EXPORT_TAGS{"init"}}, qw(get_config_name 
1669     get_config_dir 
1670     get_config_filename);
1671
1672 push @EXPORT_OK, qw(dump_configuration config_dir_relative taperalgo2str find_multiplier);
1673 1;