~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to docs/html/node44.html

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8
8
<HTML>
9
9
<HEAD>
10
 
<TITLE>Database loading</TITLE>
11
 
<META NAME="description" CONTENT="Database loading">
 
10
<TITLE>Header file</TITLE>
 
11
<META NAME="description" CONTENT="Header file">
12
12
<META NAME="keywords" CONTENT="clamdoc">
13
13
<META NAME="resource-type" CONTENT="document">
14
14
<META NAME="distribution" CONTENT="global">
27
27
<BODY >
28
28
 
29
29
<DIV CLASS="navigation"><!--Navigation Panel-->
30
 
<A NAME="tex2html783"
 
30
<A NAME="tex2html797"
31
31
  HREF="node45.html">
32
32
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
33
 
<A NAME="tex2html779"
 
33
<A NAME="tex2html793"
34
34
  HREF="node43.html">
35
35
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
36
 
<A NAME="tex2html773"
 
36
<A NAME="tex2html787"
37
37
  HREF="node43.html">
38
38
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
39
 
<A NAME="tex2html781"
 
39
<A NAME="tex2html795"
40
40
  HREF="node1.html">
41
41
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>  
42
42
<BR>
43
 
<B> Next:</B> <A NAME="tex2html784"
44
 
  HREF="node45.html">Error handling</A>
45
 
<B> Up:</B> <A NAME="tex2html780"
46
 
  HREF="node43.html">Initialization</A>
47
 
<B> Previous:</B> <A NAME="tex2html774"
48
 
  HREF="node43.html">Initialization</A>
49
 
 &nbsp; <B>  <A NAME="tex2html782"
 
43
<B> Next:</B> <A NAME="tex2html798"
 
44
  HREF="node45.html">Initialization</A>
 
45
<B> Up:</B> <A NAME="tex2html794"
 
46
  HREF="node43.html">API</A>
 
47
<B> Previous:</B> <A NAME="tex2html788"
 
48
  HREF="node43.html">API</A>
 
49
 &nbsp; <B>  <A NAME="tex2html796"
50
50
  HREF="node1.html">Contents</A></B> 
51
51
<BR>
52
52
<BR></DIV>
53
53
<!--End of Navigation Panel-->
54
54
 
55
 
<H3><A NAME="SECTION00074100000000000000">
56
 
Database loading</A>
 
55
<H3><A NAME="SECTION00073100000000000000">
 
56
Header file</A>
57
57
</H3>
58
 
    The following set of functions provides an interface for loading
59
 
    the virus database:
60
 
    <PRE>
61
 
        const char *cl_retdbdir(void);
62
 
 
63
 
        int cl_load(const char *path, struct cl_engine *engine,
64
 
                    unsigned int *signo, unsigned int options);
65
 
</PRE>
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
 
    given directory (when <code>path</code> points to a directory). The second
70
 
    argument is used for passing in the pointer to the engine that should
71
 
    be previously allocated with <code>cl_engine_new()</code>. A number of loaded
72
 
    signatures will be <SPAN  CLASS="textbf">added</SPAN> to <code>signo</code> <A NAME="tex2html20"
73
 
  HREF="footnode.html#foot325"><SUP><SPAN CLASS="arabic">8</SPAN></SUP></A>. The last argument can
74
 
    pass the following flags:
75
 
    
76
 
<UL>
77
 
<LI><SPAN  CLASS="textbf">CL_DB_STDOPT</SPAN>
78
 
<BR>
79
 
This is an alias for a recommended set of scan options.
80
 
</LI>
81
 
<LI><SPAN  CLASS="textbf">CL_DB_PHISHING</SPAN>
82
 
<BR>
83
 
Load phishing signatures.
84
 
</LI>
85
 
<LI><SPAN  CLASS="textbf">CL_DB_PHISHING_URLS</SPAN>
86
 
<BR>
87
 
Initialize the phishing detection module and load .wdb and .pdb files.
88
 
</LI>
89
 
<LI><SPAN  CLASS="textbf">CL_DB_PUA</SPAN>
90
 
<BR>
91
 
Load signatures for Potentially Unwanted Applications.
92
 
</LI>
93
 
<LI><SPAN  CLASS="textbf">CL_DB_CVDNOTMP</SPAN>
94
 
<BR>
95
 
Load CVD files directly without unpacking them into a temporary
96
 
        directory.
97
 
    
98
 
</LI>
99
 
</UL>
100
 
    <code>cl_load()</code> returns <code>CL_SUCCESS</code> on success and another code on
101
 
    failure.
102
 
    <PRE>
103
 
            ...
104
 
            struct cl_engine *engine;
105
 
            unsigned int sigs = 0;
106
 
            int ret;
107
 
 
108
 
        if((ret = cl_init()) != CL_SUCCESS) {
109
 
            printf("cl_init() error: %s\n", cl_strerror(ret));
110
 
            return 1;
111
 
        }
112
 
 
113
 
        if(!(engine = cl_engine_new())) {
114
 
            printf("Can't create new engine\n");
115
 
            return 1;
116
 
        }
117
 
 
118
 
        ret = cl_load(cl_retdbdir(), engine, &amp;sigs, CL_DB_STDOPT);
 
58
    Every program using libclamav must include the header file <code>clamav.h</code>:
 
59
    <PRE>
 
60
        #include &lt;clamav.h&gt;
119
61
</PRE>
120
62
 
121
63
<P>
122
64
<BR><HR>
123
65
<ADDRESS>
124
66
Tomasz Kojm
125
 
2009-10-28
 
67
2010-03-10
126
68
</ADDRESS>
127
69
</BODY>
128
70
</HTML>