man-pages/man1/ippfind.1.html
2021-03-31 01:06:50 +01:00

341 lines
9.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of ippfind</TITLE>
</HEAD><BODY>
<H1>ippfind</H1>
Section: Apple Inc. (1)<BR>Updated: ippsample<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
ippfind - find internet printing protocol printers
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>ippfind</B>
[
<I>options</I>
] <I>regtype</I>[<B>,</B><I>subtype</I>][<B>.</B><I>domain</I><B>.</B>] ... [
<I>expression</I>
<BR>&nbsp;...&nbsp;]
<BR>
<B>ippfind</B>
[
<I>options</I>
] <I>name</I>[<B>.</B><I>regtype</I>[<B>.</B><I>domain</I><B>.</B>]] ... [
<I>expression</I>
<BR>&nbsp;...&nbsp;]
<BR>
<B>ippfind</B>
<B>--help</B>
<BR>
<B>ippfind</B>
<B>--version</B>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>ippfind</B> finds services registered with a DNS server or available through local devices.
Its primary purpose is to find IPP printers and show their URIs, show their current status, or run commands.
<A NAME="lbAE">&nbsp;</A>
<H3>REGISTRATION TYPES</H3>
<B>ippfind</B> supports the following registration types:
<DL COMPACT>
<DT id="1">_http._tcp<DD>
HyperText Transport Protocol (HTTP, RFC 2616)
<DT id="2">_https._tcp<DD>
Secure HyperText Transport Protocol (HTTPS, RFC 2818)
<DT id="3">_ipp._tcp<DD>
Internet Printing Protocol (IPP, RFC 2911)
<DT id="4">_ipps._tcp<DD>
Secure Internet Printing Protocol (IPPS, draft)
<DT id="5">_printer._tcp<DD>
Line Printer Daemon (LPD, RFC 1179)
</DL>
<A NAME="lbAF">&nbsp;</A>
<H3>EXPRESSIONS</H3>
<B>ippfind</B> supports expressions much like the
<B><A HREF="/cgi-bin/man/man2html?1+find">find</A></B>(1)
utility.
However, unlike
<B><A HREF="/cgi-bin/man/man2html?1+find">find</A></B>(1),
<B>ippfind</B> uses POSIX regular expressions instead of shell filename matching patterns.
If <I>--exec</I>, <I>-l</I>, <I>--ls</I>, <I>-p</I>, <I>--print</I>, <I>--print-name</I>, <I>-q</I>, <I>--quiet</I>, <I>-s</I>, or <I>-x</I> is not specified, <B>ippfind</B> adds <I>--print</I> to print the service URI of anything it finds.
The following expressions are supported:
<DL COMPACT>
<DT id="6"><B>-d </B><I>regex</I><DD>
<DT id="7"><B>--domain </B><I>regex</I><DD>
True if the domain matches the given regular expression.
<DT id="8"><B>--false</B>
<DD>
Always false.
<DT id="9"><B>-h </B><I>regex</I><DD>
<DT id="10"><B>--host </B><I>regex</I><DD>
True is the hostname matches the given regular expression.
<DT id="11"><B>-l</B>
<DD>
<DT id="12"><B>--ls</B>
<DD>
Lists attributes returned by Get-Printer-Attributes for IPP printers and traditional <I>find</I> &quot;-ls&quot; output for HTTP URLs.
The result is true if the URI is accessible, false otherwise.
<DT id="13"><B>--local</B>
<DD>
True if the service is local to this computer.
<DT id="14"><B>-N </B><I>name</I><DD>
<DT id="15"><B>--literal-name </B><I>name</I><DD>
True if the service instance name matches the given name.
<DT id="16"><B>-n </B><I>regex</I><DD>
<DT id="17"><B>--name </B><I>regex</I><DD>
True if the service instance name matches the given regular expression.
<DT id="18"><B>--path </B><I>regex</I><DD>
True if the URI resource path matches the given regular expression.
<DT id="19"><B>-P </B><I>number</I>[<B>-</B><I>number</I>]<DD>
<DT id="20"><B>--port </B><I>number</I>[<B>-</B><I>number</I>]<DD>
True if the port matches the given number or range.
<DT id="21"><B>-p</B>
<DD>
<DT id="22"><B>--print</B>
<DD>
Prints the URI if the result of previous expressions is true.
The result is always true.
<DT id="23"><B>-q</B>
<DD>
<DT id="24"><B>--quiet</B>
<DD>
Quiet mode - just returns the exit codes below.
<DT id="25"><B>-r</B>
<DD>
<DT id="26"><B>--remote</B>
<DD>
True if the service is not local to this computer.
<DT id="27"><B>-s</B>
<DD>
<DT id="28"><B>--print-name</B>
<DD>
Prints the service instance name if the result of previous expressions is true.
The result is always true.
<DT id="29"><B>--true</B>
<DD>
Always true.
<DT id="30"><B>-t </B><I>key</I><DD>
<DT id="31"><B>--txt </B><I>key</I><DD>
True if the TXT record contains the named key.
<DT id="32"><B>--txt-</B><I>key regex</I><DD>
True if the TXT record contains the named key and matches the given regular expression.
<DT id="33"><B>-u </B><I>regex</I><DD>
<DT id="34"><B>--uri </B><I>regex</I><DD>
True if the URI matches the given regular expression.
<DT id="35"><B>-x </B><I>utility </I>[ <I>argument </I>... ] <B>;</B><DD>
<DT id="36"><B>--exec </B><I>utility </I>[ <I>argument </I>... ] <B>;</B><DD>
Executes the specified program if the current result is true.
&quot;{foo}&quot; arguments are replaced with the corresponding value - see SUBSTITUTIONS below.
</DL>
<P>
Expressions may also contain modifiers:
<DL COMPACT>
<DT id="37"><B>( </B><I>expression </I><B>)</B><DD>
Group the result of expressions.
<DT id="38"><B>! </B><I>expression</I><DD>
<DT id="39"><B>--not </B><I>expression</I><DD>
Unary NOT of the expression.
<DT id="40"><I>expression expression</I><DD>
<DT id="41"><I>expression </I><B>--and </B><I>expression</I><DD>
Logical AND of expressions.
<DT id="42"><I>expression </I><B>--or </B><I>expression</I><DD>
Logical OR of expressions.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H3>SUBSTITUTIONS</H3>
The substitutions for &quot;{foo}&quot; in <I>-e</I> and <I>--exec</I> are:
<DL COMPACT>
<DT id="43"><B>{service_domain}</B>
<DD>
Domain name, e.g., &quot;example.com.&quot;, &quot;local.&quot;, etc.
<DT id="44"><B>{service_hostname}</B>
<DD>
Fully-qualified domain name, e.g., &quot;printer.example.com.&quot;, &quot;printer.local.&quot;, etc.
<DT id="45"><B>{service_name}</B>
<DD>
Service instance name, e.g., &quot;My Fine Printer&quot;.
<DT id="46"><B>{service_port}</B>
<DD>
Port number for server, typically 631 for IPP and 80 for HTTP.
<DT id="47"><B>{service_regtype}</B>
<DD>
DNS-SD registration type, e.g., &quot;_ipp._tcp&quot;, &quot;_http._tcp&quot;, etc.
<DT id="48"><B>{service_scheme}</B>
<DD>
URI scheme for DNS-SD registration type, e.g., &quot;ipp&quot;, &quot;http&quot;, etc.
<DT id="49"><B>{}</B>
<DD>
<DT id="50"><B>{service_uri}</B>
<DD>
URI for service, e.g., &quot;<A HREF="ipp://printer.local./ipp/print">ipp://printer.local./ipp/print</A>&quot;, &quot;<A HREF="http://printer.local./">http://printer.local./</A>&quot;, etc.
<DT id="51"><B>{txt_</B><I>key</I><B>}</B><DD>
Value of TXT record <I>key</I> (lowercase).
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>OPTIONS</H2>
<B>ippfind</B> supports the following options:
<DL COMPACT>
<DT id="52"><B>--help</B>
<DD>
Show program help.
<DT id="53"><B>--version</B>
<DD>
Show program version.
<DT id="54"><B>-4</B>
<DD>
Use IPv4 when listing.
<DT id="55"><B>-6</B>
<DD>
Use IPv6 when listing.
<DT id="56"><B>-T </B><I>seconds</I><DD>
Specify find timeout in seconds.
If 1 or less, <B>ippfind</B> stops as soon as it thinks it has found everything.
The default timeout is 1 second.
<DT id="57"><B>-V </B><I>version</I><DD>
Specifies the IPP version when listing.
Supported values are &quot;1.1&quot;, &quot;2.0&quot;, &quot;2.1&quot;, and &quot;2.2&quot;.
</DL>
<A NAME="lbAI">&nbsp;</A>
<H2>EXIT STATUS</H2>
<B>ippfind</B> 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.
<A NAME="lbAJ">&nbsp;</A>
<H2>ENVIRONMENT</H2>
When executing a program, <B>ippfind</B> sets the following environment variables for the matching service registration:
<DL COMPACT>
<DT id="58"><B>IPPFIND_SERVICE_DOMAIN</B>
<DD>
Domain name, e.g., &quot;example.com.&quot;, &quot;local.&quot;, etc.
<DT id="59"><B>IPPFIND_SERVICE_HOSTNAME</B>
<DD>
Fully-qualified domain name, e.g., &quot;printer.example.com.&quot;, &quot;printer.local.&quot;, etc.
<DT id="60"><B>IPPFIND_SERVICE_NAME</B>
<DD>
Service instance name, e.g., &quot;My Fine Printer&quot;.
<DT id="61"><B>IPPFIND_SERVICE_PORT</B>
<DD>
Port number for server, typically 631 for IPP and 80 for HTTP.
<DT id="62"><B>IPPFIND_SERVICE_REGTYPE</B>
<DD>
DNS-SD registration type, e.g., &quot;_ipp._tcp&quot;, &quot;_http._tcp&quot;, etc.
<DT id="63"><B>IPPFIND_SERVICE_SCHEME</B>
<DD>
URI scheme for DNS-SD registration type, e.g., &quot;ipp&quot;, &quot;http&quot;, etc.
<DT id="64"><B>IPPFIND_SERVICE_URI</B>
<DD>
URI for service, e.g., &quot;<A HREF="ipp://printer.local./ipp/print">ipp://printer.local./ipp/print</A>&quot;, &quot;<A HREF="http://printer.local./">http://printer.local./</A>&quot;, etc.
<DT id="65"><B>IPPFIND_TXT_</B><I>KEY</I>
<DD>
Values of TXT record <I>KEY</I> (uppercase).
</DL>
<A NAME="lbAK">&nbsp;</A>
<H2>EXAMPLES</H2>
To show the status of all registered IPP printers on your network, run:
<PRE>
ippfind --ls
</PRE>
Similarly, to send a PostScript test page to every PostScript printer, run:
<PRE>
ippfind --txt-pdl application/postscript --exec ipptool
-f onepage-letter.ps '{}' print-job.test \;
</PRE>
<A NAME="lbAL">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+ipptool">ipptool</A></B>(1)
<A NAME="lbAM">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copyright &#169; 2013-2019 by Apple Inc.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="66"><A HREF="#lbAB">NAME</A><DD>
<DT id="67"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="68"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DL>
<DT id="69"><A HREF="#lbAE">REGISTRATION TYPES</A><DD>
<DT id="70"><A HREF="#lbAF">EXPRESSIONS</A><DD>
<DT id="71"><A HREF="#lbAG">SUBSTITUTIONS</A><DD>
</DL>
<DT id="72"><A HREF="#lbAH">OPTIONS</A><DD>
<DT id="73"><A HREF="#lbAI">EXIT STATUS</A><DD>
<DT id="74"><A HREF="#lbAJ">ENVIRONMENT</A><DD>
<DT id="75"><A HREF="#lbAK">EXAMPLES</A><DD>
<DT id="76"><A HREF="#lbAL">SEE ALSO</A><DD>
<DT id="77"><A HREF="#lbAM">COPYRIGHT</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:17 GMT, March 31, 2021
</BODY>
</HTML>