• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/LPRng/DOCS/LPRng-Reference-Multipart/
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>Authorization and Quotas</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="Accounting " href="accountingref.htm">
12    <link rel="PREVIOUS" title="Accounting File" href="x9696.htm">
13    <link rel="NEXT" title=
14    "Accessing Printer Hardware Pagecounters" href="x9761.htm">
15  </head>
16
17  <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link=
18  "#0000FF" vlink="#840084" alink="#0000FF">
19    <div class="NAVHEADER">
20      <table summary="Header navigation table" width="100%" border=
21      "0" cellpadding="0" cellspacing="0">
22        <tr>
23          <th colspan="3" align="center">LPRng Reference Manual: 5
24          Sep 2003 (For LPRng-3.8.22)</th>
25        </tr>
26
27        <tr>
28          <td width="10%" align="left" valign="bottom"><a href=
29          "x9696.htm" accesskey="P">Prev</a></td>
30
31          <td width="80%" align="center" valign="bottom">Chapter
32          18. Accounting</td>
33
34          <td width="10%" align="right" valign="bottom"><a href=
35          "x9761.htm" accesskey="N">Next</a></td>
36        </tr>
37      </table>
38      <hr align="LEFT" width="100%">
39    </div>
40
41    <div class="SECT1">
42      <h1 class="SECT1"><a name="AEN9736">18.4. Authorization and
43      Quotas</a></h1>
44
45      <p>In addition to simply recording accounting information the
46      accounting procedures can be used to check print quotas or
47      update databases. This is done by using the Accounting Check
48      <var class="LITERAL">:achk</var> flag and the <var class=
49      "LITERAL">:as</var>, <var class="LITERAL">:ae</var>, and <var
50      class="LITERAL">:af</var> network connection or program
51      capabilities.</p>
52
53      <p>If the <var class="LITERAL">:achk</var> flag is set and
54      the <var class="LITERAL">:as=</var> option specifies a
55      program to be run, or the <var class="LITERAL">:af=</var>
56      option specifies a program to be run or a network connection
57      then output of the program or information read from the
58      network connection is used to control the handling of the
59      job. If the <var class="LITERAL">:as=</var> option specifies
60      a program to be run then the program is run and the exit code
61      and output is saved. If the <var class="LITERAL">:as=</var>
62      option specifies a string and the <var class=
63      "LITERAL">:af=</var> option specifies a program to be run or
64      a remote host to be contacted then the <var class=
65      "LITERAL">:as=</var> value is written to the program STDIN or
66      remote host. The program STDOUT or network connection is read
67      and saved and the program exit code is saved.</p>
68
69      <p>If the information was read from a program, then the exit
70      code of the program is checked:</p>
71
72      <div class="INFORMALEXAMPLE">
73        <a name="AEN9752"></a>
74<pre class="SCREEN">
75    Exit Code    Action
76    JSUCC (0)    process data read
77    JFAIL        retry with JFAIL status
78    JHOLD        hold job
79    JREMOVE      remove job
80    JABORT       abort processing jobs
81    other        abort processing jobs
82</pre>
83      </div>
84      <br>
85      <br>
86
87      <p>If the information was read from a network connection or
88      the program exited with JSUCC (0) then the start of the first
89      line of the information read is used. If this line starts
90      with the following case insensitive words then the following
91      actions are taken:</p>
92
93      <div class="INFORMALEXAMPLE">
94        <a name="AEN9755"></a>
95<pre class="SCREEN">
96    Word         Action
97    (blank)      process job
98    ACCEPT       process job
99    FAIL         retry with JFAIL status
100    HOLD         hold job
101    REMOVE       remove job
102    (other)      abort processing jobs
103</pre>
104      </div>
105      <br>
106      <br>
107
108      <p>These facilities can be used to implement a wide variety
109      of quota mechanisms. The most simple method is to create a
110      script or program that can be run as the <var class=
111      "LITERAL">:as=</var> program. This would connect to a
112      database server or check a database to see if user quotas had
113      been exceeded. If they had, then it would return a <var
114      class="LITERAL">REMOVE</var> or <var class=
115      "LITERAL">HOLD</var> status as appropriate.</p>
116    </div>
117
118    <div class="NAVFOOTER">
119      <hr align="LEFT" width="100%">
120
121      <table summary="Footer navigation table" width="100%" border=
122      "0" cellpadding="0" cellspacing="0">
123        <tr>
124          <td width="33%" align="left" valign="top"><a href=
125          "x9696.htm" accesskey="P">Prev</a></td>
126
127          <td width="34%" align="center" valign="top"><a href=
128          "index.htm" accesskey="H">Home</a></td>
129
130          <td width="33%" align="right" valign="top"><a href=
131          "x9761.htm" accesskey="N">Next</a></td>
132        </tr>
133
134        <tr>
135          <td width="33%" align="left" valign="top">Accounting
136          File</td>
137
138          <td width="34%" align="center" valign="top"><a href=
139          "accountingref.htm" accesskey="U">Up</a></td>
140
141          <td width="33%" align="right" valign="top">Accessing
142          Printer Hardware Pagecounters</td>
143        </tr>
144      </table>
145    </div>
146  </body>
147</html>
148
149