lpd to tcp stream?

lpd to tcp stream?

Post by Eric Peters » Sat, 29 Jan 1994 13:18:04

        I have a printer that takes a raw tcp stream (ie. no lpd is there
        listening), is it possible to tell lpd (generic bsd style) to blast
        data to it?  I have found two possible workarounds (which may or may
        not be "conventional" to use):

                1. Create a output filter (via 'of:') that takes stdin and
                blasts it out to the printer.  Possible problems: does
                lpd reqeure anything to come out of an output filter's
                stdout?  Do I just set "lp=/dev/null" ?  What if the
                user wants a "real" filter in his print stream (eg.
                ascii to ps, etc.)?

                2. Create a program that listens on a named pipe or unix domain
                socket and blasts the tcp data out.  Then I would set
                "lp=/dev/my_socket".  This seems a bit better from lpd's
                perspective, but also seems a bit more like a hack...

        What would be ideal is for there to be a means in printcap to specify
        a host/port pair to treat as a printer, but to my knowledge that
        doesn't exist.  

        Thanks in advance for any hints or pointers.




1. How can i detect that a client has closed a TCP-stream connection ???

i have a client-server communication via TCP-stream socket
When the client closes its socket, and the server still sends data via
the invalid socket descriptor, the write does not return an error, but
it seems to exit the server programm ?!?!?
How can the server detect, that the client has closed its socket ????
I still repeat: the write does not return an error !!!

Thanx very very much,

J. Riedel

2. dual processors

3. TCP stream client

4. Virtual Apache Quesion

5. lpd & TCP/IP - dead daemon prob. as in FAQ & HOW-TO - Help!

6. Logs Analysis with servers and virtual hosts

7. XDR and TCP streams

8. Crossposting question (long) (was MS Intellimouse)

9. TCP/IP via streams

10. tcp streams module

11. REQ: How to set up LPD SCO Unix remote que to AS400 with TCP/IP

12. sniffer with TCP stream reconstruction?

13. parallel TCP streams increasing total throughput?