4 .\" ipptoolfile man page for CUPS.
6 .\" Copyright 2010-2013 by Apple Inc.
8 .\" These coded instructions, statements, and computer programs are the
9 .\" property of Apple Inc. and are protected by Federal copyright
10 .\" law. Distribution and use rights are outlined in the file "LICENSE.txt"
11 .\" which should have been included with this file. If this file is
12 .\" file is missing or damaged, see the license at "http://www.cups.org/".
14 .TH ipptoolfile 5 "CUPS" "10 January 2013" "Apple Inc."
16 ipptoolfile \- ipptool file format
19 The \fIipptool(1)\fR program accepts free-form plain text files that describe one or more IPP requests. Comments start with the "#" character and continue to the end of the line. Each request is enclosed by curly braces, for example:
24 # The name of the test
25 NAME "Print PostScript Job"
29 GROUP operation-attributes-tag
30 ATTR charset attributes-charset utf-8
31 ATTR language attributes-natural-language en
32 ATTR uri printer-uri $uri
33 ATTR name requesting-user-name $user
36 # The response to expect
38 EXPECT attributes-charset OF-TYPE charset
39 EXPECT attributes-natural-language OF-TYPE naturalLanguage
40 EXPECT job-id OF-TYPE integer
41 EXPECT job-uri OF-TYPE uri
44 # The name of the test
45 NAME "Get Attributes of PostScript Job"
48 OPERATION Get-Job-Attributes
49 GROUP operation-attributes-tag
50 ATTR charset attributes-charset utf-8
51 ATTR language attributes-natural-language en
52 ATTR uri printer-uri $uri
53 ATTR integer job-id $job-id
54 ATTR name requesting-user-name $user
56 # The response to expect
58 EXPECT attributes-charset OF-TYPE charset
59 EXPECT attributes-natural-language OF-TYPE naturalLanguage
60 EXPECT job-id OF-TYPE integer
61 EXPECT job-uri OF-TYPE uri
62 EXPECT job-state OF-TYPE enum
63 EXPECT job-originating-user-name OF-TYPE name WITH-VALUE "$user"
67 .SH TOP-LEVEL DIRECTIVES
68 The following directives can be used outside of a test:
73 DEFINE variable-name value
74 Defines the named variable to the given value. This is equivalent to specifying
75 "-d variable-name=value" on the \fIipptool\fR command-line.
77 DEFINE-DEFAULT variable-name value
78 Defines the named variable to the given value if it does not already have a
84 Specifies whether, by default, \fIipptool\fR will ignore errors and continue with
90 Includes another test file. The first form includes a file relative to the
91 current test file, while the second form includes a file from the \fIipptool\fR
94 INCLUDE-IF-DEFINED name "filename"
96 INCLUDE-IF-DEFINED name <filename>
97 Includes another test file if the named variable is defined. The first form
98 includes a file relative to the current test file, while the second form
99 includes a file from the \fIipptool\fR include directory.
101 INCLUDE-IF-NOT-DEFINED name "filename"
103 INCLUDE-IF-NOT-DEFINED name <filename>
104 Includes another test file if the named variable is not defined. The first form
105 includes a file relative to the current test file, while the second form
106 includes a file from the \fIipptool\fR include directory.
108 SKIP-IF-DEFINED variable-name
110 SKIP-IF-NOT-DEFINED variable-name
111 Specifies that the remainder of the test file should be skipped when the
112 variable is or is not defined.
115 Specifies that tests will, by default, use "Transfer-Encoding: chunked" for
116 requests with attached files and "Content-Length:" for requests without attached
120 Specifies that tests will, by default, use the HTTP/1.1 "Transfer-Encoding:
121 chunked" header. This is the default and is equivalent to specifying "-c" on the
122 \fIipptool\fR command-line. Support for chunked requests is required for
123 conformance with all versions of IPP.
126 Specifies that tests will, by default, use the HTTP/1.0 "Content-Length:"
127 header. This is equivalent to specifying "-l" on the \fIipptool\fR command-line.
128 Support for content length requests is required for conformance with all
140 Specifies the default IPP version number to use for the tests that follow.
143 The following directives are understood in a test:
145 ATTR tag attribute-name value(s)
146 Adds an attribute to the test request. Values are separated by the comma (",")
147 character - escape commas using the "\" character.
149 ATTR collection attribute-name { MEMBER tag member-name value(s) ... } [ ... { ... } ]
150 Adds a collection attribute to the test request. Member attributes follow the
151 same syntax as regular attributes and can themselves be nested collections.
152 Multiple collection values can be supplied as needed.
160 Uses the specified compression on the document data following the attributes in
161 a Print-Job or Send-Document request.
164 Specifies a delay before this test will be run.
166 DISPLAY attribute-name
167 Specifies that value of the named attribute should be output as part of the
170 EXPECT attribute-name [ predicate(s) ]
172 EXPECT ?attribute-name predicate(s)
174 EXPECT !attribute-name
175 Specifies that the response must/may/must not include the named attribute.
176 Additional requirements can be added as predicates - see the "EXPECT PREDICATES"
177 section for more information on predicates.
180 Specifies a file to include at the end of the request. This is typically used
181 when sending a test print file.
184 Specifies the group tag for subsequent attributes in the request.
189 Specifies whether \fIipptool\fR will ignore errors and continue with subsequent
192 NAME "literal string"
193 Specifies the human-readable name of the test.
195 OPERATION operation-code
196 Specifies the operation to be performed.
201 Specifies the request-id value to use in the request, either an integer or the
202 word "random" to use a randomly generated value (the default).
205 Specifies an alternate resource path that is used for the HTTP POST request.
206 The default is the resource from the URI provided to the \fIipptool\fR program.
208 SKIP-IF-DEFINED variable-name
210 SKIP-IF-NOT-DEFINED variable-name
211 Specifies that the current test should be skipped when the variable is or is not
214 SKIP-PREVIOUS-ERROR yes
216 SKIP-PREVIOUS-ERROR no
217 Specifies whether \fIipptool\fR will skip the current test if the previous test
218 resulted in an error/failure.
220 STATUS status-code [ predicate ]
221 Specifies an expected response status-code value. Additional requirements can be
222 added as predicates - see the "STATUS PREDICATES" section for more information
226 Specifies that this test will use "Transfer-Encoding: chunked" if it has an
227 attached file or "Content-Length:" otherwise.
230 Specifies that this test will use the HTTP/1.1 "Transfer-Encoding: chunked"
234 Specifies that this test will use the HTTP/1.0 "Content-Length:" header.
245 Specifies the IPP version number to use for this test.
247 .SH EXPECT PREDICATES
248 The following predicates are understood following the EXPECT test directive:
251 Requires the EXPECT attribute to have the specified number of values.
253 DEFINE-MATCH variable-name
254 Defines the variable to "1" when the EXPECT condition matches. A side-effect of
255 this predicate is that this EXPECT will never fail a test.
257 DEFINE-NO-MATCH variable-name
258 Defines the variable to "1" when the EXPECT condition does not match. A side-
259 effect of this predicate is that this EXPECT will never fail a test.
261 DEFINE-VALUE variable-name
262 Defines the variable to the value of the attribute when the EXPECT condition
263 matches. A side-effect of this predicate is that this EXPECT will never fail a test.
265 IF-DEFINED variable-name
266 Makes the EXPECT conditions apply only if the specified variable is defined.
268 IF-NOT-DEFINED variable-name
269 Makes the EXPECT conditions apply only if the specified variable is not
273 Requires the EXPECT attribute to be in the specified group tag.
275 OF-TYPE tag[,tag,...]
276 Requires the EXPECT attribute to use the specified value tag(s).
280 Specifies the maximum number of times to repeat. The default value is 1000.
285 Specifies that the current test should be repeated when the EXPECT condition
286 matches or does not match.
288 SAME-COUNT-AS attribute-name
289 Requires the EXPECT attribute to have the same number of values as the specified
292 WITH-ALL-VALUES "literal string"
293 Requires that all values of the EXPECT attribute match the literal string. Comparisons are case-sensitive.
295 WITH-ALL-VALUES <number
297 WITH-ALL-VALUES =number
299 WITH-ALL-VALUES >number
301 WITH-ALL-VALUES number[,number,...]
302 Requires that all values of the EXPECT attribute match the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range.
304 WITH-ALL-VALUES "false"
306 WITH-ALL-VALUES "true"
307 Requires that all values of the EXPECT attribute match the boolean value given.
309 WITH-ALL-VALUES "/regular expression/"
310 Requires that all values of the EXPECT attribute match the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive.
312 WITH-VALUE "literal string"
313 Requires that at least one value of the EXPECT attribute matches the literal string. Comparisons are case-sensitive.
321 WITH-VALUE number[,number,...]
322 Requires that at least one value of the EXPECT attribute matches the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range.
327 Requires that at least one value of the EXPECT attribute matches the boolean value given.
329 WITH-VALUE "/regular expression/"
330 Requires that at least one value of the EXPECT attribute matches the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive.
332 .SH STATUS PREDICATES
333 The following predicates are understood following the STATUS test directive:
335 DEFINE-MATCH variable-name
336 Defines the variable to "1" when the STATUS matches. A side-effect of this predicate is that this STATUS will never fail a test.
338 DEFINE-NO-MATCH variable-name
339 Defines the variable to "1" when the STATUS does not match. A side-effect of this predicate is that this STATUS will never fail a test.
341 IF-DEFINED variable-name
342 Makes the STATUS apply only if the specified variable is defined.
344 IF-NOT-DEFINED variable-name
345 Makes the STATUS apply only if the specified variable is not defined.
349 Specifies the maximum number of times to repeat. The default value is 1000.
354 Specifies that the current test should be repeated when the response status-code
355 matches or does not match the value specified by the STATUS directive.
358 Operation codes correspond to the hexadecimal numbers (0xHHHH) and names from
359 RFC 2911 and other IPP extension specifications. Here is a complete list:
363 CUPS-Add-Modify-Class
364 CUPS-Add-Modify-Printer
365 CUPS-Authenticate-Job
385 Create-Job-Subscription
386 Create-Printer-Subscription
393 Get-Printer-Attributes
394 Get-Printer-Support-Files
395 Get-Printer-Supported-Values
396 Get-Subscription-Attributes
402 Pause-Printer-After-Current-Job
407 Release-Held-New-Jobs
421 Set-Printer-Attributes
430 Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC
431 2911 and other IPP extension specifications. Here is a complete list:
433 client-error-attributes-not-settable
434 client-error-attributes-or-values-not-supported
435 client-error-bad-request
436 client-error-charset-not-supported
437 client-error-compression-error
438 client-error-compression-not-supported
439 client-error-conflicting-attributes
440 client-error-document-access-error
441 client-error-document-format-error
442 client-error-document-format-not-supported
443 client-error-document-password-error
444 client-error-document-permission-error
445 client-error-document-security-error
446 client-error-document-unprintable-error
447 client-error-forbidden
449 client-error-ignored-all-notifications
450 client-error-ignored-all-subscriptions
451 client-error-not-authenticated
452 client-error-not-authorized
453 client-error-not-found
454 client-error-not-possible
455 client-error-print-support-file-not-found
456 client-error-request-entity-too-large
457 client-error-request-value-too-long
459 client-error-too-many-subscriptions
460 client-error-uri-scheme-not-supported
462 redirection-other-site
464 server-error-device-error
465 server-error-internal-error
466 server-error-job-canceled
467 server-error-multiple-document-jobs-not-supported
468 server-error-not-accepting-jobs
469 server-error-operation-not-supported
470 server-error-printer-is-deactivated
471 server-error-service-unavailable
472 server-error-temporary-error
473 server-error-version-not-supported
475 successful-ok-but-cancel-subscription
476 successful-ok-conflicting-attributes
477 successful-ok-events-complete
478 successful-ok-ignored-notifications
479 successful-ok-ignored-or-substituted-attributes
480 successful-ok-ignored-subscriptions
481 successful-ok-too-many-events
485 Value and group tags correspond to the names from RFC 2911 and other IPP
486 extension specifications. Here are the group tags:
488 event-notification-attributes-tag
490 operation-attributes-tag
491 printer-attributes-tag
492 subscription-attributes-tag
493 unsupported-attributes-tag
496 Here are the value tags:
526 The \fIipptool\fR program maintains a list of variables that can be used in any
527 literal string or attribute value by specifying "$variable-name". Aside from
528 variables defined using the "-d" option or "DEFINE" directive, the following
529 pre-defined variables are available:
532 Inserts a single "$" character.
535 Inserts the value of the named environment variable, or an empty string if the
536 environment variable is not defined.
539 Inserts the filename provided to \fIipptool\fR with the "-f" option.
542 Inserts the hostname from the URI provided to \fIipptool\fR.
545 Inserts the last job-id value returned in a test response or 0 if no job-id has
549 Inserts the last job-uri value returned in a test response or an empty string if
550 no job-uri has been seen.
553 Inserts the scheme from the URI provided to \fIipptool\fR.
555 $notify-subscription-id
556 Inserts the last notify-subscription-id value returned in a test response or 0 if
557 no notify-subscription-id has been seen.
560 Inserts the port number from the URI provided to \fIipptool\fR.
563 Inserts the resource path from the URI provided to \fIipptool\fR.
566 Inserts the URI provided to \fIipptool\fR.
569 Inserts the current user's login name.
572 Inserts the username from the URI provided to \fIipptool\fR, if any.
577 http://localhost:631/help
580 Copyright 2007-2013 by Apple Inc.