(c) Copyright 1990, 1994 Novell, Inc. All rights reserved. No part of this publication may be reproduced, photocopied, stored on a retrieval system, or transmitted without the express prior written consent of the publisher.
ABOUT THIS DOCUMENT
This document provides technical information about the services and features of the NetWare Print Server. It also provides the necessary information for using protocol packets.
The NetWare Print Server version 4.00 is available in only one configuration: NetWare Loadable Module (NLM). It will operate with any file server using NetWare 4.0 or newer. The print server will service queues on several different file servers at once. The Netware 4.0 print server has four different job scheduling methods or queue service modes, and it will support up to 255 printers.
Clients can communicate with the print server from the PConsole utility. (The print server console has been enhanced, but still has limited use compared to features of the 4.0 PConsole.) The print server uses NetWare's Service Advertising Protocol (SAP) to advertise its presence on the internet, allowing clients to locate the print server from anywhere on the internet. The print server uses Sequenced Packet Exchange Protocol (SPX) to communicate with clients and remote printers. The print server can notify clients when their print jobs are finished. It can also notify a list of clients when a printer needs attention. Examples of situations requiring attention are when a new form needs to be mounted or when a printer is out of paper. NetWare also provides a set of API functions to allow application programs to communicate with the print server.
The NetWare Print Server uses the NetWare NCP server's name service (bindery or 4.0 Directory Services) to learn a client's access rights to the print server. Clients can add, delete, and modify printers without taking the file server down.
The print server is configured using the PConsole utility operating in either Bindery Mode or in Directory Services Mode. The difference between the two modes is due to the creation of Printer objects in the NetWare 4.0 Directory Services database. The older bindery design uses files kept in the print server's object directory. The print server determines the operating parameters by reading configuration files defined as stream attributes of the Directory Services database. When the PConsole utility operating in Directory Services Mode creates a Print Server directory object, it also creates Printer directory objects that contain the printer configuration stream attributes. When the PConsole utility operating in "bindery mode" creates a PRINT_SERVER bindery object, it also creates a file directory in SYS:SYSTEM for maintaining printer configuration information.
When a print job is sent to the print server, the print server has access to the Print Queue Record structure, including the Client Record Area (See Appendix G).
PRINT SERVER BINDERY OBJECTS
The NetWare 3.11 Print Server design uses the bindery to contain the configuration of queues, printers, and print servers. The NetWare 4.0 Print Server design was enhanced to contain printers as a Directory object instead of a collection of matching files within a print server's file directory. The bindery objects are explained below. This will be followed by a discussion of how the Directory objects and their attributes relate to the bindery objects and their properties.
There are two types of print server bindery objects: the print server object and the advertising print server object. The print server object is static and the advertising print server object is dynamic.
The PRINT_SERVER bindery object is created (and can be modified) by the system supervisor from the PConsole utility and gives the print server access rights to file servers. The properties of a PRINT_SERVER bindery object are ACCOUNT_BALANCE, LOGIN_CONTROL, PASSWORDS, OLDPASSWORDS, PS_USERS, PS_OPERATORS, and IDENTIFICATION. The object type of a PRINT_SERVER is 7h.
When a print server advertises on the internet, the NetWare router creates an ADVERTISING_PRINT_SERVER bindery object. ADVERTISING_PRINT_SERVER bindery objects have bindery level security and cannot be deleted by the system supervisor. They are, however, automatically deleted by the router when the file server or the print server goes down (a characteristic of dynamic bindery objects). The object type of an ADVERTISING_PRINT_SERVER is 47h (71 decimal).
PRINT SERVER CLIENTS
There are two types of print server clients: users and operators. Users may request status information from the print server. Operators may also request status information from the print server as well as control the way the print server handles print jobs. Chapter 2, "Protocol Packets," specifies which functions clients may use.
PRINT QUEUE BINDERY PROPERTY TYPES
There are four types of print queue bindery properties: Q_USERS, Q_OPERATORS, Q_SERVERS, and Q_DIRECTORY. Q_USERS can submit print jobs to the queue and can modify or delete their own jobs. Q- _OPERATORS can manage any print jobs that are in the queue. Q_SERVERS service the print jobs that are in the queue. Q_DIRECTORY contains the name of the directory where the queue jobs are stored.DIFFERENCES BETWEEN 3.11 BINDERY AND 4.0 DIRECTORY
The print server configuration is different because Printer Directory objects have no counterpart in the bindery, and the corresponding Print Server Directory object has an additional attribute that refers to the configured Printer objects. The following Bindery Objects and properties are translated into Directory objects and attributes during the installation process. For more information about upgrading from 3.11 Bindery to 4.0 Directory Services, see the PUPGRADE.NLM Design Specification.
Queue Objects
OT_PRINT_QUEUE Bindery object
The OT_PRINT_QUEUE object is translated to the Queue Directory object and should contain all of the following properties: Q_USERS, Q_OPERATORS, Q_SERVERS, and Q_DIRECTORY. All of the OT_PRINT_QUEUE properties translate to the attributes of Queue.
Queue Directory object
The Queue object is translated from the OT_PRINT_QUEUE Bindery object and should contain all of the following attributes: User, Operator, Server, Queue Directory, Host Server, Network Address and Volume. The first four attributes are translated from the OT_PRINT_QUEUE properties.
Print Server Objects
OT_PRINT_SERVER Bindery Object and Properties
The OT_PRINT_SERVER Bindery object is translated to the Print Server Directory object and should contain all of the following properties: IDENTIFICATION, PS_OPERATORS, PS_USERS, LOGIN_CONTROL, and PASSWORD. The first three properties of OT_PRINT_SERVER translate to the first three attributes of Print Server.
Print Server Directory Object and Attributes
The Print Server Directory object is translated from the OT_PRINT_SERVER Bindery object and should contain all of the following attributes: Description, Operator, User, SAP Name, Printer, Host Device, Private Key, and Public Key. The first three properties of OT_PRINT_SERVER translate to the first three attributes of Print Server.
Record Format for PRINT.IDX
PRINT.IDX consists of one 12240-byte array. It represents each of the possible 255 (0-254) PRINT.nnn files and contains up to 255 48-byte records with the following structure:
Field Name Length/Type Description
printerName 48 uint8 Null-terminated
The size of the file represents the greatest printer number in use, i.e. if the maximum printer number configured is 3 then the file is only (3+1)*48 bytes long. The data in the file is sparsely allocated so that the position of a printer name in the file implies its printer number and thus the corresponding PRINT.nnn name. This file was added for performance reasons.
Record Format for PRINT.nnn
PRINT.nnn consists of one 70-byte record with the following structure:
Field Name Length/Type Description
printerName 48 uint8 Null-terminated
printerSubtype uint16
useInterrupts uint16 Boolean
irqNumber uint16
serviceMode uint16
bufferSize uint16
baudRate uint16 Serial only; zero otherwise.
dataBits uint16 Serial only; zero otherwise.
stopBits uint16 Serial only; zero otherwise.
parity uint16 Serial only; zero otherwise.
useXonXoff uint16 Serial only, boolean; zero otherwise.
currentForm uint16
Record Format for QUEUE.nnn
QUEUE.nnn consists of multiple 49-byte records with the following structure:
Field Name Length/Type Description
queueName 48 uint8 Null-terminated
priority uint8 1-10
Record Format for NOTIFY.nnn
NOTIFY.nnn consists of multiple 54-byte records with the following structure:
Field Name Length/Type Description
objectName 48 uint8 Null-terminated
objectType uint16 OT_USER or OT_USER_GROUP
initialNotify uint16
repeatInterval uint16
Record Format for FILESERV
FILESERV consists of multiple records, 48 characters long, with the following structure:
Field Name Length/Type Description
serverName 48 uint8 Null-terminated
Code Needed to Translate From Old Bindery Configuration File Format
The API calls needed to do format conversion from the old Bindery Source Files are NWPSApiConfigToFileConfig and NWPSFileConfigToApiConfig. The calls' syntax, possible PRINT.nnn values and the printer configuration structures can be found in the NWPS_CFG.H include file. For more information, see Appendix K.PRINT SERVER - CLIENT COMMUNICATION
To communicate with a print server, the client must establish an SPX connection. Issuing the NWPSRV Library call "NWPSComAttachToPrintServer" will do this. Clients can also establish an SPX connection by taking the following steps:
1. If the shell is loaded:
a. Scan the bindery.
b. Locate a print server.
c. Get the network address of the print server from the NET_ADDRESS property.
d. Use the network address to establish the SPX connection.
2. If no shell is loaded:
a. Use NetWare's Service Advertising Protocol (SAP) to get the network address of the print server.
b. Use the network address to establish the SPX connection.
Once the SPX connection is established, the client can login to the print server to establish rights as an operator or user. Once logged in, the client can communicate with the print server using the print server protocol packets or the NWPSRV Library functions. Terminating the SPX connection will log the client out of the print server.
Protocol packets must conform to the following format:
PROTOCOL PACKET FORMAT
Request Packet
Offset Field Size Data Type
0 SPX Header 42 bytes *
42 Print Server Function 1 byte uint8
43 Request data Variable (See Chapter 2, "Protocol Packets")
Reply Packet
Offset Field Size Data Type
0 SPX Header 42 bytes *
42 Reply data Variable (See Chapter 2, "Protocol Packets")
Clients must wait for a reply packet before sending another request packet.
* See the NetWare System Interface Technical Overview: Chapter 4, "Communication Services".SERVICE MODES
This section describes the relationship between queues and printers and how printers service those queues. There are 4 Service Modes, each of which describes an algorithm that a printer should use to service its queues.
The print server maintains a list of print queues for each printer. Each queue has an assigned queue priority and may contain several print jobs waiting to be serviced. The print server will request print jobs from the highest priority queue before proceeding to the next queue. If two or more queues have the same priority, the jobs will be requested from each queue alternately.
The print server tracks which forms have been mounted on each printer. Depending on the service mode, the print server may request print jobs that require a particular form. The form required by a print job is called the Print Job Form. A form currently mounted in a printer is called a Mounted Form.
Where a print job is positioned in a queue is called the Job Position. The first print job in the queue is Job Position 1, the second is Job Position 2, and so on.
The queue priority, the job position, the mounted form, and the print job form are the factors the print server uses to decide which print job gets printed next. The precedence of these factors is given for each service mode as follows:
SERVICE MODE 0 - CHANGE FORMS AS NEEDED:
This mode prints all the jobs in the highest priority queue, in order of job position, then advances to the next queue. (The NetWare print process before Print Server version 1.00 serviced jobs in this way.)
Steps: 1. Start at the highest priority queue.
2. Request the print job in the next job position.
3. If no print jobs are waiting to be serviced, advance to the next queue and goto step 2.
4. If no more queues are waiting to be serviced, delay 15 seconds and goto step 1.
SERVICE MODE 1 - MINIMIZE FORM CHANGES WITHIN QUEUES:
This mode prints all jobs in the highest priority queue, using the requested form as the primary selection key and the job position as the secondary selection key, then it repeats this process for the lower priority queues.
Steps: 1. Start at the highest priority queue.
2. Request a print job which requires the mounted form.
3. If no print jobs which require the mounted form are waiting to be serviced, request the print job in the next position.
4. If no print jobs are waiting to be serviced, advance to the next queue and goto step 2.
5. If no more queues are waiting to be serviced, delay 15 seconds and goto step 1.
SERVICE MODE 2 - NEVER CHANGE FORMS:
This mode prints only those jobs which require the mounted form beginning at the highest priority queue. The mounted form does not change in this mode.
Steps: 1. Start at the highest priority queue.
2. Request a print job which requires the mounted form.
3. If no print jobs which require the mounted form are waiting to be serviced, advance to the next queue and goto step 2.
4. If no more queues are waiting to be serviced, delay 15 seconds and goto step 1.
SERVICE MODE 3 - MINIMIZE FORM CHANGES ACROSS QUEUES:
This mode prints all the jobs which require the mounted form, beginning at the highest priority queue. It then searches the other queues (in order of priority) for print jobs which require the mounted form. If no print jobs which require the mounted form are waiting to be serviced in any queue, then it requests print jobs which require any form, beginning at the highest priority queue.
Steps: 1. Start at the highest priority queue.
2. Request a print job which requires the mounted form.
3. If no print jobs which require the mounted form are waiting to be serviced, advance to the next queue and goto step 2.
4. If no more queues are waiting to be serviced, start at the highest priority queue.
5. Request the print job in the next job position.
6. If no print jobs are waiting to be serviced, advance to the next queue and goto step 5.
7. If no more queues are waiting to be serviced, delay 15 seconds and goto step 1.
CHAPTER 2
PROTOCOL PACKETS
An SPX connection must be established before a protocol packet can be issued successfully. See Chapter 1, "Print Server - Client Communication" for information on how to establish an SPX connection.
For protocol packets that use the parameter jobOutcome, if jobOutcome is NWPS_RETURN_TO_QUEUE, the job control flag to restart a job must be set first or this parameter will not work. See Job Control Flags in the Queue Job section of Appendix G, "Record Structures."
If the SPX connection is terminated unexpectedly, NWPSE_CONNECTION_TERMINATED will be returned in the Event Control Block (ECB). See the NetWare System Interface Technical Overview: Chapter 4, "Communication Services" for information on ECBs.
The packet descriptions are organized first by the NetWare 3.11 subset and then by the NetWare 4.00 and 4.10 additions.
.NetWare 3.11 subset
Abort Print Job (for operators and users)
This packet aborts the current print job.
Request Format
FunctionNumber uint8 0x0E
PrinterNumber uint8 0 to maximum number of printers minus 1.
JobOutcome uint8 1 - NWPS_RETURN_TO_QUEUE
2 - NWPS_THROW_AWAY
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0303 NWPSE_INVALID_PARAMETER
0x0305 NWPSE_NOT_CONNECTED
0x0306 NWPSE_GOING_DOWN
0x0309 NWPSE_NO_JOB_ACTIVE
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
This packet clears the buffer. One blank page will be ejected unless suppress form feed is set.
Add Notify Object (for operators only)
This packet adds an object to the print server's list of objects to be notified when a printer needs attention (such as mounting forms, printer off-line, out of paper).
Request Format
FunctionNumber uint8 0x16
PrinterNumber uint8 0 to maximum number of printers minus 1.
FileServerName uint8[48]
ObjectName uint8[48]
ObjectType uint16
FirstNotice uint16 Number of seconds to wait before 1st notice.
Interval uint16 Number of seconds between following notices.
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_OBJECT
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0305 NWPSE_NOT_CONNECTED
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030B NWPSE_ALREADY_IN_LIST
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
The object is specified by the fileServerName, objectName, and objectType. A blank objectName, or an objectType of -1 indicates that the job owner is to be notified. The object must have a connection ID to be notified.
Add Queue to Printer (for operators only)
This packet assigns a queue to a printer and assigns a priority to the queue.
Request Format
FunctionNumber uint8 0x11
PrinterNumber uint8 0 to maximum number of printers minus 1.
FileServerName uint8[48]
QueueName uint8[48]
Priority uint8
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_QUEUE
0x0201 NWPSE_NOT_AUTHORIZED_FOR_QUEUE
0x0202 NWPSE_QUEUE_HALTED
0x0203 NWPSE_UNABLE_TO_ATTACH_TO_QUEUE
0x0204 NWPSE_TOO_MANY_QUEUE_SERVER
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0305 NWPSE_NOT_CONNECTED
0x030B NWPSE_ALREADY_IN_LIST
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
Remarks
The operator must be attached to the file server where the queue is to be added. This packet attaches a queue server to the queue; therefore, the print server must be a property of the queue. The queue cannot have more than 25 print servers servicing it.
Attach Print Server to File Server (for operators only)
This packet attaches a print server to a file server.
Request Format
FunctionNumber uint8 0x18
FileServerName uint8[48]
Password uint8[128]
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0101 NWPSE_TOO_MANY_FILE_SERVERS
0x0102 NWPSE_UNKNOWN_FILE_SERVER
0x0103 NWPSE_BINDERY_LOCKED
0x0104 NWPSE_FILE_SERVER_MAXED_OUT
0x0105 NWPSE_NO_RESPONSE
0x0106 NWPSE_ALREADY_ATTACHED
0x0107 NWPSE_CANT_ATTACH
0x0108 NWPSE_NO_ACCOUNT_BALANCE
0x0109 NWPSE_NO_CREDIT_LEFT
0x010A NWPSE_INTRUDER_DETECTION_LOCK
0x010B NWPSE_TOO_MANY_CONNECTIONS
0x010C NWPSE_ACCOUNT_DISABLED
0x010D NWPSE_UNAUTHORIZED_TIME
0x010E NWPSE_UNAUTHORIZED_STATION
0x010F NWPSE_NO_MORE_GRACE
0x0110 NWPSE_LOGIN_DISABLED
0x0111 NWPSE_ILLEGAL_ACCT_NAME
0x0112 NWPSE_PASSWORD_HAS_EXPIRED
0x0113 NWPSE_ACCESS_DENIED
0x0114 NWPSE_CANT_LOGIN
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
A print server object must exist on the file server. A print server cannot connect to more than 8 file servers. If the print server attaches without an error, it will also login to the file server. If the login fails, the print server will detach itself from the file server. If the attach and the login are successful, then the packet will read the file server's configuration files, which includes the queues that the print server will be servicing and the objects to notify.Cancel Down Request (for operators only)
This packet cancels the Down Print Server command.
Request Format
FunctionNumber uint8 0x04
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
This packet will work only if the print server is processing a print job. If the print server has already advertised that it is down, it will return NWPSE_DOWN.
Change Notify Interval (for operators only)
This packet sets or changes the number of seconds the print server will wait before it notifies an object (FirstNotice) and the number of seconds the print server will wait between following notices.
Request Format
FunctionNumber uint8 0x15
PrinterNumber uint8 0 to maximum number of printers minus 1.
FileServerName uint8[48]
ObjectName uint8[48]
ObjectType uint16
FirstNotice uint16 Number of seconds to wait before 1st notice.
Interval uint16 Number of seconds between following notices.
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_OBJECT
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
Remarks
The object is specified by the fileServerName, objectName, and objectType. A blank objectName, or an objectType of -1 indicates that the notify interval is to be changed for the job owner. The object to notify must already be in the notify list.
Change Queue Priority (for operators only)
This packet changes the service priority assigned to the specified queue.
Request Format
FunctionNumber uint8 0x10
PrinterNumber uint8 0 to maximum number of printers minus 1.
The operator must be attached to the file server where the queue exists. Attempts to get information about a queue will fail if the queue is not on the specified file server or if the queue is not in the print server list.
Change Service Mode (for operators only)
This packet changes the service mode of the specified printer.
Request Format
FunctionNumber uint8 0x0C
PrinterNumber uint8 0 to maximum number of printers minus 1.
NewServiceMode uint8 0 - Change forms as needed
1 - Minimize form changes within queues
2 - Never change forms
3 - Minimize form changes across queues
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0302 NWPSE_NO_SUCH_PRINTER
0x0303 NWPSE_INVALID_PARAMETER
0x0305 NWPSE_NOT_CONNECTED
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
The new service mode must be a valid number (0-3). See "Service Modes" in Chapter 1.
Delete Notify Object (for operators only)
This packet deletes an object from the print server's list of objects to be notified when a printer needs attention (such as mounting forms, printer off-line, out of paper).
Request Format
FunctionNumber uint8 0x17
PrinterNumber uint8 0 to maximum number of printers minus 1.
FileServerName uint8[48]
ObjectName uint8[48]
ObjectType uint16
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_OBJECT
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
Remarks
The object is specified by the fileServerName, objectName, and objectType. A blank objectName, or an objectType of -1 indicates that the job owner is to be deleted. NWPSE_NOT_IN_LIST is returned if the object is not found in the list.
Delete Queue From Printer (for operators only)
This packet deletes a queue from a printer's service list.
Request Format
FunctionNumber uint8 0x12
PrinterNumber uint8 0 to maximum number of printers minus 1.
DetachImmediately uint8 0 - NO, 1 - YES
JobOutcome uint8 (This is used only if DetachImmediately is YES.)
1 - NWPS_RETURN_TO_QUEUE
2 - NWPS_THROW_AWAY
FileServerName uint8[48]
QueueName uint8[48]
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
Remarks
The client must be attached to the file server where the queue exists. If a print server is servicing a job from the queue, this packet will abort the job using jobOutcome. If any other printers are servicing the queue, this packet will not delete the queue. The queue must be deleted from each printer. If no other printers are servicing this queue, this packet deletes the queue.
Detach Print Server From File Server (for operators only)
This packet detaches a print server from a file server.
Request Format
FunctionNumber uint8 0x19
DetachImmediately uint8 0 - NO, 1 - YES
JobOutcome uint8 (This is used only if DetachImmediately is YES.)
1 - NWPS_RETURN_TO_QUEUE
2 - NWPS_THROW_AWAY
FileServerName uint8[48]
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
0x0305 NWPSE_CANT_DETACH_PRIMARY_SERVER
Remarks
If detachImmediately is set and a job is being serviced, the print server will abort the job and detach. If detachImmediately is not set and a job is being serviced, the print server will remain attached to the file server though the packet has returned NWPSE_SUCCESSFUL, and the print server will not detach until the job has finished. Before detaching, this packet will detach all of the print server's printers from the queues. If any printers are servicing queues, it will wait until they are finished before it detaches them. It also deletes the notify objects after it detaches.
Down Print Server (for operators only)
This packet sends down the print server.
Request Format
FunctionNumber uint8 0x03
DownImmediately uint8 0 - NO, 1 - YES
JobOutcome uint8 (This is used only if DownImmediately is YES.)
1 - NWPS_RETURN_TO_QUEUE
2 - NWPS_THROW_AWAY
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
0x0303 NWPSE_INVALID_PARAMETER
Remarks
Before it shuts down, the print server will check the value of jobOutcome, deal with the job accordingly, stop the printer, and, depending on the value of downImmediately, will advertise its status with GOING_DOWN or DOWN. JobOutcome must be a valid number. This packet does not terminate the SPX connection.
Eject Form (for operators only)
This packet sends a form feed to the specified printer.
Request Format
FunctionNumber uint8 0x0A
PrinterNumber uint8 0 to maximum number of printers minus 1.
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0304 NWPSE_PRINTER_BUSY
0x0305 NWPSE_NOT_CONNECTED
0x0306 NWPSE_GOING_DOWN
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
This packet is successful only when the printer is idle. If the printer is active, an error is returned.
Get Attached Servers (for anyone)
This packet returns the names of the file servers that are attached to the print server.
Request Format
FunctionNumber uint8 0x1A
SequenceIdentifier uint8 Initially zero
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
UpdatedSequenceIdentifier uint8
FileServerName uint8[48]
Remarks
Initially the SequenceIdentifier must be set to zero (0). After the initial request, the client must place the value returned in UpdatedSequenceIdentifier in the SequenceIdentifier for each subsequent call. NWPSE_NOT_IN_LIST is returned when no file servers are left in the list.
Get Notify Object (for operators and users)
This packet returns the objects that will be notified when a printer needs attention and when the objects will be notified.
Request Format
FunctionNumber uint8 0x14
PrinterNumber uint8 0 to maximum number of printers minus 1.
SequenceIdentifier uint16 Initially zero
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
UpdatedSequenceIdentifier uint16
FileServerName uint8[48]
ObjectName uint8[48]
ObjectType uint16
FirstNotice uint16 Number of seconds to wait before 1st notice.
Interval uint16 Number of seconds between following notices.
Remarks
This packet returns NWPSE_NOT_IN LIST when there are no objects left in the notify list. Initially the SequenceIdentifier must be set to zero (0). After the initial request, the client must place the value returned in UpdatedSequenceIdentifier in the SequenceIdentifier for each subsequent call.
Get Printers Servicing Queue (for operators and users)
This packet returns an array of uint8s (servicingQueueArray) which identifies which printers are servicing the specified queue.
Request Format
FunctionNumber uint8 0x13
FileServerName uint8[48]
QueueName uint8[48]
MaxNumberofEntries uint8
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_OBJECT
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0306 NWPSE_GOING_DOWN
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
NumPrinters uint8 Number of printers attached to the print server.
ServicingQueueArray uint8 Array of uint8s. A uint8 for each printer attached to the print server; up to the maximum number requested.
Remarks
The number of uint8s in the array corresponds to the number of printers attached to the print server and each uint8 in the array represents a different printer. MaxNumberEntries is the maximum number of printers to be returned.Get Printer Status (for operators and users)
This packet gets the status information about a printer.
Request Format
FunctionNumber uint8 0x05
PrinterNumber uint8 0 to maximum number of printers minus 1.
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Status uint8 0 PSTAT_WAITING_FOR_JOB
1 PSTAT_WAITING_FOR_FORM
2 PSTAT_PRINTING_JOB
3 PSTAT_PAUSED
4 PSTAT_STOPPED
5 PSTAT_MARK_EJECT
6 PSTAT_READY_TO_GO_DOWN
7 PSTAT_NOT_CONNECTED
8 PSTAT_PRIVATE
ErrorCode uint8 Online/Offline
ActiveJob uint8 TRUE (active) or FALSE (idle)
QueueServiceMode uint8
MountedFormNumber uint16
MountedFormName uint8[16]
PrinterName uint8[48]
Remarks
If more than one print server is attached to a file server, the SPX connection will determine which print server can be accessed. The printer number must be known to the print server. Only status information for printers that can be accessed on the current SPX connection will be returned. The client must disconnect and establish a new SPX connection to access other printers.
Get Print Job Status (for operators and users)
This packet gets the status of the current print job on the specified printer.
Request Format
FunctionNumber uint8 0x0D
PrinterNumber uint8 0 to maximum number of printers minus 1.
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0306 NWPSE_GOING_DOWN
0x0309 NWPSE_NO_JOB_ACTIVE
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
FileServerName uint8[48]
QueueName uint8[48]
JobQueueNumber uint16
JobDescription uint8[50]
CopiesInJob uint16
CopySize uint32
CopiesPrinted uint16
BytesIntoCurrentCopy uint32
FormNumber uint16
Text/ByteStream uint8 TRUE (text) expand tabs.
FALSE (bytestream) do not expand tabs.
Remarks
CopiesInJob is the number of copies to be printed. CopySize is the size of the print job in bytes including a form feed unless suppress form feed has been set. CopiesPrinted is the number of copies already printed. BytesIntoCurrentCopy is the number of characters already printed in the currently printing copy.
Get Print Server Info (anyone)
This packet gets the status of the print server and returns information about the services the print server offers.
Request Format
FunctionNumber uint8 0x02
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x030C NWPSE_DOWN
Status uint8 UP, DOWN or WAITING_TO_GO_DOWN
AttachedPrinters uint8 Number of attached printers.
ServiceModesSupported uint8 Number of modes supported.
NPSMajorVersionNumber uint8 NPS Major Version.
NPSMinorVersionNumber uint8 NPS Minor Version.
NPSRevisionNumber uint8 NPS Revision.
SerialNumberBCD uint8[4]
PSType uint8 1 - Dedicated DOS
2 - NLM
3 - FS VAP
4 - Bridge VAP
NPS - NetWare Print Server
FutureSupport uint8[7]or[12]
Support information. Should be set to zero.
Remarks
If the print server is version 1.0 or older, FutureSupport is twelve [12] uint8s and SerialNumber and PSType are not used. If the print server is version 1.1 or newer, FutureSupport is seven [7] uint8s. The SerialNumber is returned in Binary Coded Decimal (BCD).
Get Queues Serviced (for operators and users)
This packet returns information about the queue(s) that the specified printer is servicing.
Request Format
FunctionNumber uint8 0x0F
PrinterNumber uint8 0 to maximum number of printers minus 1.
SequenceIdentifier uint16 Initially zero
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
NewSequenceIdentifier uint16
FileServerName uint8[48]
QueueName uint8[48]
Priority uint8
Remarks
The client must set the sequence identifier to zero before making the first call, then set the sequence identifier to the value returned NewSequenceIdentifier for all subsequent calls. The packet returns NWPSE_NOT_IN_LIST when no queues are left. The Priority will be a value between 1 and 10.
Login to Print Server (anyone)
This packet logs the client into the print server.
Request Format
FunctionNumber uint8 0x01
FileServerName uint8[48]
ConnectionNumber uint16 File server connection number.
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x0400 NWPSE_UNABLE_TO_VERIFY_IDENTI TY
AccessLevel uint8 NWPS_OPERATOR, NWPS_USER, or NWPS_LIMITED
Remarks
This packet gets the client's access rights from the file server bindery to find out if the client has user or operator rights to the print server. The SPX connection must already be established. The client must be attached to the file server that the print server is attached to.
Mark Top of Form (for operators only)
This packet sends a line of characters to the specified printer to show where the top of the page will be.
Request Format
FunctionNumber uint8 0x0B
PrinterNumber uint8 0 to maximum number of printers minus 1.
Character uint8[1] Any printable character.
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0304 NWPSE_PRINTER_BUSY
0x0305 NWPSE_NOT_CONNECTED
0x0306 NWPSE_GOING_DOWN
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
If the operator chooses a character that is not printable, an asterisk will be used. The printer must be inactive for this packet to be successful. If the printer is active, an error is returned.
Rewind Print Job (for operators only)
This packet rewinds the current print job the specified number of pages or bytes and restarts it from that point.
Request Format
FunctionNumber uint8 0x09
PrinterNumber uint8 0 to maximum number of printers minus 1.
ByPage uint8 0 = by byte, 1 = by page.
Relative uint8 0 = absolute, 1 = relative.
CopyNumber uint16 If absolute, the number of the copy to position to. (The copies are numbered beginning with 1.)
Offset int32 ByPage: If absolute, page number to restart at. If relative, number of pages forward or backward.
ByByte: If absolute, byte offset to restart at. If relative, number of bytes forward or backward.
Reply Format
CompletionCode uint16 0x0000 SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0304 NWPSE_PRINTER_BUSY
0x0305 NWPSE_NOT_CONNECTED
0x0306 NWPSE_GOING_DOWN
0x0309 NWPSE_NO_JOB_ACTIVE
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
If absolute is selected, the printer will rewind to the specified page number or byte offset. If relative is selected, the printer will rewind the specified number of pages or bytes from the current page or byte.
Set Mounted Form (for operators only)
This packet informs the print server that the specified form has been mounted on the indicated printer.
Request Format
FunctionNumber uint8 0x08
PrinterNumber uint8 0 to maximum number of printers minus 1.
FormNumber uint8 0x00 - 0xFE
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
The printer number must refer to a valid printer. This clears all other mounted forms for the specified printer.
Start Printer (for operators only)
This packet starts a printer that has been stopped.
Request Format
FunctionNumber uint8 0x07
PrinterNumber uint8 0 to maximum number of printers minus 1.
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0305 NWPSE_NOT_CONNECTED
0x0306 NWPSE_GOING_DOWN
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
If the print job is paused when the printer is stopped, the print job will be resumed when Start Printer is issued. If the print job was not paused, the print server will request the next job. If the printer is not stopped when this packet is issued, it will still return NWPSE_SUCCESSFUL.
Stop Printer (for operators only)
This packet stops the specified printer.
Request Format
FunctionNumber uint8 0x06
PrinterNumber uint8 0 to maximum number of printers minus 1.
JobOutcome uint8 0 - NWPS_PLACE_ON_HOLD
1 - NWPS_RETURN_TO_QUEUE
2 - NWPS_THROW_AWAY
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0303 NWPSE_INVALID_PARAMETER
0x0305 NWPSE_NOT_CONNECTED
0x0306 NWPSE_GOING_DOWN
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
JobOutcome must be passed a 0, 1, or 2. Otherwise, it returns NWPSE_INVALID_PARAMETER. If the job is placed on hold, it will be restarted at the point where it stopped. If the job is returned to queue, it will be restarted from the beginning. If the printer is already stopped and this packet is issued, it will still return NWPSE_SUCCESSFUL.
NetWare 4.00 additions
Add Form (for operators only)
This packet informs the print server that the specified form should also be mounted on the indicated printer. This packet is new with the 4.0 Print Server and is used to maintain a list of form numbers that the printer can support.
Request Format
FunctionNumber uint8 0x1D
PrinterNumber uint8 0 to maximum number of printers minus 1.
FormNumber uint8 0x00 - 0xFE
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0119 NWPSE_MAX_FORMS_EXCEEDED
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
The printer number must refer to a valid printer. The maximum number of forms that can be mounted simultaneously is 20. An attempt to go beyond this number results in an NWPSE_MAX_FORMS_EXCEEDED error being returned.
Dismount Form (for operators only)
This packet informs the print server that the specified form should no longer be mounted on the indicated printer. This packet is new with the 4.0 Print Server and is used to maintain a list of form numbers that the printer can support.
Request Format
FunctionNumber uint8 0x1E
PrinterNumber uint8 0 to maximum number of printers minus 1.
FormNumber uint8 0x00 - 0xFE
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
The printer number must refer to a valid printer.
Get Extended Printer Status (for operators and users)
This packet gets the string status information about a printer. This packet is new with the 4.0 Print Server.
Request Format
FunctionNumber uint8 0x1F
PrinterNumber uint8 0 to maximum number of printers minus 1.
SecondaryErrorStatus uint8 TRUE/FALSE above string is an error condition.
ActiveJobCount uint8 number of active jobs
QueueServiceMode uint8
MountedFormCount uint16 Number between 0 and 20
MountedFormNumber uint16[20] Array of form numbers which are mounted.
Remarks
If more than one print server is attached to a file server, the SPX connection will determine which print server can be accessed. The printer number must be known to the print server. Only status information for printers that can be accessed on the current SPX connection will be returned. The client must disconnect and establish a new SPX connection to get to other printers. The two strings have default ascii info if the printer is not an Extended type (XNP).
.NetWare 4.00 - Directory Services Support
The following packets correspond to the Bindery versions above and differ in that the FunctionNumber in the request has been incremented by 0xD0, and that the packet formats are changed to accommodate the larger Directory Services fully canonicalized, typeful names. These D.S. names are placed in the packet so that only significant data need be transmitted.
D.S. Add Notify Object (for operators only)
This packet adds an object to the print server's list of objects to be notified when a printer needs attention (such as mounting forms, printer off-line, out of paper). This packet is new with the 4.0 Print Server.
Request Format
FunctionNumber uint8 0xE6
PrinterNumber uint8 0 to maximum number of printers minus 1.
ObjectType uint16
FirstNotice uint16 Number of seconds to wait before 1st notice.
Interval uint16 Number of seconds between following notices.
DSObjectName uint8[512]
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_OBJECT
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0305 NWPSE_NOT_CONNECTED
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030B NWPSE_ALREADY_IN_LIST
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
The object is specified by the fileServerName, objectName, and objectType. A blank objectName, or an objectType of -1 indicates that the job owner is to be notified. The object must have a connection ID to be notified.
D.S. Add Queue to Printer (for operators only)
This packet assigns a queue to a printer and assigns a priority to the queue. This packet is new with the 4.0 Print Server.
Request Format
FunctionNumber uint8 0xE1
PrinterNumber uint8 0 to maximum number of printers minus 1.
Priority uint8
DSQueueName uint8[512]
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_QUEUE
0x0201 NWPSE_NOT_AUTHORIZED_FOR_QUE UE
0x0202 NWPSE_QUEUE_HALTED
0x0203 NWPSE_UNABLE_TO_ATTACH_TO_Q UEUE
0x0204 NWPSE_TOO_MANY_QUEUE_SERVER
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0305 NWPSE_NOT_CONNECTED
0x030B NWPSE_ALREADY_IN_LIST
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
Remarks
The operator must be attached to the file server where the queue is to be added. This packet attaches a queue server to the queue; therefore, the print server must be a property of the queue. The queue cannot have more than 25 print servers servicing it.
D.S. Change Notify Interval (for operators only)
This packet sets or changes the number of seconds the print server will wait before it notifies an object (FirstNotice) and the number of seconds the print server will wait between following notices. This packet is new with the 4.0 Print Server.
Request Format
FunctionNumber uint8 0xE5
PrinterNumber uint8 0 to maximum number of printers minus 1.
ObjectType uint16
FirstNotice uint16 Number of seconds to wait before 1st notice.
Interval uint16 Number of seconds between following notices.
DSObjectName uint8[512]
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_OBJECT
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
Remarks
The object is specified by the fileServerName, objectName, and objectType. A blank objectName, or an objectType of -1 indicates that the notify interval is to be changed for the job owner. The object to notify must already be in the notify list.
D.S.Change Queue Priority (for operators only)
This packet changes the service priority assigned to the specified queue. This packet is new with the 4.0 Print Server.
Request Format
FunctionNumber uint8 0xE0
PrinterNumber uint8 0 to maximum number of printers minus 1.
The operator must be attached to the file server where the queue exists. Attempts to get information about a queue will fail if the queue is not on the specified file server or if the queue is not in the print server list.
D.S. Delete Notify Object (for operators only)
This packet deletes an object from the print server's list of objects to be notified when a printer needs attention (such as mounting forms, printer off-line, out of paper). This packet is new with the 4.0 Print Server.
Request Format
FunctionNumber uint8 0xE7
PrinterNumber uint8 0 to maximum number of printers minus 1.
ObjectType uint16
DSObjectName uint8[512]
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_OBJECT
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
Remarks
The object is specified by the fileServerName, objectName, and objectType. A blank objectName, or an objectType of -1 says that the job owner is to be deleted. NWPSE_NOT_IN_LIST is returned if the object is not found in the list.
D.S. Delete Queue From Printer (for operators only)
This packet deletes a queue from a printer's service list. This packet is new with the 4.0 Print Server.
Request Format
FunctionNumber uint8 0xE2
PrinterNumber uint8 0 to maximum number of printers minus 1.
DetachImmediately uint8 0 - NO, 1 - YES
JobOutcome uint8 (This is used only if DetachImmediately is YES.)
1 - NWPS_RETURN_TO_QUEUE
2 - NWPS_THROW_AWAY
DSQueueName uint8[512]
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
Remarks
The client must be attached to the file server where the queue exists. If a print server is servicing a job from the queue, this packet will abort the job using jobOutcome. If any other printers are servicing the queue, this packet will not delete the queue. The queue must be deleted from each printer. If no other printers are servicing this queue, this packet deletes the queue.
D.S. Get Job ID (for operators and users)
This packet returns information about the current job that the specified printer is printing and the queue from which it comes. This packet is new with the 4.0 Print Server.
Request Format
FunctionNumber uint8 0xE8
PrinterNumber uint8 0 to maximum number of printers minus 1.
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
QueueNameFormat uint16 0 - NWPS_BINDERY_SERVICE
1 - NWPS_DIRECTORY_SERVICE
JobID uint32 QMS Job identifier
if the QueueNameFormat is 0 then the remaining fields are
FileServerName uint8[48]
QueueName uint8[48]
else if the QueueNameFormat is 1 then the remaining field is
QueueName uint8[512]
Remarks
D.S. Get Notify Object (for operators and users)
This packet returns the objects that will be notified when a printer needs attention and when the objects will be notified. This packet is new with the 4.0 Print Server.
Request Format
FunctionNumber uint8 0xE4
PrinterNumber uint8 0 to maximum number of printers minus 1.
SequenceIdentifier uint16 Initially zero
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
UpdatedSequenceIdentifier uint16
ObjectType uint16
FirstNotice uint16 Number of seconds to wait before 1st notice.
Interval uint16 Number of seconds between following notices.
DSObjectName uint8[512]
Remarks
This packet returns NWPSE_NOT_IN LIST when there are no objects left in the notify list. Initially the SequenceIdentifier must be set to zero (0). After the initial request, the client must place the value returned in UpdatedSequenceIdentifier in the SequenceIdentifier for each subsequent call.
D.S. Get Printers Servicing Queue (for operators and users)
This packet returns an array of uint8s (servicingQueueArray) which identifies which printers are servicing the specified queue. This packet is new with the 4.0 Print Server.
Request Format
FunctionNumber uint8 0xE3
MaxNumberofEntries uint8
DSQueueName uint8[512]
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_OBJECT
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0306 NWPSE_GOING_DOWN
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
NumPrinters uint8 Number of printers attached to the print server.
ServicingQueueArray uint8[255] Array of uint8s. A uint8 for each printer attached to the print server; up to the maximum number requested.
Remarks
The number of uint8s in the array corresponds to the number of printers attached to the print server and each uint8 in the array represents a different printer. MaxNumberEntries is the maximum number of printers to be returned.
D.S. Get Queues Serviced (for operators and users)
This packet returns information about the queue(s) that the specified printer is servicing. This packet is new with the 4.0 Print Server.
Request Format
FunctionNumber uint8 0xDF
PrinterNumber uint8 0 to maximum number of printers minus 1.
SequenceIdentifier uint16 Initially zero
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
NewSequenceIdentifier uint16
Priority uint8
DSQueueName uint8[512]
Remarks
The client must set the sequence identifier to zero before making the first call, then set the sequence identifier to the value returned NewSequenceIdentifier for all subsequent calls. The packet returns NWPSE_NOT_IN_LIST when no queues are left. The Priority will be a value between 1 and 10.
D.S. Login to Print Server (anyone)
This packet logs the client into the print server. This packet is new with the 4.0 Print Server.
Request Format
FunctionNumber uint8 0xD1
DSUserName uint8[512]
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x0400 NWPSE_UNABLE_TO_VERIFY_IDENTI TY
AccessLevel uint8 NWPS_OPERATOR, NWPS_USER, or NWPS_LIMITED
Remarks
This packet gets the client's access rights from the file server bindery to determine if the client has user or operator rights to the print server. The SPX connection must already be established. The client must be attached to the file server that the print server is attached to. The user should already be authenticated.
NetWare 4.10 - Directory Services Support
The following packets correspond to the D.S. versions above and differ in that the FunctionNumber in the request has been decremented by 0x30, and that the packet formats are changed to use Unicode instead of the code page of the sender. These D.S. names are transmitted and received typeless, (as allowed in N.D.S. 4.10) and are are placed in the packet so that only significant data need be transmitted. Care should be taken to transmit both bytes of the terminating zero.
This packet adds an object to the print server's list of objects to be notified when a printer needs attention (such as mounting forms, printer off-line, out of paper). This packet is new with the 4.1 Print Server.
Request Format
FunctionNumber uint8 0xB6
PrinterNumber uint8 0 to maximum number of printers minus 1.
ObjectType uint16
FirstNotice uint16 Number of seconds to wait before 1st notice.
Interval uint16 Number of seconds between following notices.
DSObjectName uint16[256] Unicode name
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_OBJECT
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0305 NWPSE_NOT_CONNECTED
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030B NWPSE_ALREADY_IN_LIST
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
Remarks
The object is specified by the fileServerName, objectName, and objectType. A blank objectName, or an objectType of -1 indicates that the job owner is to be notified. The object must have a connection ID to be notified.
Unicode D.S. Add Queue to Printer (for operators only)
This packet assigns a queue to a printer and assigns a priority to the queue. This packet is new with the 4.1 Print Server.
Request Format
FunctionNumber uint8 0xB1
PrinterNumber uint8 0 to maximum number of printers minus 1.
Priority uint8
DSQueueName uint16[256] Unicode name
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_QUEUE
0x0201 NWPSE_NOT_AUTHORIZED_FOR_QUE UE
0x0202 NWPSE_QUEUE_HALTED
0x0203 NWPSE_UNABLE_TO_ATTACH_TO_Q UEUE
0x0204 NWPSE_TOO_MANY_QUEUE_SERVER
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0305 NWPSE_NOT_CONNECTED
0x030B NWPSE_ALREADY_IN_LIST
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
Remarks
The operator must be attached to the file server where the queue is to be added. This packet attaches a queue server to the queue; therefore, the print server must be a property of the queue. The queue cannot have more than 25 print servers servicing it.
This packet sets or changes the number of seconds the print server will wait before it notifies an object (FirstNotice) and the number of seconds the print server will wait between following notices. This packet is new with the 4.1 Print Server.
Request Format
FunctionNumber uint8 0xB5
PrinterNumber uint8 0 to maximum number of printers minus 1.
ObjectType uint16
FirstNotice uint16 Number of seconds to wait before 1st notice.
Interval uint16 Number of seconds between following notices.
DSObjectName uint16[256] Unicode name
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_OBJECT
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
Remarks
The object is specified by the fileServerName, objectName, and objectType. A blank objectName, or an objectType of -1 indicates that the notify interval is to be changed for the job owner. The object to notify must already be in the notify list.
The operator must be attached to the file server where the queue exists. Attempts to get information about a queue will fail if the queue is not on the specified file server or if the queue is not in the print server list.
This packet deletes an object from the print server's list of objects to be notified when a printer needs attention (such as mounting forms, printer off-line, out of paper). This packet is new with the 4.1 Print Server.
Request Format
FunctionNumber uint8 0xB7
PrinterNumber uint8 0 to maximum number of printers minus 1.
ObjectType uint16
DSObjectName uint16[256] Unicode name
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_OBJECT
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
Remarks
The object is specified by the fileServerName, objectName, and objectType. A blank objectName, or an objectType of -1 says that the job owner is to be deleted. NWPSE_NOT_IN_LIST is returned if the object is not found in the list.
Unicode D.S. Delete Queue From Printer (for operators only)
This packet deletes a queue from a printer's service list. This packet is new with the 4.1 Print Server.
Request Format
FunctionNumberuint8 0xB2
PrinterNumber uint8 0 to maximum number of printers minus 1.
DetachImmediately uint8 0 - NO, 1 - YES
JobOutcome uint8 (This is used only if DetachImmediately is YES.)
1 - NWPS_RETURN_TO_QUEUE
2 - NWPS_THROW_AWAY
DSQueueName uint16[256] Unicode name
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
Remarks
The client must be attached to the file server where the queue exists. If a print server is servicing a job from the queue, this packet will abort the job using jobOutcome. If any other printers are servicing the queue, this packet will not delete the queue. The queue must be deleted from each printer. If no other printers are servicing this queue, this packet deletes the queue.
Unicode D.S. Get Job ID (for operators and users)
This packet returns information about the current job that the specified printer is printing and the queue from which it comes. This packet is new with the 4.1 Print Server.
Request Format
FunctionNumber uint8 0xB8
PrinterNumber uint8 0 to maximum number of printers minus 1.
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
QueueNameFormat uint16 0 - NWPS_BINDERY_SERVICE
1 - NWPS_DIRECTORY_SERVICE
JobID uint32 QMS Job identifier
if the QueueNameFormat is 0 then the remaining fields are
FileServerName uint8[48]
QueueName uint8[48]
else if the QueueNameFormat is 1 then the remaining field is
QueueName uint16[256] Unicode name
Remarks
Unicode D.S. Get Notify Object (for operators and users)
This packet returns the objects that will be notified when a printer needs attention and when the objects will be notified. This packet is new with the 4.1 Print Server.
Request Format
FunctionNumber uint8 0xB4
PrinterNumber uint8 0 to maximum number of printers minus 1.
SequenceIdentifier uint16 Initially zero
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
UpdatedSequenceIdentifier uint16
ObjectType uint16
FirstNotice uint16 Number of seconds to wait before 1st notice.
Interval uint16 Number of seconds between following notices.
DSObjectName uint16[256] Unicode name
Remarks
This packet returns NWPSE_NOT_IN LIST when there are no objects left in the notify list. Initially the SequenceIdentifier must be set to zero (0). After the initial request, the client must place the value returned in UpdatedSequenceIdentifier in the SequenceIdentifier for each subsequent call.
Unicode D.S. Get Printers Servicing Queue (for operators and users)
This packet returns an array of uint8s (servicingQueueArray) which identifies which printers are servicing the specified queue. This packet is new with the 4.1 Print Server.
Request Format
FunctionNumber uint8 0xB3
MaxNumberofEntries uint8
DSQueueName uint16[256] Unicode name
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0200 NWPSE_NO_SUCH_OBJECT
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0306 NWPSE_GOING_DOWN
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
NumPrinters uint8 Number of printers attached to the print server.
ServicingQueueArray uint8[255] Array of uint8s. A uint8 for each printer attached to the print server; up to the maximum number requested.
Remarks
The number of uint8s in the array corresponds to the number of printers attached to the print server and each uint8 in the array represents a different printer. MaxNumberEntries is the maximum number of printers to be returned.
Unicode D.S. Get Queues Serviced (for operators and users)
This packet returns information about the queue(s) that the specified printer is servicing. This packet is new with the 4.1 Print Server.
Request Format
FunctionNumber uint8 0xAF
PrinterNumber uint8 0 to maximum number of printers minus 1.
SequenceIdentifier uint16 Initially zero
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030D NWPSE_NOT_IN_LIST
0x030E NWPSE_NO_RIGHTS
NewSequenceIdentifier uint16
Priority uint8
DSQueueName uint16[256] Unicode name
Remarks
The client must set the sequence identifier to zero before making the first call, then set the sequence identifier to the value returned NewSequenceIdentifier for all subsequent calls. The packet returns NWPSE_NOT_IN_LIST when no queues are left. The Priority will be a value between 1 and 10.
Unicode D.S. Login to Print Server (anyone)
This packet logs the client into the print server. This packet is new with the 4.1 Print Server.
Request Format
FunctionNumber uint8 0xA1
DSUserName uint16[256] Unicode name.
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x030C NWPSE_DOWN
0x0400 NWPSE_UNABLE_TO_VERIFY_IDENTI TY
AccessLevel uint8 NWPS_OPERATOR, NWPS_USER, or NWPS_LIMITED
Remarks
This packet gets the client's access rights from the file server bindery to determine if the client has user or operator rights to the print server. The SPX connection must already be established. The client must be attached to the file server that the print server is attached to. The user should already be authenticated.
CHAPTER 3
NWPSRV LIBRARY FUNCTIONS
Previous versions of this document contained the complete description of the C-Library known as NPT.LIB. The newest version of this library has been incorporated into the NetWare 4.0 Client SDK as part of the NWPSRV library. The spellings of the function names were altered to conform with other parts of the SDK and the "PS" prefix was changed to "NWPSCom" to reflect the "NetWare Print Services Communications" subset of functions. This chapter contains only a list of the old names and their corresponding spelling changes. For details on these calls please refer to that portion of the NetWare 4.0 Client SDK documentation, which is included with this document.
An SPX connection must be established before an NWPSRV Library Function call can be issued successfully. Issuing the library call "NWPSComAttachToPrintServer" will establish the SPX connection. See Chapter 1, "Print Server - Client Communication."
For NWPSRV Library Functions that use the parameter jobOutcome, if jobOutcome is NWPS_RETURN_TO_QUEUE, it is no longer necessary to set the job control flag to restart a job since this is done by the API. See Job Control Flags in the Queue Job section of Appendix G, "Record Structures."
Function Calls for Anyone
NWPSComGetAttachedNServers - was PSGetAttachedServers
NWPSComGetPrintServerInfo - was PSGetPrintServerInfo
NWPSComLoginToPrintServer - was PSLoginToPrintServer
Function Calls for Operators and Users
NWPSComAbortPrintJob - was PSAbortPrintJob
NWPSComAttachToPrintServer - was PSAttachToPrintServer
NWPSComDetachFromPrintServer - was PSDetachFromPrintServer
NWPSComGetNotifyObject - was PSGetNotifyObject
NWPSComGetPrintersServicingQ - was PSGetPrintersServicingQueue
NWPSComGetPrinterStatus - was PSGetPrinterStatus
NWPSComGetPrintJobStatus - was PSGetPrintJobStatus
NWPSComGetQueuesServiced - was PSGetQueuesServiced
Function Calls for Operators Only
NWPSComAddNotifyObject - was PSAddNotifyObject
NWPSComAddQueueToPrinter - was PSAddQueueToPrinter
NWPSComAttachPServerToNServer - was PSAttachPrintServerToFileServer
NWPSComCancelDownRequest - was PSCancelDownRequest
NWPSComChangeNotifyInterval - was PSChangeNotifyInterval
NWPSComChangeQueuePriority - was PSChangeQueuePriority
NWPSComChangeServiceMode - was PSChangeServiceMode
NWPSComDeleteNotifyObject - was PSDeleteNotifyObject
NWPSComDeleteQueueFromPrinter - was PSDeleteQueueFromPrinter
NWPSComDetachPServerFromNServer - was PSDetachPrintServerFromFileServer
NWPSComDownPrintServer - was PSDownPrintServer
NWPSComEjectForm - was PSEjectForm
NWPSComMarkTopOfForm - was PSMarkTopOfForm
NWPSComRewindPrintJob - was PSRewindPrintJob
NWPSComSetMountedForm - was PSSetMountedForm
NWPSComStartPrinter - was PSStartPrinter
NWPSComStopPrinter - was PSStopPrinter
CHAPTER 4
REMOTE PRINTERS
The NetWare Print Server can service remote printers on the internet (printers that are connected to a computer other than the one where the print server is installed). The print server communicates with remote printers using SPX protocol. See the NetWare System Interface Technical Overview: Chapter 4, "Communication Services."
This chapter contains information about the communication between the print server and remote printers. This includes initializing communication and transferring data and status information at the packet level. Information on C-Library function calls is also provided in this chapter.
INITIALIZING COMMUNICATION
The print server communicates on 2 SPX sockets. One socket is for client requests; such as obtaining information about queues supported, print server version number, etc. The other socket is reserved for communication with remote printers. The print server advertises the client socket on the internet using Service Advertising Protocol (SAP). The client socket can be obtained from the bindery or from the SAP packet sent out by the print server. The remote printer socket is obtained from the print server when the remote printer number is requested using the C-Library Function: NWPSComRequestRemotePrinter.
To establish a work-station as a remote printer proceed as follows:
1. Establish an SPX Connection with the print server on the client socket. This can be done by issuing NWPSComAttachToPrintServer.
2. Find out which printer numbers are available for remote printers. This can be done by issuing NWPSComGetNextRemotePrinter which sends print server command code 0x80 repetitively until an error is returned indicating that no more remote printer numbers are available.
3. Request that an available printer's number be assigned to the remote printer by issuing NWPSComRequestRemotePrinter. This sends print server command code 0x81.
4. Terminate the SPX connection on the client socket.
5. Establish an SPX connection with the print server on the remote printer socket.
RUN TIME COMMUNICATION
After the remote printer number has been selected, communication between the print server and the remote printer takes place on the remote printer socket. The print server sends commands and data to be printed to the remote printer. The remote printer sends status packets to the print server.
REMOTE PRINTER TO PRINT SERVER COMMUNICATION
The remote printer initiates communication with the print server by sending a status packet. The status packet tells the print server what state the remote printer is in; such as online, offline, out of paper, sideband finished, new data block needed, or finished printing data block since last packet was sent.
REMOTE PRINTER STATUS PACKET FORMAT
This packet is sent on the remote printer socket and should be sent whenever a change of status occurs. All fields must be filled.
Request Format
PrinterNumber uint8 Printer making request
NeedBlocks uint8 Number of new blocks needed
FinishedBlocks uint8 Number of blocks finished since last packet
TroubleCode uint8 0 (online), 1 (offline), or 2 (out of paper)
InSideband uint8 Is remote printer printing sideband? 1(true) or 0 (false)
The data stream type in the SPX header of the status packet should be set to zero, indicating that it is a remote information packet type zero.
PRINT SERVER TO REMOTE PRINTER COMMUNICATION
After the print server has received a status packet from the remote printer, it will respond by sending data to be printed (if it is requested) and control commands to the remote printer.
The NetWare Print Server versions 4.00 and 4.10 send 9 different types of packets to a remote printer. (See Remote Printer Data Stream Types in this chapter.) The type of packet can be determined by the data stream field in the SPX header of the packet. The data portion of a packet sent to a remote printer can be up to 512 bytes long.
.REMOTE PRINTER FUNCTION PACKET FORMATS
An SPX connection must be established before a protocol packet can be issued successfully. See Chapter 1, "Print Server - Client Communication" for information on how to establish an SPX connection.
If the SPX connection is terminated unexpectedly, NWPSE_CONNECTION_TERMINATED will be returned in the Event Control Block (ECB). See the NetWare System Interface Technical Overview: Chapter 4, "Communication Services."
Get Next Remote Printer
This packet returns the printer number of the next available remote printer.
Request Format
CommandCode uint8 0x80
PrinterNumber uint8
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
PrinterNumber uint8
PrinterType uint16
PrinterName uint8[48]
Remarks
This packet is sent on the client socket. The printer number should initially be set to 0xFF. The printer number that is returned should be passed back on each subsequent call to get the next number.
Request Remote Printer
This packet requests the print server to assign the specified printer number to a remote printer.
Request Format
CommandCode uint8 0x81
PrinterNumber uint8
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0308 NWPSE_ALREADY_IN_USE
0x030C NWPSE_DOWN
Printer type uint16
Use interrupts uint16
IRQ Number uint16
Blocks uint16 Recommended number of 512 byte blocks in buffer
Protocol uint16 Use Xon/Xoff protocol? *
Baud rate uint16 *
Data bits uint16 *
Stop bits uint16 *
Parity type uint16 *
Socket uint16 Socket for remote printer to communicate with print server
Remarks
This packet is sent on the client socket. The client should first send the Get Next Remote Printer packet to find out which printer numbers are available.
* These fields are unused unless the printer is of Serial type.
Set Remote Mode
This packet sets the remote printer mode.
Request Format
Command code uint8 0x82
Printer number uint8
Shared or Private uint8 0 - NWPS_PRINTER_SHARED
1 - NWPS_PRINTER_PRIVATE
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x0303 NWPSE_INVALID_PARAMETER
0x0304 NWPSE_PRINTER_BUSY
0x0305 NWPSE_NOT_CONNECTED
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
0x0401 NWPSE_NOT_REMOTE_PRINTER
Remarks
This packet is sent on the client socket. Zero (0) indicates that the remote printer is shared with the network. One (1) indicates that the remote printer is private to the work-station.
Scan Network Printers
This packet returns the printer number of the next available network printer. This is new with the release of the 4.0 Print Server and is intended to return more kinds of printers than were previously supported.
Request Format
CommandCode uint8 0x84
PrinterNumber uint8
Reply Format
CompletionCode uint16 0x0000 NWPSE_SUCCESSFUL
0x0103 NWPSE_BINDERY_LOCKED
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x0302 NWPSE_NO_SUCH_PRINTER
0x030C NWPSE_DOWN
0x030E NWPSE_NO_RIGHTS
PrinterNumber uint8
PrinterType uint16
PrinterName uint8[48]
ExtendedConfigLength uint8
ExtendedConfigData uint8[100] The amount of data that is valid depends on the length field above. The nature of the data is dependent on the PrinterType field.
Remarks
This packet is sent on the client socket. The printer number should initially be set to 0xFF. The printer number that is returned should be passed back on each subsequent call to get the next number.
.REMOTE PRINTER NWPSRV LIBRARY FUNCTION CALLS
Previous versions of this document contained the complete description of the C-Library known as NPT.LIB. The newest version of this library has been incorporated into the NetWare 4.0 Client SDK as part of the NWPSRV library. The spellings of the function names were altered to conform with other parts of the SDK and the "PS" prefix was changed to "NWPSCom" to reflect the "NetWare Print Services Communications" subset of functions. This chapter contains only a list of the old names and their corresponding spelling changes. For details on these calls please refer to that portion of the NetWare 4.0 Client SDK documentation, which is included with this document.
An SPX connection must be established before an NWPSRV Library Function can be issued successfully. Issuing the library call "NWPSComAttachToPrintServer" will establish an SPX connection. See Chapter 1, "Print Server - Client Communication."
Function Calls for Network Printers Only
NWPSComGetNextRemotePrinter - was PSGetNextRemotePrinter
NWPSComRequestRemotePrinter - was PSRequestRemotePrinter
NWPSComSetRemoteMode - was PSSetRemoteMode
REMOTE PRINTER DATA STREAM TYPES
The following remote printer data stream types are sent from the print server to the remote printer and appear in the data stream field of the SPX header.
NWPS_DST_DATA 0 The data portion of the packet contains information to be printed. The length of the incoming data can be figured out from the length field in the SPX header.
NWPS_DST_FLUSH 1 Stop printing and clear all buffers.
NWPS_DST_PAUSE 2 Stop printing and wait for new instructions. Retain all current data.
NWPS_DST_START 3 Restart printing from buffer.
NWPS_DST_SIDEBAND 4 Stop printing data in buffer and print data from sideband packet immediately. Usually sent during the PAUSE state. Sideband data consists of a character to be printed a specified number of times followed by an end character printed once.
Data field: 1st uint8 Count: Number of times to print character in 2nd uint8. Must be non-zero.
2nd uint8 Character to print.
3rd uint8 End character. Printed after all iterations of 2nd uint8 and only if it is non-zero. Usually a return or a form feed.
NWPS_DST_NEW_JOB 5 Start new job packet. 1st uint8 after SPX header is tab expansion size.
NWPS_DST_RELEASE 6 Gives control of the remote printer to a process other than the NetWare Print Server (such as local mode or DOS). The remote printer still listens for an SPX packet (which will usually be a RECLAIM packet)
NWPS_DST_RECLAIM 7 Reclaims the remote printer for the NetWare print server.
NWPS_DST_EOJ 8 End of Job -- signal from 4.0 Print Servers to the Network Printer that all data from the previous job has been transmitted. This was added for synchronization with the Print Server.REMOTE PRINTER TYPES
These are the possible types of remote printers. One of the following values is returned when the C-Library Function PSGetNextRemotePrinter is issued.
NWPS_P_REM_PAR_1 7 Remote printer using parallel port 1
NWPS_P_REM_PAR_2 8 Remote printer using parallel port 2
NWPS_P_REM_PAR_3 9 Remote printer using parallel port 3
NWPS_P_REM_SER_1 10 Remote printer using serial port 1
NWPS_P_REM_SER_2 11 Remote printer using serial port 2
NWPS_P_REM_SER_3 12 Remote printer using serial port 3
NWPS_P_REM_SER_4 13 Remote printer using serial port 4
NWPS_P_REM_OTHER_1 14 Remote printer of other/unknown type
NWPS_P_ELSEWHERE_1 15 Defined elsewhere
NWPS_P_XNP_1 16 eXtended Network Printer
NWPS_P_LOC_AIO 17 AIO Auto-start printer
NWPS_P_REM_AIO 18 AIO User-started printer
NWPS_P_APPLE_1 100 Apple-Talk printer
NWPS_P_UNIX_1 200 UNIX User-started printer
APPENDIX A
PRINT SERVER COMMUNICATION ERROR CODES (numerical)
0x0000 NWPSE_SUCCESSFUL
(Codes 0x0040 through 0x0047 are errors possible when NWPSComAttachToPrintServer fails.)
0x0040 NWPSE_NO_AVAILABLE_SPX_CONNECTI:
The shell has not been configured to get enough SPX connections. This can be remedied by changing the SHELL.CFG file.
0x0041 NWPSE_SPX_NOT_INITIALIZED:
The SPX shell has not been loaded.
0x0042 NWPSE_NO_SUCH_PSERVER:
The client has attempted to attach to a print server that is not advertising and therefore not running.
0x0043 NWPSE_UNABLE_TO_GET_SERVER_ADDR:
The network address of the advertising print server is not in the bindery.
0x0044 NWPSE_UNABLE_TO_CONNECT_TO_SERV:
The client cannot attach to the print server for some reason that cannot be identified.
0x0045 NWPSE_NO_AVAILABLE_IPX_SOCKETS:
All available IPX sockets are already in use.
0x0046 NWPSE_ALREADY_ATTACH_TO_A_PRINT:
The NetWare Print Server C library only allows a client to be attached to one print server at a time. Clients may write their own libraries if they wish to attach to more than one print server at a time.
0x0047 NWPSE_IPX_NOT_INITIALIZED:
The IPX shell has not been loaded.
0x00ED NWPSE_CONNECTION_TERMINATED:
This message can be returned on any call. The SPX connection has been broken or the connection between the client and the print server has been broken.
APPENDIX B
PRINT SERVER ERROR CODES (numerical)
0x0000 NWPSE_SUCCESSFUL
(Codes 0x0101 through 0x0107 are errors possible when an Attach Print Server to File Server call fails.)
0x0101 NWPSE_TOO_MANY_FILE_SERVERS:
The print server is already attached to as many file servers as is possible and cannot attach to any more.
0x0102 NWPSE_UNKNOWN_FILE_SERVER:
The client has requested to attach to a file server that is not known to the print server.
0x0103 NWPSE_BINDERY_LOCKED:
The bindery of the specified file server is locked and cannot be accessed at this time. A bindery will be locked if a supervisor is running Bind Fix or another application that monopolizes the bindery.
0x0104 NWPSE_FILE_SERVER_MAXED_OUT:
The file server is already attached to as many different connections as is possible and cannot attach to any more. File servers using NetWare 3.0 can handle to up to 250 connections.
0x0105 NWPSE_NO_RESPONSE:
The specified file server is recognized by the print server, but does not respond to the attach call for some reason. This usually means that the file server has just gone down.
0x0106 NWPSE_ALREADY_ATTACHED:
The print server is already attached to the specified file server.
0x0107 NWPSE_CANT_ATTACH:
The print server cannot attach to the specified file server for some reason that cannot be identified.
(Codes 0x0108 through 0x0114 are errors possible when a login command fails.)
0x0108 NWPSE_NO_ACCOUNT_BALANCE:
The file server is charging for services and the print server does not have an account balance. This error will not occur unless accounting has been installed and the print server has not been assigned an account balance.
0x0109 NWPSE_NO_CREDIT_LEFT:
The file server is charging for services and the print server has exceeded its credit limit. In this version of the NetWare print server, print servers are automatically given unlimited credit when an accounting application is installed. This error will not occur unless the credit limit has been altered with a user supplied application.
0x010A NWPSE_INTRUDER_DETECTION_LOCK:
The print server is locked out of the file server for a certain amount of time because someone has tried to login as the print server several times and has used the wrong name or wrong password. The number of incorrect logins before lockout and the length of time of the lockout is set up in the SYSCON utility.
0x010B NWPSE_TOO_MANY_CONNECTIONS:
A print server with the same name as the one trying to login is already logged into the file server.
0x010C NWPSE_ACCOUNT_DISABLED:
This error will not occur unless a supervisor has specifically altered the print server account so that it is disabled.
0x010D NWPSE_UNAUTHORIZED_TIME:
The print server has attempted to login at a time that has been designated by the supervisor as an unauthorized time in the SYSCON utility.
0x010E NWPSE_UNAUTHORIZED_STATION:
The print server has attempted to login from a work-station that has not been authorized in the SYSCON utility. This will not occur unless it has been specifically designated by the supervisor.
0x010F NWPSE_NO_MORE_GRACE:
The print server's password has expired and was not changed in the number of times allowed as a grace period.
0x0110 NWPSE_LOGIN_DISABLED:
All logins have been temporarily disabled by the supervisor.
0x0111 NWPSE_ILLEGAL_ACCT_NAME:
An account name using illegal characters (such as ?, *, etc.) has been entered.
0x0112 NWPSE_PASSWORD_HAS_EXPIRED:
This is a warning. The password has expired and must be changed within the number of time sdesignated as grace time in the SYSCON utility.
0x0113 NWPSE_ACCESS_DENIED:
An incorrect print server name or password was entered.
0x0114 NWPSE_CANT_LOGIN:
The print server cannot login to the specified file server for some reason that cannot be identified.
0x0115 NWPSE_PRINTER_ALREADY_INSTALLED:
0x0116 NWPSE_CANT_OPEN_CONFIG_FILE:
0x0117 NWPSE_CANT_READ_CONFIG_FILE:
0x0118 NWPSE_UNKNOWN_PRINTER_TYPE:
0x0119 NWPSE_MAX_FORMS_EXCEEDED:
An attempt was made to add a form to a printer that already has the maximum configured.
0x011A NWPSE_NO_SUCH_JOB:
Specified Job Number does not exist on the printer's list of active jobs.
0x011B NWPSE_UNKNOWN_PRINTER_ERROR:
0x011C NWPSE_COMMUNICATIONS_ERROR:
0x011D NWPSE_MODE_NOT_SUPPORTED:
The rewind mode is not supported by this printer.
(Codes 0x0200 through 0x0401 are errors possible when a protocol packet or a library function call fails.)
0x0200 NWPSE_NO_SUCH_OBJECT:
An object (such as a user, queue, or group) has been requested that does not exist in the bindery of the specified file server.
0x0201 NWPSE_NOT_AUTHORIZED_FOR_QUEUE:
The print server is not in the list of authorized print servers for the specified queue.
0x0202 NWPSE_QUEUE_HALTED:
The queue operator has set a flag in the PConsole utility so that no more print servers can attach to that queue.
0x0203 NWPSE_UNABLE_TO_ATTACH_TO_QUEUE:
The print server is unable to attach to the specified queue for some reason that cannot be identified.
0x0204 NWPSE_TOO_MANY_QUEUE_SERVERS:
The specified queue is already attached to the maximum number of print servers it is allowed.
0x0300 NWPSE_INVALID_REQUEST:
An SPX packet has been sent with a request code that is not recognized by the print server.
0x0301 NWPSE_NOT_ENOUGH_MEMORY:
The print server cannot allocate the amount of memory needed to meet the request.
0x0302 NWPSE_NO_SUCH_PRINTER:
A request has been made for a printer that does not exist.
0x0303 NWPSE_INVALID_PARAMETER:
The request that was made is valid, but at least one of the parameters contains a value that is not valid.
0x0304 NWPSE_PRINTER_BUSY:
This message is returned if a Mark, Eject, or Change Remote Printer NWPS_PRINTER_PRIVATE/NWPS_PRINTER_SHARED mode is sent while the printer is printing.
0x0305 NWPSE_CANT_DETACH_PRIMARY_SERVER:
The print server cannot detach from its primary file server.
0x0306 NWPSE_GOING_DOWN:
The DOWN command has been issued to the print server and it is waiting for all of its printers to finish printing their jobs before if shuts down. However, the printer that the client has tried to access has finished its last job and is already shut down.
0x0307 NWPSE_NOT_CONNECTED:
The client has attempted to access a remote printer that has not connected yet.
0x0308 NWPSE_ALREADY_IN_USE:
The client has attempted to set up a remote printer using a printer number that is already in use.
0x0309 NWPSE_NO_JOB_ACTIVE:
The client has attempted to abort, rewind, or get job status information for a printer that is not currently active.
0x030A NWPSE_NOT_ATTACHED_TO_SERVER:
When attempting to add a queue or add an object to notify, the client has specified a file server that is not attached to the print server.
0x030B NWPSE_ALREADY_IN_LIST:
The client has attempted to add an object to a notify list or add a queue to a queue service list that is already in that list.
0x030C NWPSE_DOWN:
The print server is down and must be restarted. This message is returned only during the interval between when the DOWN command is issued and when the print server is actually shut down.
0x030D NWPSE_NOT_IN_LIST:
The client has attempted to change or delete a print queue that is not in the queue service list or an object that is not in the notify object list.
0x030E NWPSE_NO_RIGHTS:
The client does not have the necessary user or operator rights to perform the attempted function.
0x030F NWPSE_CMD_NOT_SUPPORTED:
This message is returned if the network printer is not able to support Sideband operations such as Mark TOF and Eject.
0x0400 NWPSE_UNABLE_TO_VERIFY_IDENTITY:
This message is returned if a Login to Print Server packet is sent with incorrect data in it. The connection number and file server name don't match the address that the client is calling from.
0x0401 NWPSE_NOT_REMOTE_PRINTER:
The user has attempted to make a remote printer call to a printer that is not a remote printer or set up a remote printer using a print number that is not a remote printer number.
0x0402 NWPSE_UNAUTHORIZED_PRINTER:
The user has attempted to establish a remote printer connection to the print server from a network address that is not permitted. The printer object is configured with an address restriction.
APPENDIX C
PRINT SERVER COMMUNICATION ERROR CODES (alphabetical)
0x0046 NWPSE_ALREADY_ATTACH_TO_A_PRINT
0x00ED NWPSE_CONNECTION_TERMINATED
0x0047 NWPSE_IPX_NOT_INITIALIZED
0x0045 NWPSE_NO_AVAILABLE_IPX_SOCKETS
0x0040 NWPSE_NO_AVAILABLE_SPX_CONNECTI
0x0042 NWPSE_NO_SUCH_PSERVER
0x0041 NWPSE_SPX_NOT_INITIALIZED
0x0044 NWPSE_UNABLE_TO_CONNECT_TO_SERV
0x0043 NWPSE_UNABLE_TO_GET_SERVER_ADDR
APPENDIX D
PRINT SERVER ERROR CODES (alphabetical)
0x0113 NWPSE_ACCESS_DENIED
0x010C NWPSE_ACCOUNT_DISABLED
0x0106 NWPSE_ALREADY_ATTACHED
0x030B NWPSE_ALREADY_IN_LIST
0x0308 NWPSE_ALREADY_IN_USE
0x0103 NWPSE_BINDERY_LOCKED
0x0107 NWPSE_CANT_ATTACH
0x0305 NWPSE_CANT_DETACH_PRIMARY_SERVER
0x0114 NWPSE_CANT_LOGIN
0x030C NWPSE_DOWN
0x0104 NWPSE_FILE_SERVER_MAXED_OUT
0x0306 NWPSE_GOING_DOWN
0x0111 NWPSE_ILLEGAL_ACCT_NAME
0x010A NWPSE_INTRUDER_DETECTION_LOCK
0x0303 NWPSE_INVALID_PARAMETER
0x0300 NWPSE_INVALID_REQUEST
0x0110 NWPSE_LOGIN_DISABLED
0x030A NWPSE_NOT_ATTACHED_TO_SERVER
0x0201 NWPSE_NOT_AUTHORIZED_FOR_QUEUE
0x0301 NWPSE_NOT_ENOUGH_MEMORY
0x030D NWPSE_NOT_IN_LIST
0x0401 NWPSE_NOT_REMOTE_PRINTER
0x0108 NWPSE_NO_ACCOUNT_BALANCE
0x0109 NWPSE_NO_CREDIT_LEFT
0x0309 NWPSE_NO_JOB_ACTIVE
0x010F NWPSE_NO_MORE_GRACE
0x0105 NWPSE_NO_RESPONSE
0x030E NWPSE_NO_RIGHTS
0x0200 NWPSE_NO_SUCH_OBJECT
0x0302 NWPSE_NO_SUCH_PRINTER
0x0112 NWPSE_PASSWORD_HAS_EXPIRED
0x0304 NWPSE_PRINTER_BUSY
0x0307 NWPSE_NOT_CONNECTED
0x0202 NWPSE_QUEUE_HALTED
0x010B NWPSE_TOO_MANY_CONNECTIONS
0x0101 NWPSE_TOO_MANY_FILE_SERVERS
0x0204 NWPSE_TOO_MANY_QUEUE_SERVERS
0x0203 NWPSE_UNABLE_TO_ATTACH_TO_QUEUE
0x0400 NWPSE_UNABLE_TO_VERIFY_IDENTITY
0x0402 NWPSE_UNAUTHORIZED_PRINTER
0x010E NWPSE_UNAUTHORIZED_STATION
0x010D NWPSE_UNAUTHORIZED_TIME
0x0102 NWPSE_UNKNOWN_FILE_SERVER
APPENDIX E
FUNCTION CONSTANTS
0 NWPS_LIMITED
1 NWPS_USER
2 NWPS_OPERATOR
0x00 RUNNING
0x01 GOING DOWN
0x02 DOWN
APPENDIX F
PRINTER STATUS CODES
0 PSTAT_WAITING_FOR_JOB
1 PSTAT_WAITING_FOR_FORM
2 PSTAT_PRINTING_JOB
3 PSTAT_PAUSED
4 PSTAT_STOPPED
5 PSTAT_MARK_EJECT
6 PSTAT_READY_TO_GO_DOWN
7 PSTAT_NOT_CONNECTED
8 PSTAT_PRIVATE
APPENDIX G
RECORD STRUCTURES
3.11 QUEUE JOBS
The queue job parameters are marked as follows:
Q: The value is assigned by the Queue Management Service and cannot be changed.
C: The value is assigned by the client and is not used by the Queue Management Service. It can be changed using protocol functions.
CQ: The value is assigned by the client. It is used and can be changed by the Queue Management Service. It cannot be changed by protocol functions.
QC: The value is assigned by the Queue Management Service and can be changed by the client (operator only).
Type uint32 and type uint16 parameters are in high-low order.
Q:uint8 Client Station
The connection number that submitted the job.
Q:uint8 Client Task
The task number that submitted the job.
Q:uint32 Client ID Number
User ID number that submitted the job.
C:uint32 Target Server ID Number
Identifies which print server to send the job to.
If any print server is acceptable, enter 1.
C:uint8[6] Target Execution Time
The time the job should be executed (Year, Month, Day, Hour, Minute, Second). Enter all 0xFFs for as soon as possible.
Q:uint8[6] Job Entry Time
The time the job was entered in the queue (Year, Month, Day, Hour, Minute, Second).
Q:uint16 Job Number
The job number of the print job.
QC:uint16 Job Type
The form number of the print job.
CQ:uint8 Job Position
The position of the job in the queue.
QC:uint8 Job Control Flags
0x80: Set if a job is on hold by the operator.
0x40: Set if a job is on hold by the user.
0x20: Set when NWCreateQueueFile2 is called.
Cleared when NWCloseFileAndStartQueueJob2 is called.
0x10: Set to restart a job. Must be set if jobOutcome is NWPS_RETURN_TO_QUEUE.
0x08: Set to release a job if the user's connection is terminated during the NWCloseFileAndStartQueueJob2 call.
Q:uint8[14] Job File Name
Created when NWCreateQueueFile2 is called.
Q:uint8[6] Job File Handle
Created when NWCreateQueueFile2 is called.
Q:uint8 Server Station
Station number of the print server; undefined unless a job is being serviced.
Q:uint8 Server Task
Task number of the queue servicing the job.
Q:uint32 Server ID Number
ID number of the print server.
C:uint8[50] Job Description Text
Usually the name of the file being printed.
C:uint8[152] Client Record Area
Special data for print jobs.
APPENDIX G (continued)
4.00 QUEUE JOBS
Q:uint32 Client Station
The connection number that submitted the job.
Q:uint32 Client Task
The task number that submitted the job.
Q:uint32 Client ID Number
User ID number that submitted the job.
C:uint32 Target Server ID Number
Identifies which print server to send the job to.
If any print server is acceptable, enter 1.
C:uint8[6] Target Execution Time
The time the job should be executed (Year, Month, Day, Hour, Minute, Second). Enter all 0xFFs for as soon as possible.
Q:uint8[6] Job Entry Time
The time the job was entered in the queue (Year, Month, Day, Hour, Minute, Second).
Q:uint32 Job Number
The job number of the print job.
QC:uint16 Job Type
The form number of the print job.
CQ:uint16 Job Position
The position of the job in the queue.
QC:uint16 Job Control Flags
0x80: Set if a job is on hold by the operator.
0x40: Set if a job is on hold by the user.
0x20: Set when NWCreateQueueFile2 is called.
Cleared when NWCloseFileAndStartQueueJob2 is called.
0x10: Set to restart a job. Must be set if jobOutcome is NWPS_RETURN_TO_QUEUE.
0x08: Set to release a job if the user's connection is terminated during the NWCloseFileAndStartQueueJob2 call.
Q:uint8[14] Job File Name
Created when NWCreateQueueFile2 is called.
Q:uint32 Job File Handle
Created when NWCreateQueueFile2 is called.
Q:uint32 Server Station
Station number of the print server; undefined unless a job is being serviced.
Q:uint32 Server Task
Task number of the queue servicing the job.
Q:uint32 Server ID Number
ID number of the print server.
C:uint8[50] Job Description Text
Usually the name of the file being printed.
C:uint8[152] Client Record Area
Special data for print jobs.
APPENDIX G (continued)
CLIENT RECORD AREA
This data applies to print jobs only. The client sets these fields and can change them using protocol function calls.
uint8 Client Record Area Version Number
Current version is 0.
uint8 Tab Size
Number of spaces that tabs will be expanded to. Minimum is 0, maximum is 18.
uint16 Number of Copies
Number of copies to print.
uint16 Control Flags
0x8000: Set to print banner.
0x4000: Set if tabs, lines per page, and characters per line are to conform to the values entered in the corresponding fields. Clear if this is to be an unfiltered byte stream.
0x0800: Set to suppress form feed.
0x1000: Notify user when job is done.
uint16 Maximum Lines per Page
Default is 66.
uint16 Maximum Characters per Line
Default is 132.
uint8[16] Form Name
(Null Terminated)
uint8[6] Reserved for future use
Should be set to zero.
uint8[13] Banner Name Field
Text to be printed in the first box on the banner; usually the user name, but can be changed.
uint8[13] Banner File Field
Text to be printed in the second box on the banner; usually the file name, but can be changed.
uint8[14] Header File Name
File name printed in header of banner.
uint8[80] Directory Path
Directory that the file came from.
APPENDIX H
ACCESS LEVELS
0 Limited Access Only
1 User Access
2 Operator Access
JOB OUTCOMES
0 NWPS_PLACE_ON_HOLD
1 NWPS_RETURN_TO_QUEUE
2 NWPS_THROW_AWAY
PRINTER MODES
0 NWPS_PRINTER_SHARED
1 NWPS_PRINTER_PRIVATE
PRINTER STATUS
0 Printer Running
1 Printer Offline
2 Printer Out of Paper
APPENDIX I
LIST OF PROTOCOL PACKETS (numerical)
0x01 Login to Print Server
0x02 Get Print Server Info
0x03 Down Print Server
0x04 Cancel Down Request
0x05 Get Printer Status
0x06 Stop Printer
0x07 Start Printer
0x08 Set Mounted Form
0x09 Rewind Print Job
0x0A Eject Form
0x0B Mark Top of Form
0x0C Change Service Mode
0x0D Get Print Job Status
0x0E Abort Job
0x0F Get Queues Serviced
0x10 Change Queue Priority
0x11 Add Queue to Printer
0x12 Delete Queue From Printer
0x13 Get Printers Servicing Queue
0x14 Get Notify Object
0x15 Change Notify Interval
0x16 Add Notify Object
0x17 Delete Notify Object
0x18 Attach Print Server to File Server
0x19 Detach Print Server From File Server
0x1A Get Attached Servers
0x1D Add Form
0x1E Dismount Form
0x1F Get Extended Printer Status
0x80 Get Remote Printer
0x81 Request Remote
0x82 Set Remote Mode
0x84 Scan Network Printers
0xA1 Unicode D.S. Login to Print Server
0xAF Unicode D.S. Get Queues Serviced
0xB0 Unicode D.S. Change Queue Priority
0xB1 Unicode D.S. Add Queue to Printer
0xB2 Unicode D.S. Delete Queue From Printer
0xB3 Unicode D.S. Get Printers Servicing Queue
0xB4 Unicode D.S. Get Notify Object
0xB5 Unicode D.S. Change Notify Interval
0xB6 Unicode D.S. Add Notify Object
0xB7 Unicode D.S. Delete Notify Object
0xB8 Unicode D.S. Attach Print Server to File Server
0xD1 D.S. Login to Print Server
0xDF D.S. Get Queues Serviced
0xE0 D.S. Change Queue Priority
0xE1 D.S. Add Queue to Printer
0xE2 D.S. Delete Queue From Printer
0xE3 D.S. Get Printers Servicing Queue
0xE4 D.S. Get Notify Object
0xE5 D.S. Change Notify Interval
0xE6 D.S. Add Notify Object
0xE7 D.S. Delete Notify Object
0xE8 D.S. Attach Print Server to File Server
0xFF Logout
APPENDIX J
LIST OF PROTOCOL PACKETS (alphabetical)
0x1D Add Form
0x0E Abort Job
0x16 Add Notify Object
0x11 Add Queue to Printer
0x18 Attach Print Server to File Server
0x04 Cancel Down Request
0x15 Change Notify Interval
0x10 Change Queue Priority
0x0C Change Service Mode
0x17 Delete Notify Object
0x12 Delete Queue From Printer
0x19 Detach Print Server From File Server
0x1E Dismount Form
0x03 Down Print Server
0xE6 D.S. Add Notify Object
0xE1 D.S. Add Queue to Printer
0xE5 D.S. Change Notify Interval
0xE0 D.S. Change Queue Priority
0xE7 D.S. Delete Notify Object
0xE2 D.S. Delete Queue From Printer
0xE8 D.S. Attach Print Server to File Server
0xE4 D.S. Get Notify Object
0xE3 D.S. Get Printers Servicing Queue
0xDF D.S. Get Queues Serviced
0xD1 D.S. Login to Print Server
0x0A Eject Form
0x1A Get Attached Servers
0x1F Get Extended Printer Status
0x14 Get Notify Object
0x0D Get Print Job Status
0x02 Get Print Server Info
0x05 Get Printer Status
0x13 Get Printers Servicing Queue
0x0F Get Queues Serviced
0x80 Get Remote
0x01 Login to Print Server
0xFF Logout
0x0B Mark Top of Form
0x81 Request Remote
0x09 Rewind Print Job
0x84 Scan Network Printers
0x08 Set Mounted Form
0x82 Set Remote Mode
0x07 Start Printer
0x06 Stop Printer
0xB6 Unicode D.S. Add Notify Object
0xB1 Unicode D.S. Add Queue to Printer
0xB5 Unicode D.S. Change Notify Interval
0xB0 Unicode D.S. Change Queue Priority
0xB7 Unicode D.S. Delete Notify Object
0xB2 Unicode D.S. Delete Queue From Printer
0xB8 Unicode D.S. Attach Print Server to File Server
0xB4 Unicode D.S. Get Notify Object
0xB3 Unicode D.S. Get Printers Servicing Queue
0xAF Unicode D.S. Get Queues Serviced
0xA1 Unicode D.S. Login to Print Server
APPENDIX K
Code Needed to Translate From the Old Bindery Configuration File Format
API Calls for Format Conversion
The following code segment is an excerpt from the NWPS_CFG.H file, and describes the calls needed to do format conversion. The *fileConfig parameter in NWPSCfgFileConfigToApiConfig points to the PRINT.nnn file.
/*
Information stored in the bindery configuration file has a
different format than NWPS_PConfig. Those applications needing
the old format can use these calls to do the conversion.
*/
void NWPSApiConfigToFileConfig(
char NWFAR *name,
NWPS_PConfig NWFAR *apiConfig,
BYTE NWFAR *fileConfig);
void NWPSFileConfigToApiConfig(
BYTE NWFAR *fileConfig,
char NWFAR *name,
DWORD NWFAR *length,
NWPS_PConfig NWFAR *apiConfig);
Printer Configuration Structures
The following code segment shows all the possible values for the PRINT.nnn fields, as well as the printer configuration structures:
/* Printer Types */
#define NWPS_P_ELSEWHERE (WORD)-1 /* Printer defined elsewhere */
#define NWPS_P_OTHER 0 /* Other or Unknown Printer*/