]> git.ipfire.org Git - thirdparty/cups.git/blame - man/ipptoolfile.man
Add header validation option to ipptool.
[thirdparty/cups.git] / man / ipptoolfile.man
CommitLineData
f8b3a85b 1.\"
f1dd3a39 2.\" ipptoolfile man page.
f8b3a85b 3.\"
f1dd3a39 4.\" Copyright 2010-2017 by Apple Inc.
f8b3a85b 5.\"
3a43047f
MS
6.\" These coded instructions, statements, and computer programs are the
7.\" property of Apple Inc. and are protected by Federal copyright
8.\" law. Distribution and use rights are outlined in the file "LICENSE.txt"
9.\" which should have been included with this file. If this file is
10.\" file is missing or damaged, see the license at "http://www.cups.org/".
f8b3a85b 11.\"
2a75f21b 12.TH ipptoolfile 5 "CUPS" "15 June 2017" "Apple Inc."
f8b3a85b 13.SH NAME
aaf19ab0 14ipptoolfile \- ipptool file format
f8b3a85b 15.SH DESCRIPTION
6b13fa61
MS
16The
17.BR ipptool (1)
f1dd3a39
MS
18program accepts free-form plain text files that describe one or more IPP requests.
19Comments start with the "#" character and continue to the end of the line.
20Each request is enclosed by curly braces, for example:
f8b3a85b
MS
21.nf
22
23 # This is a comment
24 {
25 # The name of the test
f1dd3a39 26 NAME "Print PDF File"
f8b3a85b
MS
27
28 # The request to send
6b13fa61 29 OPERATION Print\-Job
f1dd3a39 30
6b13fa61
MS
31 GROUP operation\-attributes\-tag
32 ATTR charset attributes\-charset utf\-8
33 ATTR language attributes\-natural\-language en
34 ATTR uri printer\-uri $uri
35 ATTR name requesting\-user\-name $user
f1dd3a39
MS
36 ATTR mimeMediaType document\-format application/pdf
37
38 GROUP job\-attributes\-tag
39 ATTR collection media\-col {
40 # US Letter plain paper from the "main" tray
41 MEMBER collection media\-size {
42 MEMBER integer x\-dimension 21590
43 MEMBER integer y\-dimension 27940
44 }
45 MEMBER integer media\-top\-margin 423
46 MEMBER integer media\-bottom\-margin 423
47 MEMBER integer media\-left\-margin 423
48 MEMBER integer media\-right\-margin 423
49 MEMBER keyword media\-source "main"
50 MEMBER keyword media\-type "stationery"
51 }
52
53 FILE testfile.pdf
f8b3a85b
MS
54
55 # The response to expect
6b13fa61
MS
56 STATUS successful\-ok
57 EXPECT job\-id OF\-TYPE integer WITH\-VALUE >0
58 EXPECT job\-uri OF\-TYPE uri
f8b3a85b
MS
59 }
60 {
61 # The name of the test
f1dd3a39 62 NAME "Wait for Job to Complete"
f8b3a85b
MS
63
64 # The request to send
6b13fa61 65 OPERATION Get\-Job\-Attributes
f1dd3a39 66
6b13fa61
MS
67 GROUP operation\-attributes\-tag
68 ATTR charset attributes\-charset utf\-8
69 ATTR language attributes\-natural\-language en
70 ATTR uri printer\-uri $uri
71 ATTR integer job\-id $job\-id
72 ATTR name requesting\-user\-name $user
f8b3a85b
MS
73
74 # The response to expect
6b13fa61
MS
75 STATUS successful\-ok
76 EXPECT job\-id OF\-TYPE integer WITH\-VALUE $job\-id
77 EXPECT job\-uri OF\-TYPE uri
f1dd3a39 78 EXPECT job\-state OF\-TYPE enum WITH\-VALUE >5 REPEAT\-NO\-MATCH
6b13fa61 79 EXPECT job\-originating\-user\-name OF\-TYPE name WITH\-VALUE "$user"
f1dd3a39
MS
80
81 # Show the job state until completed...
82 DISPLAY job-state
83 DISPLAY job-state-reasons
f8b3a85b
MS
84 }
85.fi
6b13fa61
MS
86.SS TOP-LEVEL DIRECTIVES
87The following directives can be used outside of a \fItest\fR:
f8b3a85b 88.TP 5
6b13fa61 89\fB{ \fItest \fB}\fR
f8b3a85b
MS
90Defines a test.
91.TP 5
6b13fa61
MS
92\fBDEFINE \fIvariable-name value\fR
93Defines the named variable to the given value. This is equivalent to specifying \fI\-d variable-name=value\fR on the
94.BR ipptool (8)
95command-line.
f8b3a85b 96.TP 5
6b13fa61
MS
97\fBDEFINE\-DEFAULT \fIvariable-name value\fR
98Defines the named variable to the given value if it does not already have a value.
321d8d57 99.TP 5
6b13fa61 100\fBFILE\-ID "\fIidentifier\fB"\fR
1d47b929
MS
101Specifies an identifier string for the current file.
102.TP 5
6b13fa61 103\fBIGNORE\-ERRORS yes\fR
030ae6a1 104.TP 5
6b13fa61
MS
105\fBIGNORE\-ERRORS no\fR
106Specifies whether, by default,
107.BR ipptool (8)
108will ignore errors and continue with subsequent tests.
030ae6a1 109.TP 5
6b13fa61 110\fBINCLUDE "\fIfilename\fB"\fR
f8b3a85b 111.TP 5
6b13fa61
MS
112\fBINCLUDE <\fIfilename\fB>\fR
113Includes another test file. The first form includes a file relative to the current test file, while the second form includes a file from the
114.BR ipptool (8)
f8b3a85b
MS
115include directory.
116.TP 5
6b13fa61 117\fBINCLUDE\-IF\-DEFINED \fIname \fB"\fIfilename\fB"\fR
321d8d57 118.TP 5
6b13fa61
MS
119\fBINCLUDE\-IF\-DEFINED \fIname \fB<\fIfilename\fB>\fR
120Includes another test file if the named variable is defined. The first form includes a file relative to the current test file, while the second form includes a file from the
121.BR ipptool (8)
122include directory.
321d8d57 123.TP 5
6b13fa61 124\fBINCLUDE\-IF\-NOT\-DEFINED \fIname \fB"\fIfilename\fB"\fR
321d8d57 125.TP 5
6b13fa61
MS
126\fBINCLUDE\-IF\-NOT\-DEFINED \fIname \fB<\fIfilename\fB>\fR
127Includes another test file if the named variable is not defined. The first form includes a file relative to the current test file, while the second form includes a file from the
128.BR ipptool (8)
129include directory.
321d8d57 130.TP 5
6b13fa61 131\fBSKIP\-IF\-DEFINED \fIvariable-name\fR
030ae6a1 132.TP 5
6b13fa61
MS
133\fBSKIP\-IF\-NOT\-DEFINED \fIvariable-name\fR
134Specifies that the remainder of the test file should be skipped when the variable is or is not defined.
030ae6a1 135.TP 5
6b13fa61 136\fBSTOP\-AFTER\-INCLUDE\-ERROR no\fR
9475ec92 137.TP 5
6b13fa61 138\fBSTOP\-AFTER\-INCLUDE\-ERROR yes\fR
9475ec92
MS
139Specifies whether tests will be stopped after an error in an included file.
140.TP 5
6b13fa61
MS
141\fBTRANSFER auto\fR
142Specifies that tests will, by default, use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files.
f8b3a85b 143.TP 5
6b13fa61
MS
144\fBTRANSFER chunked\fR
145Specifies that tests will, by default, use the HTTP/1.1 "Transfer-Encoding: chunked" header. This is the default and is equivalent to specifying \fI\-c\fR on the
146.BR ipptool (8)
147command-line. Support for chunked requests is required for conformance with all versions of IPP.
f8b3a85b 148.TP 5
6b13fa61
MS
149\fBTRANSFER length\fR
150Specifies that tests will, by default, use the HTTP/1.0 "Content-Length:" header. This is equivalent to specifying \fI\-l\fR on the
151.BR ipptool (8)
152command-line. Support for content length requests is required for conformance with all versions of IPP.
f8b3a85b 153.TP 5
6b13fa61 154\fBVERSION 1.0\fR
f8b3a85b 155.TP 5
6b13fa61 156\fBVERSION 1.1\fR
f8b3a85b 157.TP 5
6b13fa61 158\fBVERSION 2.0\fR
f8b3a85b 159.TP 5
6b13fa61 160\fBVERSION 2.1\fR
f8b3a85b 161.TP 5
6b13fa61 162\fBVERSION 2.2\fR
f8b3a85b 163Specifies the default IPP version number to use for the tests that follow.
6b13fa61
MS
164.SS TEST DIRECTIVES
165The following directives are understood within a \fItest\fR:
f8b3a85b 166.TP 5
2a75f21b
MS
167\fBATTR \fIout-of-band-tag attribute-name\fR
168.TP 5
6b13fa61 169\fBATTR \fItag attribute-name value(s)\fR
f1dd3a39 170Adds an attribute to the test request.
2a75f21b
MS
171Out-of-band tags (admin-define, delete-attribute, no-value, not-settable, unknown, unsupported) have no value.
172Values for other tags are separated by the comma (",") character - escape commas using the "\" character.
f1dd3a39 173Common attributes and values are listed in the IANA IPP registry - see references below.
f8b3a85b 174.TP 5
6b13fa61 175\fBATTR collection \fIattribute-name \fB{ MEMBER \fItag member-name value(s) ... \fB}\fR [ \fI... \fB,{ \fI... \fB} \fR]
f1dd3a39
MS
176Adds a collection attribute to the test request.
177Member attributes follow the same syntax as regular attributes and can themselves be nested collections.
178Multiple collection values can be supplied as needed, separated by commas.
f8b3a85b 179.TP 5
6b13fa61 180\fBCOMPRESSION deflate\fR
c41769ff 181.TP 5
6b13fa61 182\fBCOMPRESSION gzip\fR
c41769ff 183.TP 5
6b13fa61
MS
184\fBCOMPRESSION none\fR
185Uses the specified compression on the document data following the attributes in a Print-Job or Send-Document request.
c41769ff 186.TP 5
f1dd3a39
MS
187\fBDELAY \fIseconds\fR[\fI,repeat-seconds\fR]
188Specifies a delay in seconds before this test will be run.
189If two values are specified, the second value is used as the delay between repeated tests.
f8b3a85b 190.TP 5
6b13fa61 191\fBDISPLAY \fIattribute-name\fR
f8b3a85b
MS
192Specifies that value of the named attribute should be output as part of the
193test report.
194.TP 5
6b13fa61 195\fBEXPECT \fIattribute-name \fR[ \fIpredicate(s) \fR]
f8b3a85b 196.TP 5
6b13fa61 197\fBEXPECT ?\fIattribute-name predicate(s)\fR
f8b3a85b 198.TP 5
6b13fa61
MS
199\fBEXPECT !\fIattribute-name\fR
200Specifies that the response must/may/must not include the named attribute. Additional requirements can be added as predicates - see the "EXPECT PREDICATES" section for more information on predicates. Attribute names can specify member attributes by separating the attribute and member names with the forward slash, for example "media\-col/media\-size/x\-dimension".
f8b3a85b 201.TP 5
e83646d5
MS
202\fBEXPECT-ALL \fIattribute-name \fR[ \fIpredicate(s) \fR]
203.TP 5
204\fBEXPECT-ALL ?\fIattribute-name predicate(s)\fR
205Specifies that the response must/may include the named attribute and that all occurrences of that attribute must match the given predicates.
206.TP 5
6b13fa61
MS
207\fBFILE filename\fR
208Specifies a file to include at the end of the request. This is typically used when sending a test print file.
f8b3a85b 209.TP 5
6b13fa61 210\fBGROUP tag\fR
f8b3a85b
MS
211Specifies the group tag for subsequent attributes in the request.
212.TP 5
6b13fa61 213\fBIGNORE\-ERRORS yes\fR
030ae6a1 214.TP 5
6b13fa61
MS
215\fBIGNORE\-ERRORS no\fR
216Specifies whether
217.BR ipptool (8)
218will ignore errors and continue with subsequent tests.
030ae6a1 219.TP 5
6b13fa61 220\fBNAME "\fIliteral string\fB"\fR
f8b3a85b
MS
221Specifies the human-readable name of the test.
222.TP 5
6b13fa61 223\fBOPERATION \fIoperation-code\fR
f8b3a85b
MS
224Specifies the operation to be performed.
225.TP 5
9fcdd250
MS
226\fBPAUSE "\fImessage\fB"\fR
227Displays the provided message and waits for the user to press a key to continue.
228.TP 5
6b13fa61 229\fBREQUEST\-ID \fInumber\fR\fR
f8b3a85b 230.TP 5
6b13fa61
MS
231\fBREQUEST\-ID random\fR
232Specifies the request-id value to use in the request, either an integer or the word "random" to use a randomly generated value (the default).
f8b3a85b 233.TP 5
6b13fa61
MS
234\fBRESOURCE \fIpath\fR
235Specifies an alternate resource path that is used for the HTTP POST request. The default is the resource from the URI provided to the
236.BR ipptool (8)
237program.
f8b3a85b 238.TP 5
6b13fa61 239\fBSKIP\-IF\-DEFINED \fIvariable-name\fR
030ae6a1 240.TP 5
6b13fa61
MS
241\fBSKIP\-IF\-NOT\-DEFINED \fIvariable-name\fR
242Specifies that the current test should be skipped when the variable is or is not defined.
030ae6a1 243.TP 5
6b13fa61 244\fBSKIP\-PREVIOUS\-ERROR yes\fR
030ae6a1 245.TP 5
6b13fa61
MS
246\fBSKIP\-PREVIOUS\-ERROR no\fR
247Specifies whether
248.BR ipptool (8)
249will skip the current test if the previous test resulted in an error/failure.
030ae6a1 250.TP 5
6b13fa61
MS
251\fBSTATUS \fIstatus-code \fR[ \fIpredicate\fR ]
252Specifies an expected response status-code value. Additional requirements can be added as predicates - see the "STATUS PREDICATES" section for more information on predicates.
f8b3a85b 253.TP 5
6b13fa61 254\fBTEST\-ID "\fIidentifier\fR"
1d47b929
MS
255Specifies an identifier string for the current test.
256.TP 5
6b13fa61
MS
257\fBTRANSFER auto\fR
258Specifies that this test will use "Transfer-Encoding: chunked" if it has an attached file or "Content-Length:" otherwise.
f8b3a85b 259.TP 5
6b13fa61
MS
260\fBTRANSFER chunked\fR
261Specifies that this test will use the HTTP/1.1 "Transfer-Encoding: chunked" header.
f8b3a85b 262.TP 5
6b13fa61 263\fBTRANSFER length\fR
f8b3a85b
MS
264Specifies that this test will use the HTTP/1.0 "Content-Length:" header.
265.TP 5
6b13fa61 266\fBVERSION 1.0\fR
f8b3a85b 267.TP 5
6b13fa61 268\fBVERSION 1.1\fR
f8b3a85b 269.TP 5
6b13fa61 270\fBVERSION 2.0\fR
f8b3a85b 271.TP 5
6b13fa61 272\fBVERSION 2.1\fR
f8b3a85b 273.TP 5
6b13fa61 274\fBVERSION 2.2\fR
f8b3a85b 275Specifies the IPP version number to use for this test.
6b13fa61
MS
276.SS EXPECT PREDICATES
277The following predicates are understood following the \fBEXPECT\fR test directive:
f8b3a85b 278.TP 5
6b13fa61
MS
279\fBCOUNT \fInumber\fR
280Requires the \fBEXPECT\fR attribute to have the specified number of values.
f8b3a85b 281.TP 5
6b13fa61
MS
282\fBDEFINE\-MATCH \fIvariable-name\fR
283Defines the variable to "1" when the \fBEXPECT\fR condition matches. A side-effect of this predicate is that this \fBEXPECT\fR will never fail a test.
030ae6a1 284.TP 5
6b13fa61
MS
285\fBDEFINE\-NO\-MATCH \fIvariable-name\fR
286Defines the variable to "1" when the \fBEXPECT\fR condition does not match. A side-effect of this predicate is that this \fBEXPECT\fR will never fail a test.
030ae6a1 287.TP 5
6b13fa61
MS
288\fBDEFINE\-VALUE \fIvariable-name\fR
289Defines the variable to the value of the attribute when the \fBEXPECT\fR condition matches. A side-effect of this predicate is that this \fBEXPECT\fR will never fail a test.
030ae6a1 290.TP 5
6b13fa61
MS
291\fBIF\-DEFINED \fIvariable-name\fR
292Makes the \fBEXPECT\fR conditions apply only if the specified variable is defined.
f8b3a85b 293.TP 5
6b13fa61
MS
294\fBIF\-NOT\-DEFINED \fIvariable-name\fR
295Makes the \fBEXPECT\fR conditions apply only if the specified variable is not defined.
f8b3a85b 296.TP 5
6b13fa61
MS
297\fBIN\-GROUP \fItag\fR
298Requires the \fBEXPECT\fR attribute to be in the specified group tag.
f8b3a85b 299.TP 5
6b13fa61
MS
300\fBOF\-TYPE \fItag[,tag,...]\fR
301Requires the \fBEXPECT\fR attribute to use one of the specified value tag(s).
f8b3a85b 302.TP 5
6b13fa61 303\fBREPEAT\-LIMIT \fInumber\fR
a29fd7dd 304.br
6b13fa61 305Specifies the maximum number of times to repeat if the \fBREPEAT-MATCH\fR or \fBREPEAT-NO-MATCH\fR predicate is specified. The default value is 1000.
a29fd7dd 306.TP 5
6b13fa61 307\fBREPEAT\-MATCH\fR
83e08001 308.TP 5
6b13fa61
MS
309\fBREPEAT\-NO\-MATCH\fR
310Specifies that the current test should be repeated when the \fBEXPECT\fR condition matches or does not match.
83e08001 311.TP 5
6b13fa61
MS
312\fBSAME\-COUNT\-AS \fIattribute-name\fR
313Requires the \fBEXPECT\fR attribute to have the same number of values as the specified parallel attribute.
f8b3a85b 314.TP 5
6b13fa61 315\fBWITH\-ALL\-HOSTNAMES "\fIliteral string\fB"\fR
890a10b7 316.TP 5
6b13fa61 317\fBWITH\-ALL\-HOSTNAMES "/\fIregular expression\fB/"\fR
890a10b7
MS
318Requires that all URI values contain a matching hostname.
319.TP 5
6b13fa61 320\fBWITH\-ALL\-RESOURCES "\fIliteral string\fB"\fR
890a10b7 321.TP 5
6b13fa61 322\fBWITH\-ALL\-RESOURCES "/\fIregular expression\fB/"\fR
890a10b7
MS
323Requires that all URI values contain a matching resource (including leading /).
324.TP 5
6b13fa61 325\fBWITH\-ALL\-SCHEMES "\fIliteral string\fB"\fR
890a10b7 326.TP 5
6b13fa61 327\fBWITH\-ALL-SCHEMES "/\fIregular expression\fB/"\fR
890a10b7
MS
328Requires that all URI values contain a matching scheme.
329.TP 5
6b13fa61
MS
330\fBWITH\-ALL\-VALUES "\fIliteral string\fB"\fR
331Requires that all values of the \fBEXPECT\fR attribute match the literal string. Comparisons are case-sensitive.
82cc1f9a 332.TP 5
6b13fa61 333\fBWITH\-ALL\-VALUES <\fInumber\fR
82cc1f9a 334.TP 5
6b13fa61 335\fBWITH\-ALL\-VALUES =\fInumber\fR
82cc1f9a 336.TP 5
6b13fa61 337\fBWITH\-ALL\-VALUES >\fInumber\fR
82cc1f9a 338.TP 5
6b13fa61
MS
339\fBWITH\-ALL\-VALUES \fInumber\fR[\fI,...,number\fR]
340Requires that all values of the \fBEXPECT\fR attribute match the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range.
82cc1f9a 341.TP 5
6b13fa61 342\fBWITH\-ALL\-VALUES "false"\fR
82cc1f9a 343.TP 5
6b13fa61
MS
344\fBWITH\-ALL\-VALUES "true"\fR
345Requires that all values of the \fBEXPECT\fR attribute match the boolean value given.
82cc1f9a 346.TP 5
6b13fa61
MS
347\fBWITH\-ALL\-VALUES "/\fIregular expression\fB/"\fR
348Requires that all values of the \fBEXPECT\fR attribute match the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive.
82cc1f9a 349.TP 5
6b13fa61 350\fBWITH\-HOSTNAME "\fIliteral string\fB"\fR
890a10b7 351.TP 5
6b13fa61 352\fBWITH\-HOSTNAME "/\fIregular expression\fB/"\fR
890a10b7
MS
353Requires that at least one URI value contains a matching hostname.
354.TP 5
6b13fa61 355\fBWITH\-RESOURCE "\fIliteral string\fB"\fR
890a10b7 356.TP 5
6b13fa61 357\fBWITH\-RESOURCE "/\fIregular expression\fB/"\fR
890a10b7
MS
358Requires that at least one URI value contains a matching resource (including leading /).
359.TP 5
6b13fa61 360\fBWITH\-SCHEME "\fIliteral string\fB"\fR
890a10b7 361.TP 5
6b13fa61 362\fBWITH\-SCHEME "/\fIregular expression\fB/"\fR
890a10b7
MS
363Requires that at least one URI value contains a matching scheme.
364.TP 5
6b13fa61
MS
365\fBWITH\-VALUE "\fIliteral string\fB"\fR
366Requires that at least one value of the \fBEXPECT\fR attribute matches the literal string. Comparisons are case-sensitive.
82cc1f9a 367.TP 5
6b13fa61 368\fBWITH\-VALUE <\fInumber\fR
82cc1f9a 369.TP 5
6b13fa61 370\fBWITH\-VALUE =\fInumber\fR
82cc1f9a 371.TP 5
6b13fa61 372\fBWITH\-VALUE >\fInumber\fR
82cc1f9a 373.TP 5
6b13fa61
MS
374\fBWITH\-VALUE \fInumber\fR[\fI,...,number\fR]
375Requires that at least one value of the \fBEXPECT\fR attribute matches the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range.
82cc1f9a 376.TP 5
6b13fa61 377\fBWITH\-VALUE "false"\fR
82cc1f9a 378.TP 5
6b13fa61
MS
379\fBWITH\-VALUE "true"\fR
380Requires that at least one value of the \fBEXPECT\fR attribute matches the boolean value given.
f8b3a85b 381.TP 5
6b13fa61
MS
382\fBWITH\-VALUE "/\fIregular expression\fB/"\fR
383Requires that at least one value of the \fBEXPECT\fR attribute matches the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive.
a21c36fa
MS
384.TP 5
385\fBWITH\-VALUE\-FROM \fIattribute-name\fR
386Requires that the value(s) of the \fBEXPECT\fR attribute matches the value(s) in the specified attribute.
387For example, "EXPECT job\-sheets WITH\-VALUE\-FROM job\-sheets\-supported" requires that the "job\-sheets" value is listed as a value of the "job\-sheets\-supported" attribute.
6b13fa61
MS
388.SS STATUS PREDICATES
389The following predicates are understood following the \fBSTATUS\fR test directive:
f8b3a85b 390.TP 5
6b13fa61
MS
391\fBDEFINE\-MATCH \fIvariable-name\fR
392Defines the variable to "1" when the \fBSTATUS\fR matches. A side-effect of this predicate is that this \fBSTATUS\fR will never fail a test.
0fa6c7fa 393.TP 5
6b13fa61
MS
394\fBDEFINE\-NO\-MATCH \fIvariable-name\fR
395Defines the variable to "1" when the \fBSTATUS\fR does not match. A side-effect of this predicate is that this \fBSTATUS\fR will never fail a test.
0fa6c7fa 396.TP 5
6b13fa61
MS
397\fBIF\-DEFINED \fIvariable-name\fR
398Makes the \fBSTATUS\fR apply only if the specified variable is defined.
f8b3a85b 399.TP 5
6b13fa61
MS
400\fBIF\-NOT\-DEFINED \fIvariable-name\fR
401Makes the \fBSTATUS\fR apply only if the specified variable is not defined.
83e08001 402.TP 5
6b13fa61 403\fBREPEAT\-LIMIT \fInumber\fR
a29fd7dd
MS
404.br
405Specifies the maximum number of times to repeat. The default value is 1000.
406.TP 5
6b13fa61 407\fBREPEAT\-MATCH\fR
83e08001 408.TP 5
6b13fa61
MS
409\fBREPEAT\-NO\-MATCH\fR
410Specifies that the current test should be repeated when the response status-code matches or does not match the value specified by the STATUS directive.
411.SS OPERATION CODES
2a75f21b 412Operation codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 8011 and other IPP extension specifications. Here is a complete list of names supported by
6b13fa61 413.BR ipptool (8):
f8b3a85b 414.nf
f8b3a85b 415
6b13fa61
MS
416 Activate\-Printer
417 CUPS\-Accept\-Jobs
418 CUPS\-Add\-Modify\-Class
419 CUPS\-Add\-Modify\-Printer
420 CUPS\-Authenticate\-Job
421 CUPS\-Delete\-Class
422 CUPS\-Delete\-Printer
423 CUPS\-Get\-Classes
424 CUPS\-Get\-Default
425 CUPS\-Get\-Devices
426 CUPS\-Get\-Document
427 CUPS\-Get\-PPD
428 CUPS\-Get\-PPDs
429 CUPS\-Get\-Printers
430 CUPS\-Move\-Job
431 CUPS\-Reject\-Jobs
432 CUPS\-Set\-Default
433 Cancel\-Current\-Job
434 Cancel\-Job
435 Cancel\-Jobs
436 Cancel\-My\-Jobs
437 Cancel\-Subscription
438 Close\-Job
439 Create\-Job
440 Create\-Job\-Subscriptions
441 Create\-Printer\-Subscriptions
442 Deactivate\-Printer
443 Disable\-Printer
444 Enable\-Printer
445 Get\-Job\-Attributes
446 Get\-Jobs
447 Get\-Notifications
448 Get\-Printer\-Attributes
449 Get\-Printer\-Support\-Files
450 Get\-Printer\-Supported\-Values
451 Get\-Subscription\-Attributes
452 Get\-Subscriptions
453 Hold\-Job
454 Hold\-New\-Jobs
455 Identify\-Printer
456 Pause\-Printer
457 Pause\-Printer\-After\-Current\-Job
458 Print\-Job
459 Print\-URI
460 Promote\-Job
461 Purge\-Jobs
462 Release\-Held\-New\-Jobs
463 Release\-Job
464 Renew\-Subscription
465 Reprocess\-Job
466 Restart\-Job
467 Restart\-Printer
468 Resubmit\-Job
469 Resume\-Job
470 Resume\-Printer
471 Schedule\-Job\-After
472 Send\-Document
473 Send\-Hardcopy\-Document
474 Send\-Notifications
475 Send\-URI
476 Set\-Job\-Attributes
477 Set\-Printer\-Attributes
478 Shutdown\-Printer
479 Startup\-Printer
480 Suspend\-Current\-Job
481 Validate\-Document
482 Validate\-Job
f8b3a85b 483.fi
6b13fa61 484.SS STATUS CODES
2a75f21b 485Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 8011 and other IPP extension specifications. Here is a complete list of the names supported by
6b13fa61
MS
486.BR ipptool (8):
487.nf
f8b3a85b 488
6b13fa61
MS
489 client\-error\-account\-authorization\-failed
490 client\-error\-account\-closed
491 client\-error\-account\-info\-needed
492 client\-error\-account\-limit\-reached
493 client\-error\-attributes\-not\-settable
494 client\-error\-attributes\-or\-values\-not\-supported
495 client\-error\-bad\-request
496 client\-error\-charset\-not\-supported
497 client\-error\-compression\-error
498 client\-error\-compression\-not\-supported
499 client\-error\-conflicting\-attributes
500 client\-error\-document\-access\-error
501 client\-error\-document\-format\-error
502 client\-error\-document\-format\-not\-supported
503 client\-error\-document\-password\-error
504 client\-error\-document\-permission\-error
505 client\-error\-document\-security\-error
506 client\-error\-document\-unprintable\-error
507 client\-error\-forbidden
508 client\-error\-gone
509 client\-error\-ignored\-all\-notifications
510 client\-error\-ignored\-all\-subscriptions
511 client\-error\-not\-authenticated
512 client\-error\-not\-authorized
513 client\-error\-not\-found
514 client\-error\-not\-possible
515 client\-error\-print\-support\-file\-not\-found
516 client\-error\-request\-entity\-too\-large
517 client\-error\-request\-value\-too\-long
518 client\-error\-timeout
519 client\-error\-too\-many\-subscriptions
520 client\-error\-uri\-scheme\-not\-supported
521 cups\-error\-account\-authorization\-failed
522 cups\-error\-account\-closed
523 cups\-error\-account\-info\-needed
524 cups\-error\-account\-limit\-reached
525 cups\-see\-other
526 redirection\-other\-site
527 server\-error\-busy
528 server\-error\-device\-error
529 server\-error\-internal\-error
530 server\-error\-job\-canceled
531 server\-error\-multiple\-document\-jobs\-not\-supported
532 server\-error\-not\-accepting\-jobs
533 server\-error\-operation\-not\-supported
534 server\-error\-printer\-is\-deactivated
535 server\-error\-service\-unavailable
536 server\-error\-temporary\-error
537 server\-error\-version\-not\-supported
538 successful\-ok
539 successful\-ok\-but\-cancel\-subscription
540 successful\-ok\-conflicting\-attributes
541 successful\-ok\-events\-complete
542 successful\-ok\-ignored\-notifications
543 successful\-ok\-ignored\-or\-substituted\-attributes
544 successful\-ok\-ignored\-subscriptions
545 successful\-ok\-too\-many\-events
546.fi
547.SS TAGS
2a75f21b 548Value and group tags correspond to the names from RFC 8011 and other IPP extension specifications. Here are the group tags:
f8b3a85b 549.nf
6b13fa61
MS
550
551 document\-attributes\-tag
552 event\-notification\-attributes\-tag
553 job\-attributes\-tag
554 operation\-attributes\-tag
555 printer\-attributes\-tag
556 subscription\-attributes\-tag
557 unsupported\-attributes\-tag
f8b3a85b
MS
558.fi
559.LP
560Here are the value tags:
561.nf
6b13fa61
MS
562
563 admin\-define
f8b3a85b
MS
564 boolean
565 charset
566 collection
567 dateTime
568 default
6b13fa61 569 delete\-attribute
f8b3a85b
MS
570 enum
571 integer
572 keyword
573 mimeMediaType
574 nameWithLanguage
575 nameWithoutLanguage
576 naturalLanguage
6b13fa61
MS
577 no\-value
578 not\-settable
f8b3a85b
MS
579 octetString
580 rangeOfInteger
581 resolution
582 textWithLanguage
583 textWithoutLanguage
584 unknown
585 unsupported
586 uri
587 uriScheme
588.fi
6b13fa61
MS
589.SS VARIABLES
590The
591.BR ipptool (8)
592program maintains a list of variables that can be used in any literal string or attribute value by specifying "\fI$variable-name\fR". Aside from variables defined using the \fI-d\fR option or \fBDEFINE\fR directive, the following pre-defined variables are available:
f8b3a85b 593.TP 5
6b13fa61 594\fB$$\fR
f8b3a85b
MS
595Inserts a single "$" character.
596.TP 5
6b13fa61
MS
597\fB$ENV[\fIname\fB]\fR
598Inserts the value of the named environment variable, or an empty string if the environment variable is not defined.
f8b3a85b 599.TP 5
6b13fa61
MS
600\fB$filename\fR
601Inserts the filename provided to
602.BR ipptool (8)
603with the \fI-f\fR option.
f8b3a85b 604.TP 5
6b13fa61
MS
605\fB$filetype\fR
606Inserts the MIME media type for the filename provided to
607.BR ipptool (8)
608with the \fI-f\fR option.
f8b3a85b 609.TP 5
6b13fa61
MS
610\fB$hostname\fR
611Inserts the hostname from the URI provided to
612.BR ipptool (8).
f8b3a85b 613.TP 5
6b13fa61
MS
614\fB$job\-id\fR
615Inserts the last "job\-id" attribute value returned in a test response or 0 if no "job\-id" attribute has been seen.
f8b3a85b 616.TP 5
6b13fa61
MS
617\fB$job\-uri\fR
618Inserts the last "job\-uri" attribute value returned in a test response or an empty string if no "job\-uri" attribute has been seen.
f8b3a85b 619.TP 5
6b13fa61
MS
620\fB$notify\-subscription\-id\fR
621Inserts the last "notify\-subscription\-id" attribute value returned in a test response or 0 if no "notify\-subscription\-id" attribute has been seen.
f8b3a85b 622.TP 5
6b13fa61
MS
623\fB$port\fR
624Inserts the port number from the URI provided to
625.BR ipptool (8).
f8b3a85b 626.TP 5
6b13fa61
MS
627\fB$resource\fR
628Inserts the resource path from the URI provided to
629.BR ipptool (8).
f8b3a85b 630.TP 5
6b13fa61
MS
631\fB$scheme\fR
632Inserts the scheme from the URI provided to
633.BR ipptool (8).
f8b3a85b 634.TP 5
6b13fa61
MS
635\fB$uri\fR
636Inserts the URI provided to
637.BR ipptool (8).
f8b3a85b 638.TP 5
6b13fa61
MS
639\fB$uriuser\fR
640Inserts the username from the URI provided to
641.BR ipptool (8),
642if any.
643.TP 5
644\fB$user\fR
645Inserts the current user's login name.
f8b3a85b 646.SH SEE ALSO
6b13fa61 647.BR ipptool (1),
6b13fa61
MS
648IANA IPP Registry (http://www.iana.org/assignments/ipp-registrations),
649PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp),
f1dd3a39 650RFC 8011 (http://tools.ietf.org/html/rfc8011)
f8b3a85b 651.SH COPYRIGHT
bd5a2f28 652Copyright \[co] 2007-2017 by Apple Inc.