Is there any way I can get access to the source host (IP) of a
print job in a filter?


In LPRng you can filter the control file as it arrives on a machine
using the printcap entry
    :incoming_control_filter=/.../filter_program

This allows the filter to correct problems in the information being
recieved by LPRng.

For example...
    We use it to correct the username of printjobs comming from
    Novell servers.

    EG: Correct the entry   P.user.group.domain  to   Puser

    This in turn allows the user to delete his novell sumbitted print
    jobs from a UNIX machine (using SAMEUSER permissions in lpd.perms).


We would like to extend this functionality further, referencing other
information sources, but to do so I need access the "originating
hostname" (REMOTEIP) of the printjob.

NOTE: this is NOT the "hostname" in the control file, (which Windows
2000 often have set incorrectly) but the host (or IP) that is passing
the printjob to the LPRng server.  Lpd does have access to this
information as it uses it for "permission checking".


Is there any way I can access this info?

Even a small hack of the LPRng source code would be acceptable!


I have examined the environment passwd to the filter but no reference to
the source host is currently available, not even from a network
filehandle.
  Anthony Thyssen ( System Programmer )    http://www.sct.gu.edu.au/~anthony/
 -----------------------------------------------------------------------------
  As flat as an open can of coke, left on a programmer's desk over the weekend.
                                          --- Rick Cook, ``Wizardry Consulted''
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.sct.gu.edu.au/~anthony/

-----------------------------------------------------------------------------
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