Can CUPS filter driver get the IP info in shared printer environment

Michael Sweet mike at easysw.com
Wed May 6 20:17:03 PDT 2009


keens312 wrote:
>> keens312 wrote:
>>>> keens312 wrote:
>>>>> Hi Michael,
>>>>>
>>>>> A USB printer connected to a CUPS system and shared over network.
>>>>>
>>>>> I want to know if the CUPS system perceive the address of the computer who initiated the printing?
>>>>>
>>>>> The /var/log/cups/error_log cannot log who did the printing, so that's hard to do the admin and accouting works.
>>>> The job-originating-host-name attribute (which is logged in the
>>>> page_log file) specifies the source host of the job.
>>>>
>>> Yes, I can see the info in page_log file.
>>> Is there any cups api that I can use to get the job-originating-host-name in my filter driver?
>> You'll find it as one of the options in argv[5] (for CUPS 1.3/Leopard
>> anyways...)
> 
> Unfortunately, I cannot find the job-orginating-host-name in the arguments passed to my filter.
> What I can got from there is job owner, but I cannot resolve it to get the ip for that.
> Apparently, cupsd does not pass that info down to filters, is this correct?
> So the only for me is to parse the page_log and pick up the IPV6 address to use.
> Any better idea?

I checked, and the job-originating-host-name (note spelling) attribute
is passed as one of the options in 1.3.8 and later, so you'll need
Mac OS X 10.5.5 or later.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com




More information about the cups-devel mailing list