[cups.development] want to original client host to appear in lprcontrol file....

wtautz wtautz at cs.uwaterloo.ca
Thu Sep 28 11:12:33 PDT 2006


Michael Sweet wrote:
> wtautz wrote:
>   
>> ...
>> The localhost variable is set by
>>
>> httpGetHostname(NULL, localhost, sizeof(localhost));
>>
>> I think.
>>     
>
> Correct.
>
>   
>> I would like to have the value be
>>
>> job-originating-host-name
>>
>> attribute which I believe I can get via
>>
>> (attr = ippFindAttribute(job->attrs, "job-originating-host-name",
>>                                IPP_TAG_ZERO)) != NULL)
>>
>> I think attr is a pointer to some kind of record? Hopefully its a string.
>>     
>
> You'll need to do an IPP request to the local server to get the
> job-originating-host-name value from an IPP_GET_JOB_ATTRIBUTES
> request.  Unfortunately, it isn't just a couple of lines of code,
> more like a couple dozen...
>   
Oh great....:-( It would seem one has to drill down all
the structs... Ok. I know the jobid. What do I do with that?
Is there any way to pass more information to the backend....
not just job id. Sounds like this is the way to go.
It seems that I should make use of ippNewRequest


On another tangent:
=============
How do I print out the whole job characteristics....in general, not
necessarily
from backend/lpd.c, i.e., just for kicks so I can look at it :-)


So when a job arrives on 631 port what does cupsd do with it if
the deviceURI contains lpd://servername/print-queue?reserve=yes?
What the sequence of functions calls? Where does cupsd exec the backends...
How would I print out the full job attributes...not necessarily from lpd
but in
cupsd. I feel like I'm in a dark room bumping into objects I can't see...

Keep in mind I've only had a handful of assignments in C code years back....
I willing to learn but feeling a little overwhelmed...perhaps reading
rfc would help?


The cups-dev list seems rather unused?

walter








More information about the cups mailing list