]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/man-ippfind.html
32c53985d64f14ac44014ebec6b8bfdcbda4a65e
[thirdparty/cups.git] / doc / help / man-ippfind.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- SECTION: Man Pages -->
4 <head>
5 <link rel="stylesheet" type="text/css" href="../cups-printable.css">
6 <title>ippfind(1)</title>
7 </head>
8 <body>
9 <h1 class="title">ippfind(1)</h1>
10 <h2 class="title"><a name="NAME">Name</a></h2>
11 ippfind - find internet printing protocol printers
12 <h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
13 <b>ippfind
14 </b>[
15 <i>options
16 </i>] regtype[,subtype][.domain.] ... [
17 <i>expression ...
18 </i>]
19 <b>ippfind
20 </b>[
21 <i>options
22 </i>] name[.regtype[.domain.]] ... [
23 <i>expression ...
24 </i>]
25 <b>ippfind
26 </b>--help
27 <b>ippfind
28 </b>--version
29 <h2 class="title"><a name="SUPPORTED_REGISTRATION_TYPES">Supported Registration Types</a></h2>
30 <i>ippfind</i> supports the following registration types:
31 <dl>
32 <dt>_http._tcp
33 </dt>
34 <dd>HyperText Transport Protocol (HTTP, RFC 2616)
35 </dd>
36 <dt>_https._tcp
37 </dt>
38 <dd>Secure HyperText Transport Protocol (HTTPS, RFC 2818)
39 </dd>
40 <dt>_ipp._tcp
41 </dt>
42 <dd>Internet Printing Protocol (IPP, RFC 2911)
43 </dd>
44 <dt>_ipps._tcp
45 </dt>
46 <dd>Secure Internet Printing Protocol (IPPS, draft)
47 </dd>
48 <dt>_printer._tcp
49 </dt>
50 <dd>Line Printer Daemon (LPD, RFC 1179)
51
52 </dd>
53 </dl>
54 <h2 class="title"><a name="OPTIONS">Options</a></h2>
55 <dl>
56 <dt>--help
57 </dt>
58 <dd>Show program help
59 </dd>
60 <dt>--version
61 </dt>
62 <dd>Show program version
63 </dd>
64 <dt>-4
65 </dt>
66 <dd>Use IPv4 when listing
67 </dd>
68 <dt>-6
69 </dt>
70 <dd>Use IPv6 when listing
71 </dd>
72 <dt>-T seconds
73 </dt>
74 <dd>Specify find timeout in seconds. If 1 or less, <i>ippfind</i> stops as soon as it thinks it has found everything. The default is 1 second.
75 </dd>
76 <dt>-V version
77 </dt>
78 <dd>Specifies the IPP version when listing. Supported values are 1.1, 2.0, 2.1, and 2.2.
79
80 </dd>
81 </dl>
82 <h2 class="title"><a name="DESCRIPTION">Description</a></h2>
83 <i>ippfind</i> finds printer services registered with the local DNS infrastructure or available through the local links.
84
85 <h2 class="title"><a name="EXPRESSIONS">Expressions</a></h2>
86 <i>ippfind</i> supports expressions much like the <i>find(1)</i> utility. However, unlike <i>find</i>, <i>ippfind</i> uses POSIX regular expressions instead of shell filename matching patterns. If -e, --exec, -l, --ls, -p, --print, --print-name, -q, --quiet, or -s is not specified, <i>ippfind</i> adds --print to print the service URI of anything it finds. The following expressions are supported:
87 <dl>
88 <dt>-d regex
89 </dt>
90 <dd></dd>
91 <dt>--domain regex
92 </dt>
93 <dd>True if the domain matches the given regular expression.
94 </dd>
95 <dt>-e utility [argument ...] ;
96 </dt>
97 <dd></dd>
98 <dt>--exec utility [argument ...] ;
99 </dt>
100 <dd>Executes the specified program if the current result is true. "{foo}" arguments are replaced with the corresponding value - see SUBSTITUTIONS below.
101 </dd>
102 <dt>--false
103 </dt>
104 <dd>Always false.
105 </dd>
106 <dt>-l
107 </dt>
108 <dd></dd>
109 <dt>--ls
110 </dt>
111 <dd>Lists attributes returned by Get-Printer-Attributes for IPP printers and traditional <i>find</i> "-ls" output for HTTP URLs. The result is true if the URI is accessible, false otherwise.
112 </dd>
113 <dt>--local
114 </dt>
115 <dd>True if the service is local to this computer.
116 </dd>
117 <dt>-n regex
118 </dt>
119 <dd></dd>
120 <dt>--name regex
121 </dt>
122 <dd>True if the service instance name matches the given regular expression.
123 </dd>
124 <dt>--path regex
125 </dt>
126 <dd>True if the URI resource path matches the given regular expression.
127 </dd>
128 <dt>-p
129 </dt>
130 <dd></dd>
131 <dt>--print
132 </dt>
133 <dd>Prints the URI if the result of previous expressions is true. The result is always true.
134 </dd>
135 <dt>-q
136 </dt>
137 <dd></dd>
138 <dt>--quiet
139 </dt>
140 <dd>Quiet mode - just returns the exit codes below.
141 </dd>
142 <dt>-r
143 </dt>
144 <dd></dd>
145 <dt>--remote
146 </dt>
147 <dd>True if the service is not local to this computer.
148 </dd>
149 <dt>-s
150 </dt>
151 <dd></dd>
152 <dt>--print-name
153 </dt>
154 <dd>Prints the service instance name if the result of previous expressions is true. The result is always true.
155 </dd>
156 <dt>--true
157 </dt>
158 <dd>Always true.
159 </dd>
160 <dt>-t key
161 </dt>
162 <dd></dd>
163 <dt>--txt key
164 </dt>
165 <dd>True if the TXT record contains the named key.
166 </dd>
167 <dt>--txt-<i>key</i> regex
168 </dt>
169 <dd>True if the TXT record contains the named key and matches the given regular
170 expression.
171 </dd>
172 <dt>-u regex
173 </dt>
174 <dd></dd>
175 <dt>--uri regex
176 </dt>
177 <dd>True if the URI matches the given regular expression.
178 </dd>
179 </dl>
180 <p>Expressions may also contain modifiers:
181 <dl>
182 <dt>( expression )
183 </dt>
184 <dd>Group the result of expressions.
185 </dd>
186 <dt>! expression
187 </dt>
188 <dd></dd>
189 <dt>--not expression
190 </dt>
191 <dd>Unary NOT of the expression.
192 </dd>
193 <dt>expression expression
194 </dt>
195 <dd></dd>
196 <dt>expression --and expression
197 </dt>
198 <dd>Logical AND of expressions.
199 </dd>
200 <dt>expression --or expression
201 </dt>
202 <dd>Logical OR of expressions.
203
204 </dd>
205 </dl>
206 <h2 class="title"><a name="SUBSTITUTIONS">Substitutions</a></h2>
207 The substitutions for "{foo}" in -e and --exec are:
208 <dl>
209 <dt>{}
210 </dt>
211 <dd>URI
212 </dd>
213 <dt>{service_domain}
214 </dt>
215 <dd>Domain name, e.g., "example.com.", "local.", etc.
216 </dd>
217 <dt>{service_hostname}
218 </dt>
219 <dd>Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
220 </dd>
221 <dt>{service_name}
222 </dt>
223 <dd>Service instance name, e.g., "My Fine Printer".
224 </dd>
225 <dt>{service_port}
226 </dt>
227 <dd>Port number for server, typically 631 for IPP and 80 for HTTP.
228 </dd>
229 <dt>{service_regtype}
230 </dt>
231 <dd>DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
232 </dd>
233 <dt>{service_scheme}
234 </dt>
235 <dd>URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
236 </dd>
237 <dt>{service_uri}
238 </dt>
239 <dd>URI for service, e.g., "ipp://printer.local./ipp/print", "<a href='http://printer.local./",'>http://printer.local./",</a> etc.
240 </dd>
241 <dt>{txt_<i>key</i>}
242 </dt>
243 <dd>Value of TXT record <i>key</i> (lowercase).
244
245 </dd>
246 </dl>
247 <h2 class="title"><a name="ENVIRONMENT_VARIABLES">Environment Variables</a></h2>
248 When executing a program, <i>ippfind</i> sets the following environment variables for the matching service registration:
249 <dl>
250 <dt>IPPFIND_SERVICE_DOMAIN
251 </dt>
252 <dd>Domain name, e.g., "example.com.", "local.", etc.
253 </dd>
254 <dt>IPPFIND_SERVICE_HOSTNAME
255 </dt>
256 <dd>Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
257 </dd>
258 <dt>IPPFIND_SERVICE_NAME
259 </dt>
260 <dd>Service instance name, e.g., "My Fine Printer".
261 </dd>
262 <dt>IPPFIND_SERVICE_PORT
263 </dt>
264 <dd>Port number for server, typically 631 for IPP and 80 for HTTP.
265 </dd>
266 <dt>IPPFIND_SERVICE_REGTYPE
267 </dt>
268 <dd>DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
269 </dd>
270 <dt>IPPFIND_SERVICE_SCHEME
271 </dt>
272 <dd>URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
273 </dd>
274 <dt>IPPFIND_SERVICE_URI
275 </dt>
276 <dd>URI for service, e.g., "ipp://printer.local./ipp/print", "<a href='http://printer.local./",'>http://printer.local./",</a> etc.
277 </dd>
278 <dt>IPPFIND_TXT_<i>KEY</i>
279 </dt>
280 <dd>Values of TXT record <i>KEY</i> (uppercase).
281
282 </dd>
283 </dl>
284 <h2 class="title"><a name="EXIT_CODES">Exit Codes</a></h2>
285 <i>ippfind</i> returns 0 if the result for all processed expressions is true, 1 if the result of any processed expression is false, 2 if browsing or any query or resolution failed, 3 if an undefined option or invalid expression was specified, and 4 if it ran out of memory.
286
287 <h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
288 <a href='man-ipptool.html?TOPIC=Man+Pages'>ipptool(1)</a>
289
290 <h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
291 Copyright 2013 by Apple Inc.
292
293 </body>
294 </html>