I was just cursing the silly Tek Phaser printer,  and modifying
the printcap entry:

lp:lp=10.0.0.15%9100
  :ifhp=legal
  :filter=/.../ifhp

->

lp:lp=/dev/null
  :ifhp=legal,appsocket
  :filter=/.../ifhp

I said to myself, "I really think having to have a dummy
IO device is silly.  But I need to get the IP address
so that I can reopen it."

When I phrased the comment like that to myself,  I realized
that if
a) I tested to see if fd 1 was a network connection
b) I used the getpeername() call to get the IP address
THEN I would not have to do this.

IFHP CHANGES:

You do not have to use /dev/null with appsocket any more
if you are using network connections.  If you have an actual
device (printer, etc) then it checks to see if you have
a printcap entry in the PRINTCAP_ENTRY environment variable
and tries to get the lp=xxx name.

Patrick Powell                 Astart Technologies,
[EMAIL PROTECTED]            9475 Chesapeake Drive, Suite D,
Network and System             San Diego, CA 92123
  Consulting                   858-874-6543 FAX 858-279-8424 
LPRng - Print Spooler (http://www.astart.com)

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to