Imported Upstream version 2.7
[ossec-hids.git] / src / os_dbd / dbd.h
1 /* @(#) $Id: ./src/os_dbd/dbd.h, 2011/09/08 dcid Exp $
2  */
3
4 /* Copyright (C) 2009 Trend Micro Inc.
5  * All rights reserved.
6  *
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
10  * Foundation.
11  *
12  * License details at the LICENSE file included with OSSEC or
13  * online at: http://www.ossec.net/en/licensing.html
14  */
15
16
17 #ifndef _DBD_H
18 #define _DBD_H
19
20
21 #include "shared.h"
22 #include "db_op.h"
23 #include "config/dbd-config.h"
24
25
26 /** Prototypes **/
27
28 /* Read database config */
29 int OS_ReadDBConf(int test_config, char *cfgfile, DBConfig *db_config);
30
31
32 /* Inserts server info to the db. */
33 int OS_Server_ReadInsertDB(void *db_config);
34
35
36 /* Insert rules in to the database */
37 int OS_InsertRulesDB(DBConfig *db_config);
38
39
40 /* Get maximum ID */
41 int OS_SelectMaxID(DBConfig *db_config);
42
43
44 /* Insert alerts in to the database */
45 int OS_Alert_InsertDB(alert_data *al_data, DBConfig *db_config);
46
47
48 /* Database inserting main function */
49 void OS_DBD(DBConfig *db_config);
50
51
52 /* Setting config pointer for osbd_op */
53 void osdb_setconfig(DBConfig *db_config);
54
55
56
57 /** Global vars **/
58
59 /* System hostname */
60 char __shost[512];
61
62
63 #endif