19
19
<LINK REL="STYLESHEET" HREF="clamdoc.css">
21
<LINK REL="next" HREF="node40.html">
22
<LINK REL="previous" HREF="node38.html">
23
<LINK REL="up" HREF="node37.html">
21
<LINK REL="next" HREF="node44.html">
22
<LINK REL="previous" HREF="node33.html">
23
<LINK REL="up" HREF="node31.html">
24
24
<LINK REL="next" HREF="node40.html">
29
29
<DIV CLASS="navigation"><!--Navigation Panel-->
31
31
HREF="node40.html">
32
32
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
35
35
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
37
37
HREF="node38.html">
38
38
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
41
41
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
43
<B> Next:</B> <A NAME="tex2html703"
44
HREF="node40.html">Error handling</A>
45
<B> Up:</B> <A NAME="tex2html699"
46
HREF="node37.html">API</A>
47
<B> Previous:</B> <A NAME="tex2html693"
48
HREF="node38.html">Header file</A>
49
<B> <A NAME="tex2html701"
43
<B> Next:</B> <A NAME="tex2html710"
44
HREF="node40.html">Header file</A>
45
<B> Up:</B> <A NAME="tex2html706"
46
HREF="node31.html">LibClamAV</A>
47
<B> Previous:</B> <A NAME="tex2html700"
48
HREF="node38.html">Others</A>
49
<B> <A NAME="tex2html708"
50
50
HREF="node1.html">Contents</A></B>
53
53
<!--End of Navigation Panel-->
55
<H3><A NAME="SECTION00073200000000000000">
58
The following set of functions provides an interface for loading
61
const char *cl_retdbdir(void);
63
int cl_load(const char *path, struct cl_engine **engine,
64
unsigned int *signo, unsigned int options);
66
<code>cl_retdbdir</code> returns the default (hardcoded) path to the directory
67
with ClamAV databases.
68
<code>cl_load</code> loads a single database file or all databases from a
69
directory (if <code>path</code> points to a directory). The second argument
70
is used for passing in the engine structure which should be previously
71
initialized with NULL. A number of loaded signatures will be <SPAN CLASS="textbf">added</SPAN>
72
to <code>signo</code> <A NAME="tex2html15"
73
HREF="footnode.html#foot291"><SUP><SPAN CLASS="arabic">7</SPAN></SUP></A>. The last argument can pass the following flags:
76
<LI><SPAN CLASS="textbf">CL_DB_STDOPT</SPAN>
78
This is an alias for a recommended set of scan options.
80
<LI><SPAN CLASS="textbf">CL_DB_PHISHING</SPAN>
82
Load phishing signatures.
84
<LI><SPAN CLASS="textbf">CL_DB_PHISHING_URLS</SPAN>
86
Initialize the phishing detection module and load .wdb and .pdb files.
88
<LI><SPAN CLASS="textbf">CL_DB_PUA</SPAN>
90
Load signatures for Potentially Unwanted Applications.
92
<LI><SPAN CLASS="textbf">CL_DB_CVDNOTMP</SPAN>
94
Load CVD files directly without unpacking them into a temporary
55
<H2><A NAME="SECTION00073000000000000000">
61
<!--Table of Child-Links-->
62
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
64
<UL CLASS="ChildLinks">
65
<LI><A NAME="tex2html711"
66
HREF="node40.html">Header file</A>
67
<LI><A NAME="tex2html712"
68
HREF="node41.html">Database loading</A>
69
<LI><A NAME="tex2html713"
70
HREF="node42.html">Error handling</A>
71
<LI><A NAME="tex2html714"
72
HREF="node43.html">Engine structure</A>
99
<code>cl_load</code> returns 0 (<code>CL_SUCCESS</code>) on success and a negative
103
struct cl_engine *engine = NULL;
104
unsigned int sigs = 0;
107
ret = cl_load(cl_retdbdir(), &engine, &sigs, CL_DB_STDOPT);
74
<!--End of Table of Child-Links-->