]> git.ipfire.org Git - thirdparty/cups.git/blob - man/ippfind.man
ae67c3206da9ad0184e4f47da70e2a9e75a9904b
[thirdparty/cups.git] / man / ippfind.man
1 .\"
2 .\" "$Id$"
3 .\"
4 .\" ippfind man page for CUPS.
5 .\"
6 .\" Copyright 2013 by Apple Inc.
7 .\"
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/".
13 .\"
14 .TH ippfind 1 "CUPS" "5 June 2013" "Apple Inc."
15 .SH NAME
16 ippfind - find internet printing protocol printers
17 .SH SYNOPSIS
18 .B ippfind
19 [
20 .I options
21 ] regtype[,subtype][.domain.] ... [
22 .I expression ...
23 ]
24 .B ippfind
25 [
26 .I options
27 ] name[.regtype[.domain.]] ... [
28 .I expression ...
29 ]
30 .B ippfind
31 --help
32 .B ippfind
33 --version
34 .SH SUPPORTED REGISTRATION TYPES
35 \fIippfind\fR supports the following registration types:
36 .TP 5
37 _http._tcp
38 HyperText Transport Protocol (HTTP, RFC 2616)
39 .TP 5
40 _https._tcp
41 Secure HyperText Transport Protocol (HTTPS, RFC 2818)
42 .TP 5
43 _ipp._tcp
44 Internet Printing Protocol (IPP, RFC 2911)
45 .TP 5
46 _ipps._tcp
47 Secure Internet Printing Protocol (IPPS, draft)
48 .TP 5
49 _printer._tcp
50 Line Printer Daemon (LPD, RFC 1179)
51
52 .SH OPTIONS
53 .TP 5
54 --help
55 Show program help
56 .TP 5
57 --version
58 Show program version
59 .TP 5
60 -4
61 Use IPv4 when listing
62 .TP 5
63 -6
64 Use IPv6 when listing
65 .TP 5
66 -T seconds
67 Specify find timeout in seconds. If 1 or less, \fIippfind\fR stops as soon as it thinks it has found everything. The default is 1 second.
68 .TP 5
69 -V version
70 Specifies the IPP version when listing. Supported values are 1.1, 2.0, 2.1, and 2.2.
71
72 .SH DESCRIPTION
73 \fIippfind\fR finds printer services registered with the local DNS infrastructure or available through the local links.
74
75 .SH EXPRESSIONS
76 \fIippfind\fR supports expressions much like the \fIfind(1)\fR utility. However, unlike \fIfind\fR, \fIippfind\fR 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, \fIippfind\fR adds --print to print the service URI of anything it finds. The following expressions are supported:
77 .TP 5
78 -d regex
79 .TP 5
80 --domain regex
81 True if the domain matches the given regular expression.
82 .TP 5
83 -e utility [argument ...] ;
84 .TP 5
85 --exec utility [argument ...] ;
86 Executes the specified program if the current result is true. "{foo}" arguments are replaced with the corresponding value - see SUBSTITUTIONS below.
87 .TP 5
88 --false
89 Always false.
90 .TP 5
91 -h regex
92 .TP 5
93 --host regex
94 True is the hostname matches the given regular expression.
95 .TP 5
96 -l
97 .TP 5
98 --ls
99 Lists attributes returned by Get-Printer-Attributes for IPP printers and traditional \fIfind\fR "-ls" output for HTTP URLs. The result is true if the URI is accessible, false otherwise.
100 .TP 5
101 --local
102 True if the service is local to this computer.
103 .TP 5
104 -n regex
105 .TP 5
106 --name regex
107 True if the service instance name matches the given regular expression.
108 .TP 5
109 --path regex
110 True if the URI resource path matches the given regular expression.
111 .TP 5
112 -P number[-number]
113 .TP 5
114 --port number[-number]
115 True if the port matches the given number or range.
116 .TP 5
117 -p
118 .TP 5
119 --print
120 Prints the URI if the result of previous expressions is true. The result is always true.
121 .TP 5
122 -q
123 .TP 5
124 --quiet
125 Quiet mode - just returns the exit codes below.
126 .TP 5
127 -r
128 .TP 5
129 --remote
130 True if the service is not local to this computer.
131 .TP 5
132 -s
133 .TP 5
134 --print-name
135 Prints the service instance name if the result of previous expressions is true. The result is always true.
136 .TP 5
137 --true
138 Always true.
139 .TP 5
140 -t key
141 .TP 5
142 --txt key
143 True if the TXT record contains the named key.
144 .TP 5
145 --txt-\fIkey\fR regex
146 True if the TXT record contains the named key and matches the given regular
147 expression.
148 .TP 5
149 -u regex
150 .TP 5
151 --uri regex
152 True if the URI matches the given regular expression.
153 .PP
154 Expressions may also contain modifiers:
155 .TP 5
156 ( expression )
157 Group the result of expressions.
158 .TP 5
159 ! expression
160 .TP 5
161 --not expression
162 Unary NOT of the expression.
163 .TP 5
164 expression expression
165 .TP 5
166 expression --and expression
167 Logical AND of expressions.
168 .TP 5
169 expression --or expression
170 Logical OR of expressions.
171
172 .SH SUBSTITUTIONS
173 The substitutions for "{foo}" in -e and --exec are:
174 .TP 5
175 {}
176 URI
177 .TP 5
178 {service_domain}
179 Domain name, e.g., "example.com.", "local.", etc.
180 .TP 5
181 {service_hostname}
182 Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
183 .TP 5
184 {service_name}
185 Service instance name, e.g., "My Fine Printer".
186 .TP 5
187 {service_port}
188 Port number for server, typically 631 for IPP and 80 for HTTP.
189 .TP 5
190 {service_regtype}
191 DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
192 .TP 5
193 {service_scheme}
194 URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
195 .TP 5
196 {service_uri}
197 URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
198 .TP 5
199 {txt_\fIkey\fR}
200 Value of TXT record \fIkey\fR (lowercase).
201
202 .SH ENVIRONMENT VARIABLES
203 When executing a program, \fIippfind\fR sets the following environment variables for the matching service registration:
204 .TP 5
205 IPPFIND_SERVICE_DOMAIN
206 Domain name, e.g., "example.com.", "local.", etc.
207 .TP 5
208 IPPFIND_SERVICE_HOSTNAME
209 Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
210 .TP 5
211 IPPFIND_SERVICE_NAME
212 Service instance name, e.g., "My Fine Printer".
213 .TP 5
214 IPPFIND_SERVICE_PORT
215 Port number for server, typically 631 for IPP and 80 for HTTP.
216 .TP 5
217 IPPFIND_SERVICE_REGTYPE
218 DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
219 .TP 5
220 IPPFIND_SERVICE_SCHEME
221 URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
222 .TP 5
223 IPPFIND_SERVICE_URI
224 URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
225 .TP 5
226 IPPFIND_TXT_\fIKEY\fR
227 Values of TXT record \fIKEY\fR (uppercase).
228
229 .SH EXIT CODES
230 \fIippfind\fR 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.
231
232 .SH SEE ALSO
233 \fIipptool(1)\fR
234
235 .SH COPYRIGHT
236 Copyright 2013 by Apple Inc.
237 .\"
238 .\" End of "$Id$".
239 .\"