[cups.general] Can the host field in a lpr control file be madetocontain client hostname for browsed printers?

wtautz wtautz at cs.uwaterloo.ca
Thu Sep 28 07:30:51 PDT 2006


Michael Sweet wrote:
> wtautz wrote:
>   
>> Michael Sweet wrote:
>>     
>>> wtautz wrote:
>>>   
>>>       
>>>> ...
>>>> Question: Is there a way to make the H field have the client hostname
>>>> even for browsed printers?
>>>>     
>>>>         
>>> No, sorry.
>>>
>>>   
>>>       
>> Just out of curiosity could you tell me what part of the source code
>> is responsible for generating the H field in lpr control files?
>>     
>
> The lpd_queue() function does this; you *might* be able to update the
> backend to get the job-originating-host-name attribute and use that
> instead of the local hostname...
>
>   

How would I extract the value job-originating-host-name? It
appears I need ippFindAttribute which seems to require
some special inputs... job->attrs ? The return type of ippFindAttribute
is rather convoluted...at least upon first examination... a few extra hints
would be appreciated...I've managed to put in some debug code into
lpd.c. the function snprintf seems to be responsible for constructing
the header. So if I could replace the localhost value there with the
job-originating-host-name
I think I might be in business.

walter





More information about the cups mailing list