SCO Print Server hacks. My thanks to Kevin Smith ( ) of Shadetree Software for supplying the code for netcat.c as it solved many of my problems dealing with exessively creative print servers. Problems: 1. Different print servers use different network port numbers For example, HP uses 9100, 9101 and 9102 for the EX3. Milan uses 2000, 2001 and 2003 with 2002 reserved for telnet setup. There are others. 2. Each company writes its own print server "driver" which is nothing more than netcat.c with their favorite port numbers hard coded into the binary. A system with many different print servers may have an equal number of printer drivers. 3. HPNP has problems. I won't list them because I'm not interested in fixing hpnp, only replacing it. 4. SCO lpd/lpr uses a fixed port number and cannot be changed without patching the binaries (not a good idea). The fix: 1. Use the stock lp print spooler. However, where it uses the "cat" command to send its output to stdout, replace the "cat" command with "netcat" and some arguements. Building the code: 1. Get netcat.c source from: http://www.cruzio.com/~jeffl/sco/lp/netcat.c or grab the binaries at: http://www.cruzio.com/~jeffl/sco/lp/netcat.omf (ODT) http://www.cruzio.com/~jeffl/sco/lp/netcat.elf (OSR5) http://www.cruzio.com/~jeffl/sco/lp/netcat.aout (Xenix) 2. To compile, run: cc -o netcat netcat.c -lsocket If you have 3.2v4.2, you will need the TCP Development System in order to get the sockets library. OSR5 has it supplied with the standard development system. Command line usage: cat /etc/passwd | /usr/lib/lponlcr | netcat -h hpex3acc -p 9100 Print /etc/password to hpex3acc using port 9100. hp3x3acc is *NOT* the name of the printer as shown by lpstat -t but the host name as defined in /etc/hosts. cat /etc/passwd | /usr/lib/lponlcr | netcat -h 192.168.111.88 -p 2000 Print /etc/password to a Milan MIL3000 print server. cat /etc/passwd | /usr/lib/lponlcr | netcat -d 1 -h hpex3acc -p 9100 Same as above but with debug output.