Leaked source code of windows server 2003
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.

138 lines
4.6 KiB

  1. AUTHOR: MohsinA,
  2. DATE: 12-Mar-97.
  3. FILE: //KERNEL/RAZZLE3/src/sockets/tcpsvcs/lpd/readme
  4. SYNOPSIS: line printing subsystem notes on usage/test/build.
  5. =======================================================================
  6. Build with CFLAGS=-DDBG and it will
  7. Log to %windir%\system32\spool\lpd.log
  8. Very Detailed logging:
  9. If data filename has 'debug' string in its name.
  10. If printer name has 'debug' string in it.
  11. Or if any of these names are NULL.
  12. =======================================================================
  13. To stop %windir%\system32\lpdsvcs.dll
  14. > tlist
  15. 153 tcpsvcs
  16. That means process id 153, is tcp services, it controls
  17. lpd, we can attach to it with
  18. > ntsd -p 153
  19. > q Quit will kill tcpsvcs, incl. lpd.
  20. ===========================================================================
  21. To test new lpd:
  22. > net stop "tcp/ip print server"
  23. > del %windir%\system32\spool\*.log
  24. > copy obj\i386\lpdsvc.dll %windir%\system32
  25. > net start "tcp/ip print server"
  26. > net start .. Shows all
  27. ===========================================================================
  28. CREATE real or virtual printers to send jobs to - from lpd and spooler.
  29. : Start, Control Panel, Printers, Add printer, My Computer,
  30. Add port, LPR Port + New Port,
  31. Type in "RemoteHostname" and "QueueName" (remote share),
  32. Generic + Generic/Text Only, Keep Existing Driver,
  33. Type in "PrinterName",
  34. Shared, Test Page.
  35. Eg. 157.55.206.12 Shares 1,2,3,4 All in printlab, virtual - paperless.
  36. 157.55.206.13
  37. 157.55.206.14
  38. 157.55.206.15
  39. LPD => Spooler => LPRMON => tcpip.
  40. ^^^^^^^^^^^^^^^^ This is what you added.
  41. Now try it out by sending a job.
  42. > lpr -S localhost -P "PrinterName" testdebug.txt
  43. Now see you job queuing up and printing, in the UI, and in lpq.
  44. : Start, Control Panel, Printers, PrinterName
  45. > lpq -S localhost -P "PrinterName"
  46. Now see the debug log generated by lpd.
  47. > vi %windir%\system32\lpd.log
  48. ===========================================================================
  49. To test lprmon.dll
  50. The spooler must be running to process the jobs given to it by LPD.
  51. > net start spooler
  52. The spooler loads lprmon.dll, if you want to test a new lprmon.dll
  53. you need to
  54. > net stop spooler
  55. > copy tcpcmd\lprmon\monitor\obj\i386\lprmon.dll %windir%\system32
  56. > copy tcpcmd\lprmon\lprhelp\obj\i386\lprhelp.dll %windir%\system32
  57. > del %windir%\system32\spool\*.log
  58. > net start spooler
  59. =======================================================================
  60. LPD listens on tcp: port 515 for print requests.
  61. These request come from
  62. > lpr -S servername_running_lpd -P printername -other_options filename
  63. LPR opens a socket to the lpd server on remote port 515,
  64. and sends the data file to LPD.
  65. LPD spools the file and calls win32 OpenPrinter(), SetJob() etc
  66. to send the data file to the Spooler.
  67. =======================================================================
  68. LPQ displays line printer queue status, it contacts LPD
  69. over a tcp socket and gets the complete status as a string.
  70. LPQ can also query tcpip printers to obtain status.
  71. =======================================================================
  72. // Donot change the message LPD_LOGO, lpq/lprhelp use this banner to
  73. // identify NT lpd services on a mixed network.
  74. // Because NT lpd doesn't impose the 721-721 port restrictions
  75. // of RFC 1179.
  76. Most lpd's don't impose this!
  77. Turned off detection in sp3.
  78. ===========================================================================
  79. Changed STRING_POSTSCRIPT_HEADER from "%!PS" to "%!"
  80. to support older PS format detection.
  81. MohsinA, 27-Mar-97.
  82. ===========================================================================
  83. ReadDataEx: Overlapped io not so useful.
  84. -D PROFILING added to see queue wait times.
  85. Thread pooling under test, maximum threads created are defined by registry:
  86. My Computer\HKEY_LOCAL_MACHINE\
  87. System\\CurrentControlSet\\Services\\LPDSVC\\PARAMETERS\
  88. \MaxConcurrentUsers -- Max threads, default is 50.
  89. \MaxQueueLength -- Max outstanding jobs not yet processed
  90. but accepted by lpd for printing.
  91. default is 100.
  92. MohsinA, 28-Apr-97.
  93. ===========================================================================
  94. Put a recv timeout with select, otherwise bad/dead/dud clients never
  95. reply and suck up a worker thread.
  96. MohsinA, 02-May-97.
  97. ===========================================================================