]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/sdd.html
Copyright update...
[thirdparty/cups.git] / doc / sdd.html
CommitLineData
902da432 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
8db62627 2<HTML>
3<HEAD>
7159de3d 4<TITLE>CUPS Software Design Description</TITLE>
baee2cec 5<META NAME="author" CONTENT="Easy Software Products">
efb2f309 6<META NAME="copyright" CONTENT="Copyright 1997-2002, All Rights Reserved">
baee2cec 7<META NAME="docnumber" CONTENT="CUPS-SDD-1.1">
8<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-8859-1">
9<STYLE TYPE="text/css"><!--
7159de3d 10BODY { font-family: serif }
11H1 { font-family: sans-serif }
12H2 { font-family: sans-serif }
13H3 { font-family: sans-serif }
14H4 { font-family: sans-serif }
15H5 { font-family: sans-serif }
16H6 { font-family: sans-serif }
17SUB { font-size: smaller }
18SUP { font-size: smaller }
19PRE { font-family: monospace }
baee2cec 20--></STYLE>
8db62627 21</HEAD>
22<BODY>
7159de3d 23<CENTER><A HREF="#CONTENTS"><IMG SRC="images/cups-large.gif" BORDER="0" WIDTH="431" HEIGHT="511"><BR>
24<H1>CUPS Software Design Description</H1></A><BR>
1aee2644 25CUPS-SDD-1.1<BR>
6a921799 26Easy Software Products<BR>
efb2f309 27Copyright 1997-2002, All Rights Reserved<BR>
6a921799 28</CENTER>
29<HR>
baee2cec 30<H1 ALIGN="CENTER"><A NAME="CONTENTS">Table of Contents</A></H1>
31<BR>
32<BR><B><A HREF="#1">1 Scope</A></B>
8db62627 33<UL>
baee2cec 34<LI><A HREF="#1_1">1.1 Identification</A></LI>
35<LI><A HREF="#1_2">1.2 System Overview</A></LI>
36<LI><A HREF="#1_3">1.3 Document Overview</A></LI>
8db62627 37</UL>
baee2cec 38<B><A HREF="#2">2 References</A></B>
8db62627 39<UL>
baee2cec 40<LI><A HREF="#2_1">2.1 CUPS Documentation</A></LI>
41<LI><A HREF="#2_2">2.2 Other Documents</A></LI>
8db62627 42</UL>
baee2cec 43<B><A HREF="#3">3 Design Overview</A></B>
6a921799 44<UL>
baee2cec 45<LI><A HREF="#3_1">3.1 Backends</A></LI>
8db62627 46<UL>
baee2cec 47<LI><A HREF="#3_1_1">3.1.1 ipp</A></LI>
48<LI><A HREF="#3_1_2">3.1.2 lpd</A></LI>
49<LI><A HREF="#3_1_3">3.1.3 parallel</A></LI>
50<LI><A HREF="#3_1_4">3.1.4 serial</A></LI>
51<LI><A HREF="#3_1_5">3.1.5 socket</A></LI>
52<LI><A HREF="#3_1_6">3.1.6 usb</A></LI>
8db62627 53</UL>
baee2cec 54<LI><A HREF="#3_2">3.2 Berkeley Commands</A></LI>
8db62627 55<UL>
baee2cec 56<LI><A HREF="#3_2_1">3.2.1 lpc</A></LI>
57<LI><A HREF="#3_2_2">3.2.2 lpq</A></LI>
58<LI><A HREF="#3_2_3">3.2.3 lpr</A></LI>
59<LI><A HREF="#3_2_4">3.2.4 lprm</A></LI>
8db62627 60</UL>
baee2cec 61<LI><A HREF="#3_3">3.3 CGI</A></LI>
6a921799 62<UL>
baee2cec 63<LI><A HREF="#3_3_1">3.3.1 admin.cgi</A></LI>
64<LI><A HREF="#3_3_2">3.3.2 classes.cgi</A></LI>
65<LI><A HREF="#3_3_3">3.3.3 jobs.cgi</A></LI>
efb2f309 66<LI><A HREF="#3_3_4">3.3.4 printers.cgi</A></LI>
6a921799 67</UL>
baee2cec 68<LI><A HREF="#3_4">3.4 CUPS Application Programmers Interface</A></LI>
6a921799 69<UL>
baee2cec 70<LI><A HREF="#3_4_1">3.4.1 Convenience Functions</A></LI>
71<LI><A HREF="#3_4_2">3.4.2 HTTP Functions</A></LI>
72<LI><A HREF="#3_4_3">3.4.3 IPP Functions</A></LI>
73<LI><A HREF="#3_4_4">3.4.4 Language Functions</A></LI>
74<LI><A HREF="#3_4_5">3.4.5 PPD Functions</A></LI>
6a921799 75</UL>
baee2cec 76<LI><A HREF="#3_5">3.5 CUPS Imaging Library</A></LI>
6a921799 77<UL>
baee2cec 78<LI><A HREF="#3_5_1">3.5.1 Colorspace Conversion Functions</A></LI>
79<LI><A HREF="#3_5_2">3.5.2 Color Management Functions</A></LI>
80<LI><A HREF="#3_5_3">3.5.3 Image Management Functions</A></LI>
81<LI><A HREF="#3_5_4">3.5.4 Scaling Functions</A></LI>
82<LI><A HREF="#3_5_5">3.5.5 Image File Functions</A></LI>
83<LI><A HREF="#3_5_6">3.5.6 Raster Functions</A></LI>
6a921799 84</UL>
baee2cec 85<LI><A HREF="#3_6">3.6 Daemons</A></LI>
6a921799 86<UL>
baee2cec 87<LI><A HREF="#3_6_1">3.6.1 Line Printer Daemon</A></LI>
88<LI><A HREF="#3_6_2">3.6.2 Polling Daemon</A></LI>
6a921799 89</UL>
baee2cec 90<LI><A HREF="#3_7">3.7 Filters</A></LI>
6a921799 91<UL>
baee2cec 92<LI><A HREF="#3_7_1">3.7.1 hpgltops</A></LI>
93<LI><A HREF="#3_7_2">3.7.2 imagetops</A></LI>
94<LI><A HREF="#3_7_3">3.7.3 imagetoraster</A></LI>
95<LI><A HREF="#3_7_4">3.7.4 pdftops</A></LI>
96<LI><A HREF="#3_7_5">3.7.5 pstops</A></LI>
97<LI><A HREF="#3_7_6">3.7.6 pstoraster</A></LI>
98<LI><A HREF="#3_7_7">3.7.7 rastertoepson</A></LI>
99<LI><A HREF="#3_7_8">3.7.8 rastertohp</A></LI>
100<LI><A HREF="#3_7_9">3.7.9 texttops</A></LI>
551d3a88 101</UL>
baee2cec 102<LI><A HREF="#3_8">3.8 Scheduler</A></LI>
551d3a88 103<UL>
baee2cec 104<LI><A HREF="#3_8_1">3.8.1 Authorization</A></LI>
105<LI><A HREF="#3_8_2">3.8.2 Classes</A></LI>
106<LI><A HREF="#3_8_3">3.8.3 Client</A></LI>
107<LI><A HREF="#3_8_4">3.8.4 Configuration</A></LI>
108<LI><A HREF="#3_8_5">3.8.5 Devices</A></LI>
109<LI><A HREF="#3_8_6">3.8.6 Directory Services</A></LI>
110<LI><A HREF="#3_8_7">3.8.7 IPP</A></LI>
111<LI><A HREF="#3_8_8">3.8.8 Jobs</A></LI>
112<LI><A HREF="#3_8_9">3.8.9 Logging</A></LI>
113<LI><A HREF="#3_8_10">3.8.10 Main</A></LI>
114<LI><A HREF="#3_8_11">3.8.11 MIME</A></LI>
115<LI><A HREF="#3_8_12">3.8.12 PPDs</A></LI>
116<LI><A HREF="#3_8_13">3.8.13 Printers</A></LI>
551d3a88 117</UL>
baee2cec 118<LI><A HREF="#3_9">3.9 System V Commands</A></LI>
551d3a88 119<UL>
baee2cec 120<LI><A HREF="#3_9_1">3.9.1 accept</A></LI>
121<LI><A HREF="#3_9_2">3.9.2 cancel</A></LI>
122<LI><A HREF="#3_9_3">3.9.3 disable</A></LI>
123<LI><A HREF="#3_9_4">3.9.4 enable</A></LI>
124<LI><A HREF="#3_9_5">3.9.5 lp</A></LI>
125<LI><A HREF="#3_9_6">3.9.6 lpadmin</A></LI>
126<LI><A HREF="#3_9_7">3.9.7 lpinfo</A></LI>
127<LI><A HREF="#3_9_8">3.9.8 lpmove</A></LI>
128<LI><A HREF="#3_9_9">3.9.9 lpoptions</A></LI>
129<LI><A HREF="#3_9_10">3.9.10 lpstat</A></LI>
130<LI><A HREF="#3_9_11">3.9.11 reject</A></LI>
6a921799 131</UL>
132</UL>
baee2cec 133<B><A HREF="#4">A Glossary</A></B>
6a921799 134<UL>
baee2cec 135<LI><A HREF="#4_1">A.1 Terms</A></LI>
136<LI><A HREF="#4_2">A.2 Acronyms</A></LI>
6a921799 137</UL>
138<HR>
baee2cec 139<H1><A NAME="1">1 Scope</A></H1>
140<H2><A NAME="1_1">1.1 Identification</A></H2>
7159de3d 141 This software design description document provides general information
142 on the architecture and coding of the Common UNIX Printing System
143 (&quot;CUPS&quot;) Version 1.1.
baee2cec 144<H2><A NAME="1_2">1.2 System Overview</A></H2>
7159de3d 145<P>CUPS provides a portable printing layer for UNIX&reg;-based operating
146 systems. It has been developed by<A HREF="http://www.easysw.com"> Easy
147 Software Products</A> to promote a standard printing solution for all
148 UNIX vendors and users. CUPS provides the System V and Berkeley
149 command-line interfaces.</P>
150<P>CUPS uses the Internet Printing Protocol (&quot;IPP&quot;) as the basis for
151 managing print jobs and queues. The Line Printer Daemon (&quot;LPD&quot;) Server
152 Message Block (&quot;SMB&quot;), and AppSocket (a.k.a. JetDirect) protocols are
153 also supported with reduced functionality. CUPS adds network printer
154 browsing and PostScript Printer Description (&quot;PPD&quot;) based printing
155 options to support real-world printing under UNIX.</P>
156<P>CUPS also includes a customized version of GNU Ghostscript (currently
157 based off GNU Ghostscript 5.50) and an image file RIP that are used to
158 support non-PostScript printers. Sample drivers for HP and EPSON
159 printers are included that use these filters.</P>
baee2cec 160<H2><A NAME="1_3">1.3 Document Overview</A></H2>
7159de3d 161 This software design description document is organized into the
162 following sections:
6a921799 163<UL>
7159de3d 164<LI>1 - Scope</LI>
165<LI>2 - References</LI>
166<LI>3 - Design Overview</LI>
167<LI>A - Glossary</LI>
6a921799 168</UL>
baee2cec 169<H1><A NAME="2">2 References</A></H1>
170<H2><A NAME="2_1">2.1 CUPS Documentation</A></H2>
7159de3d 171<P>The following CUPS documentation is referenced by this document:</P>
6a921799 172<UL>
7159de3d 173<LI>CUPS-CMP-1.1: CUPS Configuration Management Plan</LI>
174<LI>CUPS-IDD-1.1: CUPS System Interface Design Description</LI>
175<LI>CUPS-IPP-1.1: CUPS Implementation of IPP</LI>
176<LI>CUPS-SAM-1.1.x: CUPS Software Administrators Manual</LI>
177<LI>CUPS-SDD-1.1: CUPS Software Design Description</LI>
178<LI>CUPS-SPM-1.1.x: CUPS Software Programming Manual</LI>
179<LI>CUPS-SSR-1.1: CUPS Software Security Report</LI>
180<LI>CUPS-STP-1.1: CUPS Software Test Plan</LI>
181<LI>CUPS-SUM-1.1.x: CUPS Software Users Manual</LI>
182<LI>CUPS-SVD-1.1: CUPS Software Version Description</LI>
6a921799 183</UL>
baee2cec 184<H2><A NAME="2_2">2.2 Other Documents</A></H2>
7159de3d 185<P>The following non-CUPS documents are referenced by this document:</P>
6a921799 186<UL>
551d3a88 187<LI><A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/5003.PPD_Spec_v4.3.pdf">
7159de3d 188Adobe PostScript Printer Description File Format Specification, Version
189 4.3.</A></LI>
551d3a88 190<LI><A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/PLRM.pdf">
7159de3d 191Adobe PostScript Language Reference, Third Edition.</A></LI>
192<LI>IPP: Job and Printer Set Operations</LI>
193<LI>IPP/1.1: Encoding and Transport</LI>
194<LI>IPP/1.1: Implementers Guide</LI>
195<LI>IPP/1.1: Model and Semantics</LI>
196<LI><A HREF="http://www.ietf.org/rfc/rfc1179.txt">RFC 1179, Line Printer
197 Daemon Protocol</A></LI>
198<LI><A HREF="http://www.ietf.org/rfc/rfc2567.txt">RFC 2567, Design Goals
199 for an Internet Printing Protocol</A></LI>
200<LI><A HREF="http://www.ietf.org/rfc/rfc2568.txt">RFC 2568, Rationale
201 for the Structure of the Model and Protocol</A> for the Internet
202 Printing Protocol</LI>
203<LI><A HREF="http://www.ietf.org/rfc/rfc2569.txt">RFC 2569, Mapping
204 between LPD and IPP Protocols</A></LI>
205<LI><A HREF="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616, Hypertext
206 Transfer Protocol -- HTTP/1.1</A></LI>
207<LI><A HREF="http://www.ietf.org/rfc/rfc2617.txt">RFC 2617, HTTP
208 Authentication: Basic and Digest Access</A> Authentication</LI>
6a921799 209</UL>
baee2cec 210<H1><A NAME="3">3 Design Overview</A></H1>
7159de3d 211 CUPS is composed of 9 software sub-systems that operate together to
212 perform common printing tasks:
6a921799 213<UL>
7159de3d 214<LI>Backends</LI>
215<LI>Berkeley Commands</LI>
216<LI>CGI</LI>
217<LI>CUPS Application Programmers Interface</LI>
218<LI>CUPS Imaging Library</LI>
219<LI>Daemons</LI>
220<LI>Filters</LI>
221<LI>Scheduler</LI>
222<LI>System V Commands</LI>
6a921799 223</UL>
baee2cec 224<H2><A NAME="3_1">3.1 Backends</A></H2>
7159de3d 225 The backends implement communications over a number of different
226 interfaces. All backends are called with a common set of arguments:
6a921799 227<UL>
7159de3d 228<LI>Device URI - the Uniform Resource Identifier for the output device
229 (e.g. <CODE>parallel:/dev/plp</CODE>, <CODE>ipp://hostname/resource</CODE>
230).</LI>
231<LI>Job Identifier - the job identifier for this job (integer).</LI>
232<LI>User Name - the user associated with this job (name string).</LI>
233<LI>Title - the title/job-name associated with this job (name string).</LI>
234<LI>Copies - the number of copies required (integer).</LI>
235<LI>Options - the options associated with this job (space separated
236 option strings).</LI>
237<LI>Filename (optional) - the file to print; if this option is not
238 specified, the backend must read the print file from the standard
239 input.</LI>
6a921799 240</UL>
7159de3d 241<P>Backends are named using the scheme of the URI, so a URI of
242 &quot;ipp://hostname/resource&quot; would be processed by the &quot;ipp&quot; backend.</P>
baee2cec 243<H3><A NAME="3_1_1">3.1.1 ipp</A></H3>
7159de3d 244<P>The ipp backend sends the specified job to a network printer or host
245 using the Internet Printing Protocol. The URI is as specified by the <CODE>
246printer-uri-supported</CODE> attribute from the printer or host.</P>
baee2cec 247<H3><A NAME="3_1_2">3.1.2 lpd</A></H3>
7159de3d 248<P>The lpd backend sends the specified job to a network printer or host
249 using the Line Printer Daemon protocol. The URI is of the form:</P>
6a921799 250<UL>
251<PRE>lpd://hostname/queue
baee2cec 252</PRE>
6a921799 253</UL>
baee2cec 254<H3><A NAME="3_1_3">3.1.3 parallel</A></H3>
7159de3d 255<P>The parallel backend sends the specified job to a local printer
256 connected via the specified parallel port device. The URI is of the
257 form:</P>
6a921799 258<UL>
259<PRE>parallel:/dev/file
baee2cec 260</PRE>
6a921799 261</UL>
baee2cec 262<H3><A NAME="3_1_4">3.1.4 serial</A></H3>
7159de3d 263<P>The serial backend sends the specified job to a local printer
264 connected via the specified serial port device. The URI is of the form:</P>
6a921799 265<UL>
266<PRE>serial:/dev/file?option[+option+...]
baee2cec 267</PRE>
6a921799 268</UL>
7159de3d 269 The options can be any combination of the following:
6a921799 270<UL>
7159de3d 271<LI><CODE>baud=<I>rate</I></CODE> - Sets the baud rate for the device.</LI>
272<LI><CODE>bits=<I>7 or 8</I></CODE> - Sets the number of data bits.</LI>
273<LI><CODE>parity=<I>even</I></CODE> - Sets even parity checking.</LI>
274<LI><CODE>parity=<I>odd</I></CODE> - Sets odd parity checking.</LI>
275<LI><CODE>parity=<I>none</I></CODE> - Turns parity checking off.</LI>
276<LI><CODE>flow=dtrdsr<I></I></CODE> - Turns DTR/DSR (hardware) flow
277 control on.</LI>
278<LI><CODE>flow=hard<I></I></CODE> - Turns RTS/CTS (hardware) flow
279 control on.</LI>
280<LI><CODE>flow=none<I></I></CODE> - Turns flow control off.</LI>
281<LI><CODE>flow=rtscts<I></I></CODE> - Turns RTS/CTS (hardware) flow
282 control on.</LI>
283<LI><CODE>flow=xonxoff<I></I></CODE> - Turns XON/XOFF (software) flow
284 control on.</LI>
6a921799 285</UL>
baee2cec 286<H3><A NAME="3_1_5">3.1.5 socket</A></H3>
7159de3d 287<P>The socket backend sends the specified job to a network host using
288 the AppSocket protocol commonly used by Hewlett-Packard and Tektronix
289 printers. The URI is of the form:</P>
6a921799 290<UL>
291<PRE>socket://hostname[:port]
baee2cec 292</PRE>
6a921799 293</UL>
7159de3d 294 The default port number is 9100.
baee2cec 295<H3><A NAME="3_1_6">3.1.6 usb</A></H3>
7159de3d 296<P>The usb backend sends the specified job to a local printer connected
297 via the specified usb port device. The URI is of the form:</P>
551d3a88 298<UL>
299<PRE>usb:/dev/file
baee2cec 300</PRE>
551d3a88 301</UL>
baee2cec 302<H2><A NAME="3_2">3.2 Berkeley Commands</A></H2>
7159de3d 303<P>The Berkeley commands provide a simple command-line interface to CUPS
304 to submit and control print jobs. It is provided for compatibility with
305 existing software that is hardcoded to use the Berkeley commands.</P>
baee2cec 306<H3><A NAME="3_2_1">3.2.1 lpc</A></H3>
7159de3d 307 The lpc command allows users and administrators to check the status and
308 control print queues. The version provided with CUPS supports the
309 following commands:
6a921799 310<UL>
7159de3d 311<LI>quit - Quits the lpc command.</LI>
312<LI>status - Shows the status of printers and jobs in the queue.</LI>
6a921799 313</UL>
baee2cec 314<H3><A NAME="3_2_2">3.2.2 lpq</A></H3>
7159de3d 315<P>The lpq command shows the current queue status.</P>
baee2cec 316<H3><A NAME="3_2_3">3.2.3 lpr</A></H3>
7159de3d 317<P>The lpr command submits a job for printing. The CUPS version of lpr
318 silently ignores the &quot;i&quot;, &quot;t&quot;, &quot;m&quot;, &quot;h&quot;, and &quot;s&quot; options.</P>
baee2cec 319<H3><A NAME="3_2_4">3.2.4 lprm</A></H3>
7159de3d 320<P>The lprm removes one or more print jobs.</P>
baee2cec 321<H2><A NAME="3_3">3.3 CGI</A></H2>
7159de3d 322<P>The Common Gateway Interface (CGI) programs provide a web-based
323 status interface to monitor the status of printers, classes, and jobs.
324 Each of the CGIs utilize HTML template files that can be customized to
325 provide alternate appearances.</P>
baee2cec 326<H3><A NAME="3_3_1">3.3.1 admin.cgi</A></H3>
7159de3d 327<P>The admin CGI provides administration interfaces for printers and
328 classes. The user can add, modify, delete, start, stop, and configure
329 printers and classes using &quot;wizard&quot; interfaces.</P>
baee2cec 330<H3><A NAME="3_3_2">3.3.2 classes.cgi</A></H3>
7159de3d 331<P>The classes CGI lists the available printer classes and any pending
332 jobs for the class. The user can click on individual classes to limit
333 the display and click on jobs to see the job status.</P>
baee2cec 334<H3><A NAME="3_3_3">3.3.3 jobs.cgi</A></H3>
7159de3d 335<P>The jobs CGI lists the queued print jobs in order of priority. The
336 list can be limited by printer or job.</P>
efb2f309 337<H3><A NAME="3_3_4">3.3.4 printers.cgi</A></H3>
7159de3d 338<P>The printers CGI lists the available printer queues and any pending
339 jobs for the printer. The user can click on individual printers to
340 limit the display and click on jobs to see the job status.</P>
baee2cec 341<H2><A NAME="3_4">3.4 CUPS Application Programmers Interface</A></H2>
7159de3d 342<P>The CUPS Application Programmers Interface (&quot;API&quot;) provides common
343 convenience, HTTP, IPP, language, and PPD functions used by the CUPS
344 software.</P>
baee2cec 345<H3><A NAME="3_4_1">3.4.1 Convenience Functions</A></H3>
7159de3d 346<P>Convenience functions are provided to submit an IPP request, send a
347 print file, cancel a job, get a list of available printers, get a list
348 of available classes, get the default printer or class, get the default
349 server name, get the local username, and get a password string.</P>
baee2cec 350<H3><A NAME="3_4_2">3.4.2 HTTP Functions</A></H3>
7159de3d 351<P>The HTTP functions provide functions to connect to HTTP servers,
352 issue requests, read data from a server, and write data to a server.</P>
baee2cec 353<H3><A NAME="3_4_3">3.4.3 IPP Functions</A></H3>
7159de3d 354<P>The IPP function provide functions to manage IPP request data and
355 attributes, read IPP responses from a server, and write IPP requests to
356 a server.</P>
baee2cec 357<H3><A NAME="3_4_4">3.4.4 Language Functions</A></H3>
7159de3d 358<P>The language functions provide a standard interface for retrieving
359 common textual messages for a particular locale and determining the
360 correct encoding (e.g. US ASCII, UTF-8, ISO-8859-1, etc.)</P>
baee2cec 361<H3><A NAME="3_4_5">3.4.5 PPD Functions</A></H3>
7159de3d 362<P>The PostScript Printer Description functions manage PPD files, select
363 options, check for option conflicts, and emit selected options in the
364 correct order.</P>
baee2cec 365<H2><A NAME="3_5">3.5 CUPS Imaging Library</A></H2>
7159de3d 366<P>The CUPS imaging library provides colorspace conversion, color
367 management, image management, scaling, image file, and raster functions
368 used by the CUPS raster filters.</P>
baee2cec 369<H3><A NAME="3_5_1">3.5.1 Colorspace Conversion Functions</A></H3>
7159de3d 370<P>The colorspace conversion functions handle conversion of grayscale
371 and RGB colors to grayscale, RGB, K, CMY, CMYK, and CMYKcm colorspaces.</P>
baee2cec 372<H3><A NAME="3_5_2">3.5.2 Color Management Functions</A></H3>
7159de3d 373<P>The color management functions handle gamut mapping and density
374 correction. These are integrated with the colorspace conversion
375 functions so that colorspace conversion and color management are
376 processed in a single step.</P>
baee2cec 377<H3><A NAME="3_5_3">3.5.3 Image Management Functions</A></H3>
7159de3d 378<P>The image management functions manage a tiled image database that is
379 swapped to/from disk as needed.</P>
baee2cec 380<H3><A NAME="3_5_4">3.5.4 Scaling Functions</A></H3>
7159de3d 381<P>The scaling functions provide image scaling services using
382 nearest-neighbor sampling and bilinear interpolation as appropriate.</P>
baee2cec 383<H3><A NAME="3_5_5">3.5.5 Image File Functions</A></H3>
7159de3d 384<P>The image file functions handle loading of all image file formats.</P>
baee2cec 385<H3><A NAME="3_5_6">3.5.6 Raster Functions</A></H3>
7159de3d 386<P>The raster functions manage streams of CUPS raster data (described in
387 the Interface Design Document) used by non-PostScript printer drivers
388 and raster filters.</P>
baee2cec 389<H2><A NAME="3_6">3.6 Daemons</A></H2>
7159de3d 390<P>The daemons provide additional network functions for the scheduler.
391 Currently only two daemons are provided with CUPS.</P>
baee2cec 392<H3><A NAME="3_6_1">3.6.1 Line Printer Daemon</A></H3>
7159de3d 393<P>The line printer daemon provides remote LPD client support and is run
394 by the <CODE>inetd(8)</CODE> daemon as needed.</P>
baee2cec 395<H3><A NAME="3_6_2">3.6.2 Polling Daemon</A></H3>
7159de3d 396<P>The polling daemon is used to poll a remote server for a list of
397 available printers and provide it to the scheduler for addition. A
398 separate polling daemon is run by the scheduler for every remote system
399 listed for polling in the scheduler configuration file.</P>
baee2cec 400<H2><A NAME="3_7">3.7 Filters</A></H2>
7159de3d 401<P>The filters implement file conversion services for CUPS. All filters
402 are called with a common set of arguments:</P>
6a921799 403<UL>
7159de3d 404<LI>Printer name - the name of the destination printer (name string).</LI>
405<LI>Job Identifier - the job identifier for this job (integer).</LI>
406<LI>User Name - the user associated with this job (name string).</LI>
407<LI>Title - the title/job-name associated with this job (name string).</LI>
408<LI>Copies - the number of copies required (integer).</LI>
409<LI>Options - the options associated with this job (space separated
410 option strings).</LI>
411<LI>Filename (optional) - the file to print; if this option is not
412 specified, the filter must read the input file from the standard input.</LI>
6a921799 413</UL>
7159de3d 414<P>Filters are added to the MIME conversion data file and implement all
415 necessary conversions from one file type to another.</P>
baee2cec 416<H3><A NAME="3_7_1">3.7.1 hpgltops</A></H3>
7159de3d 417<P>The hpgltops filter converts HP-GL/2 files into PostScript.</P>
baee2cec 418<H3><A NAME="3_7_2">3.7.2 imagetops</A></H3>
7159de3d 419<P>The imagetops filter converts image files into PostScript.</P>
baee2cec 420<H3><A NAME="3_7_3">3.7.3 imagetoraster</A></H3>
7159de3d 421<P>The imagetoraster filter converts image files into CUPS raster data.</P>
baee2cec 422<H3><A NAME="3_7_4">3.7.4 pdftops</A></H3>
7159de3d 423<P>The pdftops filter converts PDF files into PostScript.</P>
baee2cec 424<H3><A NAME="3_7_5">3.7.5 pstops</A></H3>
7159de3d 425<P>The pstops filter inserts printer-specific commands from PPD files
426 and performs page filtering as requested by the user.</P>
baee2cec 427<H3><A NAME="3_7_6">3.7.6 pstoraster</A></H3>
7159de3d 428<P>The pstoraster filter converts PostScript program data into CUPS
429 raster data.</P>
baee2cec 430<H3><A NAME="3_7_7">3.7.7 rastertoepson</A></H3>
7159de3d 431<P>The rastertoepson filter handles converting CUPS raster data to ESC/P
432 and supports both color and black-and-white printers.</P>
baee2cec 433<H3><A NAME="3_7_8">3.7.8 rastertohp</A></H3>
7159de3d 434<P>The rastertohp filter handles converting CUPS raster data to HP-PCL
435 and supports both color and black-and-white printers.</P>
baee2cec 436<H3><A NAME="3_7_9">3.7.9 texttops</A></H3>
7159de3d 437<P>The texttops filter converts text files into PostScript.</P>
baee2cec 438<H2><A NAME="3_8">3.8 Scheduler</A></H2>
7159de3d 439<P>The scheduler is a fully-functional HTTP/1.1 and IPP/1.1 server that
440 manages the printers, classes, and jobs in the system. It also handles
441 a simple broadcast-based directory service so that remote print queues
442 and classes can be accessed transparently from the local system.</P>
baee2cec 443<H3><A NAME="3_8_1">3.8.1 Authorization</A></H3>
7159de3d 444<P>The authorization module is responsible for performing access control
445 and authentication for all HTTP and IPP requests entering the system.</P>
baee2cec 446<H3><A NAME="3_8_2">3.8.2 Classes</A></H3>
7159de3d 447<P>The classes module is responsible for managing printer classes in the
448 system. Each class is a collection of local and/or remote printers. The
449 classes module also reads and writes the classes configuration file.</P>
baee2cec 450<H3><A NAME="3_8_3">3.8.3 Client</A></H3>
7159de3d 451<P>The client module is responsible for all HTTP client communications.
452 It handles listening on selected interfaces, accepting connections from
453 prospective clients, processing incoming HTTP requests, and sending
454 HTTP responses to those requests. The client module also is responsible
455 for executing the external CGI programs as needed to support web-based
456 printer, class, and job status monitoring and administration.</P>
457<P>Once authorized, all IPP requests are sent to the IPP module.</P>
baee2cec 458<H3><A NAME="3_8_4">3.8.4 Configuration</A></H3>
7159de3d 459<P>The configuration module is responsible for reading the CUPS
460 configuration file and initializing the appropriate data structures and
461 values. The configuration module also stops CUPS services before
462 reading the configuration file and restarts them after the
463 configuration file has been read.</P>
baee2cec 464<H3><A NAME="3_8_5">3.8.5 Devices</A></H3>
7159de3d 465<P>The devices module is responsible for managing the list of available
466 devices for the CUPS-Get-Devices operation.</P>
baee2cec 467<H3><A NAME="3_8_6">3.8.6 Directory Services</A></H3>
7159de3d 468<P>The directory services module sends and recieves printer state
469 information over a broadcast socket. Remote printers and classes are
470 automatically added to or removed from the local printer and class
471 lists as needed.</P>
472<P>The directory services module can only recieve printer state
473 information over a single UDP port, however it can broadcast to
474 multiple addresses and ports as needed.</P>
baee2cec 475<H3><A NAME="3_8_7">3.8.7 IPP</A></H3>
7159de3d 476<P>The IPP module handles IPP requests and acts accordingly. URI
477 validation is also performed here, as a client can post IPP data to any
478 URI on the server which might sidestep the access control or
479 authentication of the HTTP server.</P>
baee2cec 480<H3><A NAME="3_8_8">3.8.8 Jobs</A></H3>
7159de3d 481<P>The jobs module manages print jobs, starts filter and backend
482 processes for jobs to be printed, and monitors status messages from
483 those filters and backends.</P>
baee2cec 484<H3><A NAME="3_8_9">3.8.9 Logging</A></H3>
7159de3d 485<P>The logging module manages the access, error, and page log files that
486 are generated by the scheduler.</P>
baee2cec 487<H3><A NAME="3_8_10">3.8.10 Main</A></H3>
7159de3d 488<P>The main module is responsible for timing out and dispatching input
489 and output for client connections. It also watches for incoming <CODE>
490SIGHUP</CODE> and <CODE>SIGCHLD</CODE> signals, reloads the server
491 configuration files as needed, and handles child process errors and
492 exits.</P>
baee2cec 493<H3><A NAME="3_8_11">3.8.11 MIME</A></H3>
7159de3d 494<P>The Multimedia Internet Mail Exchange module manages a MIME type and
495 conversion database that supports file typing by extension and content
496 and least-cost file filtering from a source to a destination file type.</P>
baee2cec 497<H3><A NAME="3_8_12">3.8.12 PPDs</A></H3>
7159de3d 498<P>The PPDs module is responsible for managing the list of available PPD
499 files for the CUPS-Get-PPDs operation.</P>
baee2cec 500<H3><A NAME="3_8_13">3.8.13 Printers</A></H3>
7159de3d 501<P>The printers module is responsible for managing printers and PPD
502 files in the system. The printers module also reads and writes the
503 printers configuration file.</P>
baee2cec 504<H2><A NAME="3_9">3.9 System V Commands</A></H2>
7159de3d 505<P>The System V commands provide a robust command-line interface to CUPS
506 to submit and control printers and jobs.</P>
baee2cec 507<H3><A NAME="3_9_1">3.9.1 accept</A></H3>
7159de3d 508<P>The accept command tells the scheduler to accept new jobs for
509 specific printers.</P>
baee2cec 510<H3><A NAME="3_9_2">3.9.2 cancel</A></H3>
7159de3d 511<P>The cancel command tells the scheduler to cancel one or more jobs
512 that are queued for printing.</P>
baee2cec 513<H3><A NAME="3_9_3">3.9.3 disable</A></H3>
7159de3d 514<P>The disable command tells the scheduler to stop printing jobs on the
515 specified printers.</P>
baee2cec 516<H3><A NAME="3_9_4">3.9.4 enable</A></H3>
7159de3d 517<P>The enable command tells the scheduler to start printing jobs on the
518 specified printers.</P>
baee2cec 519<H3><A NAME="3_9_5">3.9.5 lp</A></H3>
7159de3d 520<P>The lp command submits submits files for printing. Unlike the
521 standard System V lp command, a single CUPS lp command will generate a
522 separate job ID for each file that is printed. Also, the Solaris &quot;f&quot;,
523 &quot;H&quot;, &quot;P&quot;, &quot;S&quot;, and &quot;y&quot; options are silently ignored.</P>
baee2cec 524<H3><A NAME="3_9_6">3.9.6 lpadmin</A></H3>
7159de3d 525<P>The lpadmin command manages printer queues and classes. The Solaris
526 &quot;A&quot;, &quot;F&quot;, &quot;I&quot;, &quot;M&quot;, &quot;P&quot;, &quot;Q&quot;, &quot;S&quot;, &quot;T&quot;, &quot;U&quot;, &quot;W&quot;, &quot;f&quot;, &quot;l&quot;, &quot;m&quot;, &quot;o&quot;,
527 &quot;s&quot;, &quot;t&quot;, and &quot;u&quot; options are not supported, and new options &quot;P&quot; (PPD
528 file) and &quot;E&quot; (enable and accept) are provided to configure
529 CUPS-specific features.</P>
baee2cec 530<H3><A NAME="3_9_7">3.9.7 lpinfo</A></H3>
7159de3d 531<P>The lpinfo command lists the available PPD files or devices as
532 selected by the user.</P>
baee2cec 533<H3><A NAME="3_9_8">3.9.8 lpmove</A></H3>
7159de3d 534<P>The lpmove command moves a print job to a new destination.</P>
baee2cec 535<H3><A NAME="3_9_9">3.9.9 lpoptions</A></H3>
7159de3d 536<P>The lpoptions command manages user-defined printers and options.</P>
baee2cec 537<H3><A NAME="3_9_10">3.9.10 lpstat</A></H3>
7159de3d 538<P>The lpstat command lists printers, classes, and jobs as requested by
539 the user.</P>
baee2cec 540<H3><A NAME="3_9_11">3.9.11 reject</A></H3>
7159de3d 541<P>The reject command tells the scheduler not to accept new jobs for
542 specific printers.</P>
baee2cec 543<H1 TYPE="A" VALUE="1"><A NAME="4">A Glossary</A></H1>
544<H2><A NAME="4_1">A.1 Terms</A></H2>
6a921799 545<DL>
7159de3d 546<DT>C</DT>
547<DD>A computer language.</DD>
548<DT>parallel</DT>
549<DD>Sending or receiving data more than 1 bit at a time.</DD>
550<DT>pipe</DT>
551<DD>A one-way communications channel between two programs.</DD>
552<DT>serial</DT>
553<DD>Sending or receiving data 1 bit at a time.</DD>
554<DT>socket</DT>
555<DD>A two-way network communications channel.</DD>
6a921799 556</DL>
baee2cec 557<H2><A NAME="4_2">A.2 Acronyms</A></H2>
8db62627 558<DL>
7159de3d 559<DT>ASCII</DT>
560<DD>American Standard Code for Information Interchange</DD>
561<DT>CUPS</DT>
562<DD>Common UNIX Printing System</DD>
563<DT>ESC/P</DT>
564<DD>EPSON Standard Code for Printers</DD>
565<DT>FTP</DT>
566<DD>File Transfer Protocol</DD>
567<DT>HP-GL</DT>
568<DD>Hewlett-Packard Graphics Language</DD>
569<DT>HP-PCL</DT>
570<DD>Hewlett-Packard Page Control Language</DD>
571<DT>HP-PJL</DT>
572<DD>Hewlett-Packard Printer Job Language</DD>
573<DT>IETF</DT>
574<DD>Internet Engineering Task Force</DD>
575<DT>IPP</DT>
576<DD>Internet Printing Protocol</DD>
577<DT>ISO</DT>
578<DD>International Standards Organization</DD>
579<DT>LPD</DT>
580<DD>Line Printer Daemon</DD>
581<DT>MIME</DT>
582<DD>Multimedia Internet Mail Exchange</DD>
583<DT>PPD</DT>
584<DD>PostScript Printer Description</DD>
585<DT>SMB</DT>
586<DD>Server Message Block</DD>
587<DT>TFTP</DT>
588<DD>Trivial File Transfer Protocol</DD>
8db62627 589</DL>
590</BODY>
591</HTML>