You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4.6 KiB
4.6 KiB
AUTHOR: MohsinA,
DATE: 12-Mar-97.
FILE: //KERNEL/RAZZLE3/src/sockets/tcpsvcs/lpd/readme
SYNOPSIS: line printing subsystem notes on usage/test/build.
=======================================================================
Build with CFLAGS=-DDBG and it will
Log to %windir%\system32\spool\lpd.log
Very Detailed logging:
If data filename has 'debug' string in its name.
If printer name has 'debug' string in it.
Or if any of these names are NULL.
=======================================================================
To stop %windir%\system32\lpdsvcs.dll
> tlist
153 tcpsvcs
That means process id 153, is tcp services, it controls
lpd, we can attach to it with
> ntsd -p 153
> q Quit will kill tcpsvcs, incl. lpd.
===========================================================================
To test new lpd:
> net stop "tcp/ip print server"
> del %windir%\system32\spool\*.log
> copy obj\i386\lpdsvc.dll %windir%\system32
> net start "tcp/ip print server"
> net start .. Shows all
===========================================================================
CREATE real or virtual printers to send jobs to - from lpd and spooler.
: Start, Control Panel, Printers, Add printer, My Computer,
Add port, LPR Port + New Port,
Type in "RemoteHostname" and "QueueName" (remote share),
Generic + Generic/Text Only, Keep Existing Driver,
Type in "PrinterName",
Shared, Test Page.
Eg. 157.55.206.12 Shares 1,2,3,4 All in printlab, virtual - paperless.
157.55.206.13
157.55.206.14
157.55.206.15
LPD => Spooler => LPRMON => tcpip.
^^^^^^^^^^^^^^^^ This is what you added.
Now try it out by sending a job.
> lpr -S localhost -P "PrinterName" testdebug.txt
Now see you job queuing up and printing, in the UI, and in lpq.
: Start, Control Panel, Printers, PrinterName
> lpq -S localhost -P "PrinterName"
Now see the debug log generated by lpd.
> vi %windir%\system32\lpd.log
===========================================================================
To test lprmon.dll
The spooler must be running to process the jobs given to it by LPD.
> net start spooler
The spooler loads lprmon.dll, if you want to test a new lprmon.dll
you need to
> net stop spooler
> copy tcpcmd\lprmon\monitor\obj\i386\lprmon.dll %windir%\system32
> copy tcpcmd\lprmon\lprhelp\obj\i386\lprhelp.dll %windir%\system32
> del %windir%\system32\spool\*.log
> net start spooler
=======================================================================
LPD listens on tcp: port 515 for print requests.
These request come from
> lpr -S servername_running_lpd -P printername -other_options filename
LPR opens a socket to the lpd server on remote port 515,
and sends the data file to LPD.
LPD spools the file and calls win32 OpenPrinter(), SetJob() etc
to send the data file to the Spooler.
=======================================================================
LPQ displays line printer queue status, it contacts LPD
over a tcp socket and gets the complete status as a string.
LPQ can also query tcpip printers to obtain status.
=======================================================================
// Donot change the message LPD_LOGO, lpq/lprhelp use this banner to
// identify NT lpd services on a mixed network.
// Because NT lpd doesn't impose the 721-721 port restrictions
// of RFC 1179.
Most lpd's don't impose this!
Turned off detection in sp3.
===========================================================================
Changed STRING_POSTSCRIPT_HEADER from "%!PS" to "%!"
to support older PS format detection.
MohsinA, 27-Mar-97.
===========================================================================
ReadDataEx: Overlapped io not so useful.
-D PROFILING added to see queue wait times.
Thread pooling under test, maximum threads created are defined by registry:
My Computer\HKEY_LOCAL_MACHINE\
System\\CurrentControlSet\\Services\\LPDSVC\\PARAMETERS\
\MaxConcurrentUsers -- Max threads, default is 50.
\MaxQueueLength -- Max outstanding jobs not yet processed
but accepted by lpd for printing.
default is 100.
MohsinA, 28-Apr-97.
===========================================================================
Put a recv timeout with select, otherwise bad/dead/dud clients never
reply and suck up a worker thread.
MohsinA, 02-May-97.
===========================================================================