I am in the attempt of porting some of our software to C from Perl, and I need some information.
In our printcap file we have our af option set to af=127.0.0.1%950, which writes the LPRng accounting info
to port 950 on localhost (obviously).
Now the original server, written in Perl, as I said, simply maps STDIN to this port and then runs some regexp
on the input, such as:
if(/\start.* -k([^ ']*)/*){$jobid=$1;}
Now if I am writing this in C, I need to read all the info into some buffer, and then extract the info needed from that buffer.
So what I need to know is how does LPRng write this info to port 950 (or wherever). Is it written all in one go, so I can read it unit EOF, is it a string, so I could read it until unitl '\0', or is it several strings?
I have the example given in Section 18.3 of the LPRng Reference, but any further info would be invaluable.
Thanks
Gareth Ansell UNIX Team Infrastructure Coventry University
----------------------------------------------------------------------------- YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests or lprng-digest-requests) with the word 'help' in the body. For the impatient, to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] with: | example: subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word LPRNGLIST in the SUBJECT line. -----------------------------------------------------------------------------
