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

keens312 keens312 at hotmail.com
Wed May 6 19:20:08 PDT 2009


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





More information about the cups mailing list