1 /* @(#) $Id: ./src/config/config.h, 2011/09/08 dcid Exp $
4 /* Copyright (C) 2009 Trend Micro Inc.
7 * This program is a free software; you can redistribute it
8 * and/or modify it under the terms of the GNU General Public
9 * License (version 2) as published by the FSF - Free Software
12 * License details at the LICENSE file included with OSSEC or
13 * online at: http://www.ossec.net/en/licensing.html
21 #define CGLOBAL 0000001
22 #define CRULES 0000002
23 #define CSYSCHECK 0000004
24 #define CROOTCHECK 0000010
25 #define CALERTS 0000020
26 #define CLOCALFILE 0000040
27 #define CREMOTE 0000100
28 #define CCLIENT 0000200
32 #define CSYSLOGD 0004000
33 #define CAGENTLESS 0020000
34 #define CREPORTS 0040000
36 #define CAGENT_CONFIG 0010000
38 #include "os_xml/os_xml.h"
41 /* Main function to read the config */
42 int ReadConfig(int modules, char *cfgfile, void *d1, void *d2);
44 int Read_Global(XML_NODE node, void *d1, void *d2);
45 int Read_GlobalSK(XML_NODE node, void *configp, void *mailp);
46 int Read_Rules(XML_NODE node, void *d1, void *d2);
47 int Read_Syscheck(XML_NODE node, void *d1, void *d2);
48 int Read_Rootcheck(XML_NODE node, void *d1, void *d2);
49 int Read_Alerts(XML_NODE node, void *d1, void *d2);
50 int Read_EmailAlerts(XML_NODE node, void *d1, void *d2);
51 int Read_DB(XML_NODE node, void *config1, void *config2);
52 int Read_CSyslog(XML_NODE node, void *config1, void *config2);
53 int Read_CAgentless(XML_NODE node, void *config1, void *config2);
54 int Read_Localfile(XML_NODE node, void *d1, void *d2);
55 int Read_Remote(XML_NODE node, void *d1, void *d2);
56 int Read_Client(XML_NODE node, void *d1, void *d2);
57 int ReadActiveResponses(XML_NODE node, void *d1, void *d2);
58 int ReadActiveCommands(XML_NODE node, void *d1, void *d2);
59 int Read_CReports(XML_NODE node, void *config1, void *config2);
60 void AssignIgnore_Global(char **ignores, void *configp);
63 /* General config, for passing blobs of data. */
64 typedef struct _GeneralConfig