1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 3<html> 4 <head> 5 <meta name="generator" content="HTML Tidy, see www.w3.org"> 6 <title>Protocol Requests and Replies</title> 7 <meta name="GENERATOR" content= 8 "Modular DocBook HTML Stylesheet Version 1.7"> 9 <link rel="HOME" title=" LPRng Reference Manual" href= 10 "index.htm"> 11 <link rel="UP" title="RFC 1179 - Line Printer Daemon Protocol " 12 href="rfc1179ref.htm"> 13 <link rel="PREVIOUS" title= 14 "RFC 1179 - Line Printer Daemon Protocol " href= 15 "rfc1179ref.htm"> 16 <link rel="NEXT" title="Job Transfer " href="jobtransfer.htm"> 17 </head> 18 19 <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link= 20 "#0000FF" vlink="#840084" alink="#0000FF"> 21 <div class="NAVHEADER"> 22 <table summary="Header navigation table" width="100%" border= 23 "0" cellpadding="0" cellspacing="0"> 24 <tr> 25 <th colspan="3" align="center">LPRng Reference Manual: 5 26 Sep 2003 (For LPRng-3.8.22)</th> 27 </tr> 28 29 <tr> 30 <td width="10%" align="left" valign="bottom"><a href= 31 "rfc1179ref.htm" accesskey="P">Prev</a></td> 32 33 <td width="80%" align="center" valign="bottom">Chapter 34 19. RFC 1179 - Line Printer Daemon Protocol</td> 35 36 <td width="10%" align="right" valign="bottom"><a href= 37 "jobtransfer.htm" accesskey="N">Next</a></td> 38 </tr> 39 </table> 40 <hr align="LEFT" width="100%"> 41 </div> 42 43 <div class="SECT1"> 44 <h1 class="SECT1"><a name="REMOTESUPPORT">19.2. Protocol 45 Requests and Replies</a></h1> 46 47 <p>Options used:</p> 48 49 <ul> 50 <li> 51 <p><var class="LITERAL">remote_support=</var><span class= 52 "emphasis"><i class="EMPHASIS">Remote operations 53 supported</i></span></p> 54 </li> 55 </ul> 56 <br> 57 <br> 58 59 <p>After a connection has been established, a request can be 60 sent to the <b class="APPLICATION">lpd</b> server. The 61 request consists of a single octet indicating the request 62 type, followed by the printer (or print queue) name, followed 63 by a set of options for the request, followed by a LF (line 64 feed) character.</p> 65 66 <div class="TABLE"> 67 <a name="RF1179COMMANDS"></a> 68 69 <p><b>Table 19-1. RFC1179 Commands</b></p> 70 71 <table border="1" frame="border" rules="all" class= 72 "CALSTABLE"> 73 <col> 74 <col> 75 <col> 76 <col> 77 78 <thead> 79 <tr> 80 <th>NNN</th> 81 82 <th>RFC1179</th> 83 84 <th>Operation</th> 85 86 <th>program</th> 87 </tr> 88 </thead> 89 90 <tbody> 91 <tr> 92 <td>1</td> 93 94 <td>yes</td> 95 96 <td>start print</td> 97 98 <td><b class="APPLICATION">lpc</b></td> 99 </tr> 100 101 <tr> 102 <td>2</td> 103 104 <td>yes</td> 105 106 <td>transfer a printer job</td> 107 108 <td><b class="APPLICATION">lpr</b></td> 109 </tr> 110 111 <tr> 112 <td>3</td> 113 114 <td>yes</td> 115 116 <td>print short form of queue status</td> 117 118 <td><b class="APPLICATION">lpr</b></td> 119 </tr> 120 121 <tr> 122 <td>4</td> 123 124 <td>yes</td> 125 126 <td>print long form of queue status</td> 127 128 <td><b class="APPLICATION">lpr</b></td> 129 </tr> 130 131 <tr> 132 <td>5</td> 133 134 <td>yes</td> 135 136 <td>remove jobs</td> 137 138 <td><b class="APPLICATION">lprm</b></td> 139 </tr> 140 141 <tr> 142 <td>6</td> 143 144 <td><b class="APPLICATION">LPRng</b></td> 145 146 <td>do control operation</td> 147 148 <td><b class="APPLICATION">lpc</b></td> 149 </tr> 150 151 <tr> 152 <td>7</td> 153 154 <td><b class="APPLICATION">LPRng</b></td> 155 156 <td>transfer a block format print job</td> 157 158 <td><b class="APPLICATION">lpr</b></td> 159 </tr> 160 161 <tr> 162 <td>8</td> 163 164 <td><b class="APPLICATION">LPRng</b></td> 165 166 <td>secure command transfer</td> 167 168 <td><b class="APPLICATION">lpc</b></td> 169 </tr> 170 171 <tr> 172 <td>9</td> 173 174 <td><b class="APPLICATION">LPRng</b></td> 175 176 <td>verbose status information</td> 177 178 <td><b class="APPLICATION">lpr</b></td> 179 </tr> 180 </tbody> 181 </table> 182 </div> 183 184 <p>After the request has been sent, then a reply will be 185 returned. In general the reply has the following form:</p> 186 187 <div class="INFORMALEXAMPLE"> 188 <a name="AEN10059"></a> 189<pre class="SCREEN"> 190 \000\n Success 191 \NNN\n Failure (NNN is error code) 192 text\n Text or status information 193</pre> 194 </div> 195 <br> 196 <br> 197 198 <p>As can be seen, this protocol is extremely simple, but 199 there are a set of problems due to the loosely written 200 language of RFC1179.</p> 201 202 <ol type="1"> 203 <li> 204 <p>Firstly, while RFC1179 sets limits on the lengths of 205 commands, it does not strictly set limits on the 206 characters set used in the commands. This can result in 207 problems when trying to print status information, headers 208 on banners, and other details.</p> 209 </li> 210 211 <li> 212 <p>The original RFC1179 protocol did not provide any way 213 to do remote control of queues or <b class= 214 "APPLICATION">lpd</b> servers. This has been added to the 215 protocol. As a side effect, if you try to use <b class= 216 "APPLICATION">lpc</b> to control a non-<b class= 217 "APPLICATION">LPRng</b> printer, it will not work.</p> 218 </li> 219 220 <li> 221 <p>You can specify that a network printer is non-<b 222 class="APPLICATION">LPRng</b> by using the <var class= 223 "LITERAL">remote_support=RQVMC</var> option and specify 224 the operations supported by the printer. The letters R, 225 Q, M, and C stand for <b class="APPLICATION">lpr</b>, <b 226 class="APPLICATION">lpq</b>, <b class= 227 "APPLICATION">lprm</b>, and <b class= 228 "APPLICATION">lpc</b> operations respectively, and 229 indicate that these are supported. If <var class= 230 "LITERAL">remote_support</var> does not allow a 231 particular operation, then the <b class= 232 "APPLICATION">LPRng</b> software will not send a 233 corresponding request to the printer. For example, <var 234 class="LITERAL">remote_support=R</var> would restrict 235 operations to spooling jobs only, and the <b class= 236 "APPLICATION">LPRng</b> software would not query the 237 printer for status.</p> 238 </li> 239 </ol> 240 <br> 241 <br> 242 </div> 243 244 <div class="NAVFOOTER"> 245 <hr align="LEFT" width="100%"> 246 247 <table summary="Footer navigation table" width="100%" border= 248 "0" cellpadding="0" cellspacing="0"> 249 <tr> 250 <td width="33%" align="left" valign="top"><a href= 251 "rfc1179ref.htm" accesskey="P">Prev</a></td> 252 253 <td width="34%" align="center" valign="top"><a href= 254 "index.htm" accesskey="H">Home</a></td> 255 256 <td width="33%" align="right" valign="top"><a href= 257 "jobtransfer.htm" accesskey="N">Next</a></td> 258 </tr> 259 260 <tr> 261 <td width="33%" align="left" valign="top">RFC 1179 - Line 262 Printer Daemon Protocol</td> 263 264 <td width="34%" align="center" valign="top"><a href= 265 "rfc1179ref.htm" accesskey="U">Up</a></td> 266 267 <td width="33%" align="right" valign="top">Job 268 Transfer</td> 269 </tr> 270 </table> 271 </div> 272 </body> 273</html> 274 275