rfc-3998

Internet Printing Protocol (IPP): Job and Printer Administrative Operations

C. Kugler, H. Lewis, T. Hastings (Editor)
date2005-03 streamIETF areaapp wgipp statusPROPOSED STANDARD pages46 canonicalhttps://www.rfc-editor.org/rfc/rfc3998 doi10.17487/RFC3998 errataview
This document specifies the following 16 additional OPTIONAL system administration operations for use with the Internet Printing Protocol/1.1 (IPP), plus a few associated attributes, values, and status codes, and using the IPP Printer object to manage printer fan-out and fan-in. (Printer operations: Enable-Printer and Disable-Printer, Pause-Printer-After-Current-Job, Hold-New-Jobs and Release-Held-New-Jobs, Deactivate-Printer and Activate-Printer, Restart-Printer, Shutdown-Printer and Startup-Printer. Job operations: Reprocess-Job, Cancel-Current-Job, Suspend-Current-Job, Resume-Job, Promote-Job, Schedule-Job-After.) [STANDARDS-TRACK]

Extracted elements (29)

design-rationale §4.2

Cancel-Current-Job and Suspend-Current-Job both expose a race condition on shared printers: between the user issuing the operation and its acceptance, the current job may change. The optional 'job-id' attribute mitigates this race by verifying the intended job is still current before acting.

design-rationale §3.1

Enable/Disable Printer operations independently control the 'input of new jobs' to the IPP Printer, while Pause/Resume operations independently control the 'output of new jobs' to the Output Device. This orthogonal design allows operators to separately gate job intake and job dispatch.

design-rationale §4.4.2

Schedule-Job-After does not retain any persistent link between the two jobs after positioning; no attribute on either job points to the other. The relationship is a one-time scheduling placement, not a durable dependency, so subsequent Schedule-Job-After operations can freely reorder jobs.

design-rationale §10.7.2

The Non-Leaf Printer object either keeps a fully formed Job object or just maintains a mapping from the job-ids it assigned to those assigned by its Subordinate Printer — this is explicitly IMPLEMENTATION-DEPENDENT. In either case the Non-Leaf Printer MUST be able to carry out future Job operations specifying the job-id it returned to the submitting client.

interoperability-note §10.5

During Fan-Out/Fan-In tree reconfiguration, there can be moments of inconsistency where 'subordinate-printers-supported' and 'parent-printers-supported' are not mutually consistent. The recommended practice is to Deactivate all affected Printers first, update all pointer attributes, then reactivate them.

normative-requirement §10.1 MUST

A Subordinate Printer object MUST be a conforming IPP Printer object, supporting all REQUIRED RFC 2911 operations and attributes. Non-Leaf Printer objects MUST NOT have an associated Output Device; only Leaf Printer objects may have one or more associated Output Devices.

normative-requirement §3.2.1 MUST NOT

After receiving Pause-Printer-After-Current-Job, the IPP Printer MUST complete sending any job already in progress to an Output Device or Subordinate Printer, but MUST NOT send any additional jobs, and additional jobs MUST NOT enter the 'processing' state. This operation MUST NOT affect the acceptance of Job Creation requests.

normative-requirement §3 MUST

All 16 operations defined in this document are OPTIONAL for an IPP object to support. Many operations come in pairs; if either operation in a pair is implemented, both MUST be supported.

normative-requirement §3.4.1 MUST

Deactivate-Printer atomically performs Disable-Printer and Pause-Printer-After-Current-Job, then immediately rejects all requests except Activate-Printer, query operations (Get-*), Send-Document, and Send-URI, returning 'server-error-service-unavailable'. The Printer MUST immediately set the 'deactivated' value in printer-state-reasons.

normative-requirement §3.1.1 MUST

Disable-Printer causes the Printer to reject subsequent Job Creation operations and return 'server-error-not-accepting-jobs'. The IPP Printer MUST accept the request in any state and set 'printer-is-accepting-jobs' to 'false'; it has no effect on printer-state or processing of existing jobs.

normative-requirement §4.2 MUST

For Cancel-Current-Job, if the client supplies 'job-id' and the identified job is not the current job (not in 'processing' or 'processing-stopped' state), the Printer MUST reject the request with 'client-error-not-possible'. If no job-id is supplied and no current job exists, the Printer MUST also return 'client-error-not-possible'.

normative-requirement §3.3.1 MUST

Hold-New-Jobs causes the Printer to complete all current 'pending' and 'processing' jobs but place any subsequently created jobs into 'pending-held' with 'job-held-on-create' in job-state-reasons. The Printer MUST accept the request in any state, MUST NOT change printer-state, and MUST add 'hold-new-jobs' to printer-state-reasons.

normative-requirement §10.7.1 MUST NOT

In Fan-Out configurations, Non-Leaf IPP Printer objects MUST NOT forward Printer-affecting operations (Enable-Printer, Disable-Printer, Hold-New-Jobs, Deactivate-Printer, Activate-Printer, Restart-Printer, Shutdown-Printer, Startup-Printer, Get-Printer-Attributes, Pause-Printer, Resume-Printer, Set-Printer-Attributes) to any Subordinate Printer. Clients targeting a Subordinate Printer MUST specify its URI directly.

normative-requirement §10.7.2 MUST

Non-Leaf Printer objects MUST forward operations that directly affect jobs to the appropriate Subordinate Printer(s), including Print-Job, Print-URI, Create-Job, Send-Document, Cancel-Job, Hold-Job, Release-Job, Restart-Job, Get-Jobs, and Purge-Jobs. Forwarding is done on a best-efforts basis and the Non-Leaf Printer responds to its client without waiting for Subordinate Printer responses.

normative-requirement §4.1 MUST

Reprocess-Job creates a new Job with new job-uri and job-id that is a copy of a retained completed, canceled, or aborted job; the target job is left unchanged. Job progress attributes (job-impressions-completed, etc.) are initialized to 0 in the new job, and if Set-Job-Attributes is supported, 'job-hold-until' with at least 'indefinite' MUST be supported.

normative-requirement §3.5.1 MUST

Restart-Printer MUST attempt to save job and printer information before re-initializing. After restart, printer-state MUST be initialized to 'idle', state reasons cleared, and printer-is-accepting-jobs set to 'true'. Clients SHOULD first try Deactivate-Printer to minimize disruption, as Restart-Printer may have drastic consequences.

normative-requirement §4.4.2 MUST

Schedule-Job-After MUST reject the request if the target job is not in 'pending' state or the predecessor job is not in 'pending', 'processing', or 'processing-stopped' state, returning 'client-error-not-possible'. The 'predecessor-job-id' attribute MUST be supported by the Printer if it supports this operation.

normative-requirement §3.5.3 MUST

Startup-Printer MUST be accepted only when the Printer object has not yet been initiated; if a Printer object already exists, the host MUST return 'client-error-not-possible'. After startup, printer-state MUST be 'idle' with printer-is-accepting-jobs set to 'false' so the operator can reconfigure before enabling.

normative-requirement §4.3 MUST

Suspend-Current-Job and Resume-Job MUST both be supported if either is supported. The Printer MUST reject a Suspend-Current-Job for a job already in 'processing-stopped' with 'job-suspended' in job-state-reasons. Resume-Job moves the job to 'pending' and removes 'job-suspended' from job-state-reasons.

normative-requirement §6 MUST NOT

The 'printer-message-from-operator' operation attribute is OPTIONAL for all Printer administrative operations but MUST NOT be supplied in Get-Printer-Attributes or Set-Printer-Attributes operations; the Printer MUST ignore it in those two operations. To set the message via Set-Printer-Attributes, the client MUST supply it as an explicit attribute being set.

protocol-element §5.1

New status code 'server-error-printer-is-deactivated' (0x050A) indicates the Printer has been deactivated and is only accepting Activate-Printer, Get-Job-Attributes, Get-Jobs, Get-Printer-Attributes, and other Get-Xxxx query operations.

protocol-element §7.2

'parent-printers-supported' (1setOf uri) Printer Description attribute is REQUIRED if an implementation supports Subordinate Printers and contains the URI(s) of the Non-Leaf Printer(s) for which this Printer is the immediate Subordinate. Each Subordinate Printer MUST support this attribute.

protocol-element §4

Six new Job administrative operations are defined with Operation-Id assignments: Reprocess-Job (0x2C), Cancel-Current-Job (0x2D), Suspend-Current-Job (0x2E), Resume-Job (0x2F), Promote-Job (0x30), and Schedule-Job-After (0x31).

protocol-element §7.1

'subordinate-printers-supported' (1setOf uri) Printer Description attribute is REQUIRED if an implementation supports Subordinate Printers and contains the URIs of immediate Subordinate Printer objects. Each Non-Leaf Printer MUST support this attribute; Leaf Printers either omit it or use the 'no-value' out-of-band value.

protocol-element §3

Ten new Printer administrative operations are defined with Operation-Id assignments: Enable-Printer (0x22), Disable-Printer (0x23), Pause-Printer-After-Current-Job (0x24), Hold-New-Jobs (0x25), Release-Held-New-Jobs (0x26), Deactivate-Printer (0x27), Activate-Printer (0x28), Restart-Printer (0x29), Shutdown-Printer (0x2A), and Startup-Printer (0x2B).

protocol-element §8

Three new state reason values are defined: 'hold-new-jobs' for printer-state-reasons (set by Hold-New-Jobs operation), 'deactivated' for printer-state-reasons (set by Deactivate-Printer), and 'job-suspended' for job-state-reasons (set by Suspend-Current-Job and removed by Resume-Job).

registry §14

This document registers with IANA: 10 Printer operation codes (0x22–0x2B), 6 Job operation codes (0x2C–0x31), 2 new Printer Description attributes (subordinate-printers-supported, parent-printers-supported), 1 new operation/Job Description attribute (original-requesting-user-name), 2 new printer-state-reasons enum values ('hold-new-jobs', 'deactivated'), 1 new job-state-reasons value ('job-suspended'), and 1 new status code (server-error-printer-is-deactivated, 0x050A).

registry

security-consideration §16

All administrative Printer and Job operations defined in this document require the authenticated user to be an operator or administrator of the Printer object as defined in RFC 2911 sections 1 and 8.5. Job operations (Cancel-Current-Job, Suspend-Current-Job, Resume-Job) additionally permit the job owner. The security model is inherited from RFC 2911.

security

state-machine §3.2.1

Pause-Printer-After-Current-Job defines four state transitions: 'idle'→'stopped'/'paused' (REQUIRED); 'processing'→'processing'/'moving-to-paused' then later →'stopped'/'paused' when mid-job completes (OPTIONAL); 'processing'→'stopped'/'paused' when not mid-job (REQUIRED); 'stopped'→'stopped'/'paused' (REQUIRED). The Printer MUST complete the current in-flight job before stopping.