SDLP LPR/LPD print software for NetWare Version 1.1 Page - 1 Copyright (c) 1995 by Secure Design Other brand and product names are trademarks or registered trademarks of their respective holders. U.S. Government Restricted Rights: Use, duplication or disclosure by the Government is subject to restrictions set fourth in subparagraph (a) through (d) of the Commercial Computer Restricted Rights clause at FAR 52.227-19 when applicable, or subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-1013, and in similar clauses in the NASA FAR Supplement. License Agreement: Each copy of this product is provided with a serial number. One serial number is required for each file server which this product is to be used on. One serial number may not be used on more than one file server. This serial number may not be exchanged, sold, or otherwise distributed. An evaluation copy of this product is available. While the purchased version of this software may not be copied, the evaluation version may be distributed freely. Please contact us if you would like a demonstration copy of our products. Warranty: This software is sold on an as-is basis. Secure Design specifically disclaims all warranties, expressed or implied. In no event shall Secure Design be liable for any loss of profit or any other damage including but not limited to special, incidental, consequential or other damages including damages to a third party. By using this software you are agreeing to these terms. If these terms are not agreeable, please return this software for a refund within 10 days of purchase. Page - 2 Table Of Contents Table Of Contents 3 Overview 4 System Requirements 4 Quick Install 5 Transferring Print Jobs To UNIX Systems 7 Receiving Print Jobs From UNIX Systems 10 Options for /etc/printcap on UNIX systems: 12 LPD control codes supported by SDLP for incoming jobs: 13 UNIX host functions 13 Transferring Print Jobs Between NetWare Servers 14 Troubleshooting 15 About Secure Design 16 For Further Reading 16 Page - 3 Overview SDLP is a NetWare Loadable Module (NLM) that provides the ability to transfer print jobs between NetWare print queues and UNIX print queues. SDLP acts as a print server/client that implements the LPR/LPD protocol as described in RFC 1179. The following is a list of features: SDLP Provides: * Compatibility with most LPR/LPD software for UNIX systems. * Bidirectional transfer of print jobs between NetWare and UNIX * User notification after a print job has been transferred. * Configuration from NetWare server console. * Service for multiple queues on a file server. * Automatic text translations with CR and LF characters. * Host access control for incoming print jobs. System Requirements SDLP will work with NetWare 3.x or NetWare 4.x with Bindery Emulation. The following is a list of system modules that you will need to load SDLP. * TCPIP.NLM v2.02m (or later) * NWSNUT.NLM v4.10g (or later) * CLIB.NLM v3.12h (or later) To find the version number of the NLMs you currently have loaded, type "modules" on your file server console. A list will be displayed for you. The NWSNUT.NLM and CLIB.NLM files are provided in the archive LIBUP4.EXE or LIBUP5.EXE. The TCPIP.NLM is provided in the archive TCP188.EXE These update files are available from Novell on CompuServe, ftp.novell.com, and www.novell.com. You may also obtain them from your Novell Authorized Service Center. These files are also available from Secure Design by BBS or e-mail server. See the section About Secure Design for details. Page - 4 Quick Install This section gives the basic steps to install the SDLP software on your server. You must follow these steps before proceeding to the remainder of the manual. After installation, you will need to configure SDLP for incoming or outgoing print jobs. 1) Install the NetWare TCPIP.NLM. Refer to the TCP/IP Transport Supervisor Guide for details on installing the TCPIP.NLM. You can verify that TCPIP is working correctly by using the ping program from a UNIX host and pinging your NetWare server. 2) Copy SDLP.NLM and SDLPCONF.NLM into your SYS:SYSTEM directory. 3) From the File Server console, type "load sdlpconf" to load the configuration program. A menu will be displayed. Select the Install option. The following dialog will be displayed. Installation Installed: Wed Mar 22 15:10:50 1995 Serial Number: XXXXX Your Name: John Doe, System Admin. Company Name: Secure Design Company Info: Corvallis, OR Enter the serial number provided on the software disk. If you are installing the demo version, leave the serial number blank. The demo will expire in 60 days after installation. To personalize your copy of SDLP, complete the fields for your name, company and any further information you wish to enter. Press when you have completed the information in this screen, and you will be presented with the main menu again. Page - 5 4) Select Miscellaneous Options from the main menu. The dialog shown below will be presented. Miscellaneous Options Log Shows Date: NO Log Shows Time: YES Log Shows Level: YES Log To File SDLP.LOG NO Log Level: 4) Noise LPR Low Port Range: 721 LPR High Port Range: 731 Max Concurrent Incoming Jobs 10 When SDLP is running, a screen will be presented with information about print jobs as they are processed. You can choose to have each entry in the log screen show the date, time, or severity (level) of the message. Log To File saves all log screen output to SYS:SYSTEM\SDLP.LOG. SDLP will keep this file open while loaded. You must unload SDLP to access this file. The Log Level option sets what level of severity will be displayed. The options are for Error, Warning, Message, and Noise. The option for Noise is only useful for debugging any problems you may have. The default option is a Log Level of Message. LPR Low & High Port Range: See the section titled Transferring Print Jobs to UNIX Systems. Max Concurrent Incoming Jobs: See the section titled Receiving Print Jobs From UNIX Systems. 5) Before proceeding, please review the chapters titled Transferring Print Jobs to UNIX Systems and Receiving Print jobs From UNIX Systems. You will need to configure SDLP depending on the services you wish to have performed. 6) Last when configuration is complete, quit the SDLPCONF.NLM. From the File Server console, type "load sdlp" and press enter. SDLP will be loaded and it should begin servicing jobs. You should add the line "load sdlp" to your sys:system\autoexec.ncf to allow SDLP to be loaded automatically when the server is booted. Page - 6 Transferring Print Jobs To UNIX Systems SDLP can transfer print jobs from a NetWare print queue to a remote LPD host. Jobs are serviced by a configured print server, and removed from the queue when a successful transfer occurs. Several options can be set to modify the way SDLP sends jobs to a remote host. The following instructions cover setting up SDLP to send jobs to a remote host. Use PCONSOLE.EXE from a DOS workstation. Create a new print server to be used to service outgoing print jobs. For the purpose of example, the manual will use SDLP_PSERVER as the print server name. Do not give the print server a password. Create any print queues that you may need, if you are not using existing print queues. Edit the file SYS:ETC\HOSTS. You will need to add the host name of each host that you wish to send jobs to. For further assistance, please read Novell's "TCP/IP Transport Supervisor Guide" for details on the format of the HOSTS file. From the server console, load SDLPCONF.NLM if it is not currently loaded. Select the option for Job Print Server. A dialog will be shown, press enter to change the print server. A list of print servers will be displayed. Select the print server you created, such as SDLP_PSERVER, and press enter. The name of the print server should now be displayed in the Outgoing Job Print Server dialog box. Press to return to the main menu. Select the menu option for Outgoing Queues. A list will be shown. To configure a previously installed queue, select the queue and press enter. To configure a new queue, press , and a list of queues will be displayed. Select one and press enter. The dialog shown below will be displayed. Outgoing Queue Options Data Translation: Automatic Banner Name For User: YES Fix CTRL-D: YES Retry Rejected Jobs: YES Target Host: odell.sdesign.com Target Queue: lp Page - 7 Data Translation: This option controls any text translations needed between DOS and UNIX systems. Options are Binary: No translations CR/LF->LF: Always translate all jobs. Automatic: Uses CR/LF->LF only when job type is TEXT In the capture command, you can specify this setting. "Capture -NT" will cause jobs to be spooled as BINARY, omitting this option causes jobs to be submitted as TEXT. This option can also be set with PRINTCON.EXE for print job definitions. Banner Name For User: When sending a print job to a LPD host, the source user is specified as the print job client. If Banner Name For User is set to YES, the banner name will be used for the user name rather than the client name of the print job. Use PCONSOLE.EXE to view a print job information screen to see the client name and banner name of a print job. This feature is useful in a situation where a Macintosh submits a job to a queue without being logged into the file server. The client name will be ATPS_QUSER however the banner name will reflect the computer that sent the print job. Fix CTRL-D: Some print drivers place an ASCII 0x04 character (CTRL D) on the beginning of a postscript print job. Postscript interpreters often use this to mark the end of a file. When Fix CTRL-D is set to YES, SDLP will remove the CTRL-D character at the beginning of a print job when it is immediately followed by the character string "%!PS-Adobe" Retry Rejected Jobs: When set to YES, if the remote host rejects the print job, the job will be moved to the end of the queue and attempted again later. If set to NO, the job will be removed from the queue. Jobs may be rejected because the NetWare server or user do not have access to the remote queue, or because the remote host is out of disk space. (If the flag for Service-Restart is not set for a print job, the job is purged regardless of the Retry Rejected Jobs option. Default options for print jobs set the Service-Restart flag however) Target Host: Enter the name of the target machine. This name must be in the file SYS:ETC\HOSTS on the NetWare server. Target Queue: Set this to the print queue on the remote system. Port Numbers: In the main menu, under Miscellaneous Options, there are settings for LPR Low Port and LPR High Port. LPR Low Port and LPR High Port sets the range of TCP ports used for communicating with the UNIX host when sending outgoing print jobs. (Incoming jobs always use port 515) RFC 1179 specifies that the source port must be from 721 to 731 inclusive. Many UNIX lpd daemons will accept connections from any port under 1024. Page - 8 If you receive errors concerning "a local port is already in use," try adjusting the High and Low Port settings to allow for a wider range of ports to use while sending jobs. e.g., try a range of 700 to 900. The Netware TCP software seems to take an inordinate amount of time to dispose of ports after a connection has terminated. (ports that are in a 2MSL timeWait state) SDLP will cycle through the ports specified by the LPR Low & High port settings when connecting to remote hosts. If many print jobs are being transferred, it is possible that all 10 ports will be in a timeWait state. This problem is corrected by expanding the range of source ports to accomodate this itmeout. See Stevens, 1994, Pp 242-243 for more information. hosts.lpd: On your target host system, you will need to edit the hosts.lpd file. Many systems keep this file in the /etc directory. Add the full host name of the NetWare file server to this file. Please consult your documentation for your UNIX system for details on the /etc/hosts.lpd file. Page - 9 Receiving Print Jobs From UNIX Systems SDLP can receive print jobs from remote hosts. Incoming jobs are received on TCP socket 515, and a NetWare thread is created to handle the connection. Data is queued into a temporary file in the NetWare queue's directory, and placed into a NetWare print job when the transfer is complete. Use PCONSOLE.EXE from a DOS workstation. Create any print queues that you may need if you are not using existing print queues. Edit the file SYS:ETC\HOSTS. You will need to add the host name of each host that you wish to receive jobs from. For further assistance, read Novell's "TCP/IP Transport Supervisor Guide" for details on the format of the file. From the server console, load the SDLPCONF.NLM if it is not currently loaded. Select the menu option for Incoming Queues. A list will be shown. To configure a previously installed queue, select the queue name and press enter. To configure a new queue, press INS, and a list of queues will be displayed. Select one and press enter. The dialog shown below will be displayed. Incoming Queue Options Data Translation: Automatic Suppress Form Feed: YES Suppress Banners: YES Host Access Control: NO Host Access List: < Edit List > PostScript Job Form Number: 0 PostScript Job Prefix File: PS-HEAD.DAT PostScript Job Suffix File: HP-RESET.DAT Binary Job Form Number: 0 Binary Job Prefix File: PCL-HEAD.DAT Binary Job Suffix File: HP-RESET.DAT Text Job Form Number: 0 Text Job Prefix File: PCL-HEAD.DAT Text Job Suffix File: HP-RESET.DAT Other Job Form Number: 0 Other Job Prefix File: Other Job Suffix File: Data Translation: This option controls any text translations needed between DOS and UNIX systems. Options are Binary: No translations LF->CR/LF: Always translate all jobs. Automatic: Uses LF to CR/LF only when job type is TEXT Page - 10 Suppress Form Feed: This option sets or disables the print job flag to suppress from feeds after the print job has finished printing. Suppress Banners: If this option is set to YES, no banner pages will be printed. If set to NO, banner pages will be printed if requested by the incoming print job. UNIX print jobs usually request banners unless lpr is used with the -h option. A job submitted as PostScript will have the banner suppressed regardless of the Suppress Banners option setting. Host Access Control: If set to NO, all hosts will be allowed to print to configured print queues. If set to YES, the host name will be checked with the list configured in the Host Access List option. If the host does not exist in the list, the connection will be closed and the job will be rejected. To add hosts to the list, select the Host Access List and press . A list will be displayed. Press to add a host name, or to remove a host name. Form Numbers: Four options for controlling the NetWare print job form types are provided for different types of print jobs. Most UNIX implementations will send jobs in text format by default. UNIX users can use the lpr option -l to print binary. Care should be taken when changing the form number from the default. Print servers can be configured to service only one form type, and will prompt a system administrator for form changes when the print server encounters a different form type. The default is to set all form types to 0. Prefix and Suffix files: Four options for adding data to the beginning or the end of an incoming print job are provided. This is useful for queues serviced by language switching printers. With this option, you can specify a file name, or leave the option blank. All files used for this option must be placed in the SYS:SYSTEM\SDLPFILT\ directory. Several sample files are provided for your reference. The file LINEPRT.PS can be added as a prefix to text files when the queue is serviced by a PostScript printer. Please read the LINEPRT.PS file for further details. The sample file PS-HEAD.DAT will switch a HP3si into PostScript mode, PCL-HEAD.DAT will switch a HP3si printer to PCl mode. HP-RESET.DAT will switch a HP3si printer back to the default printer mode. In the Miscellaneous Options in the main menu, a setting for Max Concurrent Incoming Jobs can be set. This sets a limit to the number of print jobs SDLP will accept at once. Each incoming print job will create a process (and consume processor time) on the NetWare file server. System Administrators may wish to limit the number of processes that SDLP can create with this option on slower systems. Page - 11 Options for /etc/printcap on UNIX systems: The following list is a partial listing of options for the UNIX lpd software. You should consult your documentation for a complete listing of features. Note that the \ character is used to note that the printcap entry continues on the next line. Each option is separated by a : character. An example entry on a UNIX system might resemble the following: lp|printq_0:\ :sd=/usr/spool/lp:\ :sh:\ :mx#0:\ :lp=:\ :rm=odell.sdesign.com:\ :rp=printq_0:\ :lf=/var/adm/lp.log: lp (or printq_0) Identifies the print queue to the lpd software. Multiple names for the queue may be listed, each separated by a | character. The : character ends the print queue name field. The remaining fields are options for the print queue sd Directory where the UNIX system stores the queue files. sh Suppress printing of banner page. mx Maximum file size (in blocks) zero=unlimited. rm Host name for remote printer. (For use with SDLP, this should be the host name of your NetWare server) lp Device to send print output. For remote hosts, this should be left blank or omitted. rp Print queue name on remote host. (For use with SDLP, this should be the print queue name on the NetWare file server) lf Log file name. Most LPD software packages will only transfer jobs to remote hosts when configured with a remote printer. This will cause options such as input and output filters to be ignored for remote printers. For more information, consult the documentation on your LPR/LPD software for your UNIX host. Page - 12 LPD control codes supported by SDLP for incoming jobs: The following is a list of printer command codes supported by SDLP. This is provided as a reference to system programmers. H Host name where the job was printed. L User name of the job. This specifies the job requests a banner page. N Full path name of the source file. P Login name of the job owner. The "banner name" field will reflect this if the L option was not used. J Job description for the print job. File control codes supported by SDLP: f Print file as TEXT l Print file including control characters. (BINARY) o Print file as PostScript (Banner page is always suppressed) c Print CIF file, submitted as Other job type. d Print DVI file, submitted as Other job type. g PLOT file, submitted as Other job type. n Print ditrof file, submitted as Other job type. p Print PR format file, submitted as Other job type. r Print Fortran file, submitted as Other job type. t Print troff file, submitted as Other job type. v Print raster file, submitted as Other job type. UNIX host functions Support for remote queue inquiries is supported by SDLP. From a UNIX host, you may use the lpq program to check the status and contents of a queue. Support for lprm is not provided. For specific lpr options, consult your UNIX system software documentation. Some lpr options that may be useful include: -h Suppress banner pages -l Print with control characters. (Send job as binary) -J Add job description. This option is usually suppressed by the -h option. Example: lpr -J"My Print File" /tmp/text.file -P Specify the UNIX print queue. lpr -Pprintq_0 /tmp/text.file Page - 13 Transferring Print Jobs Between NetWare Servers One use for SDLP is in systems that distribute servers at multiple offices on a wide area TCP/IP network, such as the Internet. SDLP can be configured to transfer print jobs to and from NetWare servers on each site. In such a setup, users at each site can print to printers at remote sites without having to login or attach to file servers across a potentially slow link. Print jobs could be queued on local servers even when the wide area network is not functioning. Transfers to remote sites would begin as soon as the wide area network becomes operational again. Below is an illustration of this setup: In this example, a NetWare server in New York and a NetWare server in Los Angles are using SDLP to transfer print jobs to each other. Each server has a local print queue and printer. In addition, each server has a local print queue that is serviced by SDLP. On the file server LA_SERVER, the NY_QUEUE is serviced by SDLP and the print jobs are transferred to the server in New York. SDLP on the server NY_SERVER is configured to receive jobs and place them in the queue NY_QUEUE. In the same manner, the file server in New York transfers print jobs from one of its' print queues to the LA_SERVER. SDLP is configured on each server to receive print jobs for the local print queues that are attached to local printers. This configuration allows a user attached only to the server in Los Angles to print to a local printer, or print to the queue NY_QUEUE and have the print job transferred to New York for printing there. Page - 14 Troubleshooting Before installing SDLP, you should upgrade your file server's TCPIP.NLM to v2.02m. This includes several bug fixes that are outlined in the upgrade software. If SDLP.NLM or SDLPCONF.NLM fail to load and symbol not found errors are reported, you may need to upgrade some of the file server's NLMs. See the section on System Requirements for details on the specific versions required. If errors are reported that a host name can not be found, you may need to add the complete host name to the SYS:ETC\HOSTS file. If SDLP or the UNIX system attempts to connect and is not successful, it is possible that the TCPIP.NLM is not configured correctly. Check to see if a user on another workstation or UNIX host can ping the NetWare server by IP address AND by host name. Jobs transferred to UNIX hosts to be printed appear to be double spaced: This is often caused by not removing the CR/LF markers from DOS text files. Make sure the outgoing job translation is set to Automatic or Translate CR/LF->LF and that the print job is submitted to the queue as TEXT. If the job is submitted as BINARY to the NetWare queue configured for Automatic translation, you will need to set the job type to TEXT in your print job definition. Print jobs sent from UNIX hosts print with a stair step effect. Each line of text is vertically below the line above however the text does not begin at the left margin. This is often caused by not translating the UNIX LF (line feed) character into a CR/LF pair. Check to make sure the incoming queue translation is set to Automatic or LF->CR/LF. Text jobs should not be sent from the UNIX lpr program with the -l option. If SDLP takes a long time to unload while a connection to a remote machine is waiting to time out, you may need to upgrade to v2.02m of the TCPIP.NLM. In some of our test it took as long as 20 minutes for a connection to time-out while connecting to a nonexistent remote host with TCPIP.NLM v1.00. With the newer TCPIP.NLM, this has been reduced to about 45 seconds. If you are unable to determine the source of a problem with SDLP, set the log level to NOISE in the SDLPCONF.NLM (in the Miscellaneous options menu) This will give many more error and notice messages while processing print jobs. Page - 15 About Secure Design If you would like information about our products, please contact us at the following address. Secure Design PO Box 475 Corvallis, OR 97339 USA Internet: support@sdesign.com (or sdesign@mcimail.com) Mail Server: autohelp@sdesign.com Phone: (503) 752-5988 Fax/BBS: (503) 752-5990 Demo products and software updates can be obtained by Internet e-mail by sending a message to autohelp@sdesign.com with a subject of "help" or by calling the BBS number as listed above. For information about World Wide Web (WWW) services and site names, please send a message to autohelp@sdesign.com with a subject of "help". For complete ordering and address information, use the CATALOG.TXT file provided with this software. For Further Reading McLaughlin III, 1990. "Line Printer Daemon Protocol," RFC 1179, 14 pages (Aug.) Novell, Inc., TCP/IP Transport Supervisor's Guide. Novell, Inc. (available by FTP from ftp.novell.com) Stevens, W. R. 1994. TCP/IP Illustrated Volume 1. Addison-Wesley, Reading, Massachusetts Stevens, W. R. 1990. UNIX Network Programming. Prentice Hall, Englewood Cliffs, New Jersey. Page - 16