2 * Copyright (c) 2009-2012 Zmanda, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * Contact information: Zmanda Inc., 465 S. Mathilda Ave., Suite 300
19 * Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
26 Amanda::Feature - interface to Amanda feature bitfields
30 # set up features for this instance and print them
31 my $features = Amanda::Feature::Set->mine();
32 print "my features: $features\n";
34 # parse the other side's features
35 my $client_feat = Amanda::Feature::Set->from_string($feat_str);
37 # or assume the other side's features are old
38 my $client_feat = Amanda::Feature::Set->old()
41 if ($feat->has($Amanda::Feature::fe_options_bsd_auth)) {
42 print "has BSD auth\n";
47 C<Amanda::Feature::Set> objects are fairly simple. The three constructors are
48 shown in the SYNOPSIS: C<mine> (all currently-supported features), C<old> (only
49 the features present in versions of Amanda before features were invented), or
52 An object has three methods to address specific bits:
55 $feat->add($Amanda::Feature::fe_req_xml);
58 $feat->remove($Amanda::Feature::fe_req_xml);
61 if ($feat->has($Amanda::Feature::fe_req_xml)) ..
63 And C<as_string> which converts the feature into a string.
65 All features are available in scalars of the same name in the
66 C<Amanda::Feature> namespace.
68 =head1 FEATURE DOCUMENTATION
70 This section includes as much information as is available for each feature.
71 Each subsection begins with a description of the protocols in
72 which the feature is relevant, and the end on which the feature is relevant.
73 Any known dependencies for the feature are also mentioned. Assume that any
74 omissions in this section are due to limited information.
78 =item fe_recover_splits
83 If set, the recovery application supports a DATA connection on a separate TCP
86 Dependencies: this feature is always set when amidxtaped is invoked via
89 =item fe_amidxtaped_exchange_features
94 If set, amidxtaped can process the FEATURES= line in the command.
95 The flag is actually tested by amrecover on amindexd's feature matrix, due to
96 ordering constraints, so it assumes that amindexd and amidxtaped have the same
99 =item fe_amrecover_FEEDME
104 If set, amrecover understands FEEDME lines on the control connection.
106 Dependencies: this feature can only be set if fe_recover_splits is set.
108 =item fe_amrecover_timestamp
113 If set, the recovery application supports full timestamps; otherwise, it can
114 only process datestamps.
116 =item fe_amidxtaped_options_hostname
118 =item fe_amidxtaped_options_features
120 =item fe_amidxtaped_options_auth
125 These feature flags indicate what fields amidxtaped supports in the OPTIONS
126 line. Of course, the client would need to know these features before it
127 received the OPTIONS line, which would necessitate sending a NOOP request
128 first. In practice, they are completely unused.
130 =item fe_amrecover_message
135 If set, the recovery applications understands MESSAGE lines on the control connection.
137 Dependencies: a control connection only exists if amidxtaped is launched from
138 amandad or I<fe_recover_splits> is used.
140 =item fe_amrecover_feedme_tape
145 If set, amidxtaped recognizes the TAPE response to FEEDME.
147 =item fe_amrecover_dle_in_header
149 =item fe_amrecover_origsize_in_header
154 If set, amrecover can process a header containing the corresponding attribute.
155 If not set, the attribute should be stripped from any headers sent to
158 Feature Header Attribute
159 ------- ----------------
160 dle_in_header dle_str
161 origsize_in_header orig_size
163 =item fe_amidxtaped_abort
168 If set, amidxtaped can handle an ABORT message just before the datapath
171 =item fe_amidxtaped_datapath
174 FEATURE OF: client and server
176 If set on the client, then amrecover expects the server to start a DATAPATH
177 negotiation after the header is sent. If set on the server, then amrecover can
178 process a DATAPATH negotiation after the header is sent. In other words, the
179 feature must be present on both sides for this negotiation to take place. The
180 DATAPATH negotiation is a three-way handshake:
182 AVAIL-DATAPATH <datapath list> # to amidxtaped
183 USE-DATAPATH <datapath> [<ip:port> ..] # from amidxtaped
184 DATAPATH-OK # to amidxtaped
186 No data may be transmitted until the handshake is complete. See the wiki
187 article entitled "amidxtaped protocol" for more detail.
189 =item fe_amidxtaped_fsf
191 =item fe_amidxtaped_label
193 =item fe_amidxtaped_device
195 =item fe_amidxtaped_host
197 =item fe_amidxtaped_disk
199 =item fe_amidxtaped_datestamp
201 =item fe_amidxtaped_header
203 =item fe_amidxtaped_config
208 If set, each feature means that amidxtaped can process the corresponding
209 command line. Note that I<fe_amidxtaped_label> does not indicate whether that
210 field contains a label or a tapespec.
212 =item fe_amidxtaped_nargs
217 If set, then amidxtaped can handle the "nargs" form of a command: The first
218 line was the number of arguments, folloewd by one argument by line. Amidxtaped
219 forked amrestore with these arguments.
221 This feature is no longer supported.
223 =item fe_amrecover_correct_disk_quoting
226 FEATURE OF: amrecover
228 Amrecovers that do not have this flag may send incorrectly-quoted DISK lines, so
229 those DISK lines should be ignored.
231 =item fe_amindexd_quote_label
236 If set, amindexd quote the label (holdingdisk filename)
238 =item fe_amrecover_receive_unfiltered
243 If set, amidxtaped do not decompress/decrypt client compressed/decrypted stream.
245 =item fe_application_client_name
247 If set, add the 'client_name' for application in the xml code.
249 =item fe_script_client_name
251 If set, add the 'client_name' for script in the xml code.
253 =item fe_dumptype_property
255 If set, add the dumptype property in the xml code.