That was described in the sentence you have removed in your quoting.

Ahh, yes, the cl_scanbuff method seems synonymous with cl_scandesc(... ... ... CL_SCAN_RAW). Thanks for your help there.


I rewrote my code to produce a tempfile and then use that descriptor
to use the cl_scandesc ... method. This works with the tempfile
and I'm pretty happy with it. All of the magic that happens with file header and signatures takes place.


The only problem that remains is the temp file access. What I would prefer to do is instead use a call to pipe() and then use the pipe file descriptor to avoid the tempfiles for performance.

e.g:

--start code--


int pfd[2];

if (pipe(pfd) == -1){
   /* an error occurred */
}

write(pfd[1], buff, length);

ret = cl_scandesc(pdf[0], &virname, &size, root, &limits, CL_SCAN_STDOPT);


--end code--

The problem is, this never seems to work. Any suggestions on why the pipe FD will not work with the API call are appreciated.

Regards,
------------------------------------------------------------------
Gregory "Gus" Class
Develper, Spam Arrest LLC
http://gregoryclass.com
_______________________________________________
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-devel

Reply via email to