Need to get IP address of computer sending job
Gary Carroll
garycarroll at nospamcharter.net
Sat Oct 20 14:01:01 PDT 2007
OS = Mac OS 10.4
I have set up a shared print queue that writes incoming jobs to a folder
as PDF. I would like record about each job with information concerning
the username, time sent (not always the same as time processed into
PDF!), IP/MAC address of the system sending the data, and formatting
requests from the original PostScript such as staple, duplex/simplex,
etc.
I believe can get the formatting requests by examining the incoming
PostScript with a CUPS prefilter before it is converted to PDF.
Since all users will be on the LAN I should in theory be able to get
their MAC address by issuing an ³arp IP-address² shell command. However,
I would need to know their IP address to do so. I don't know if this is
visible to CUPS.
Do I have to sniff packets to get this data? If so, does it seem
reasonable to have a tshark process started with a filter that writes
only the relevant portions of incoming print jobs to a file which can be
read via the prefilter to get the needed data?
Does someone have a better suggestion?
More information about the cups
mailing list