dc4a329048351e29256c81fbec7b6d498e482b08
[ossec-hids.git] / src / os_dbd / dbd.h
1 /* @(#) $Id$ */
2
3 /* Copyright (C) 2009 Trend Micro Inc.
4  * All rights reserved.
5  *
6  * This program is a free software; you can redistribute it
7  * and/or modify it under the terms of the GNU General Public
8  * License (version 2) as published by the FSF - Free Software
9  * Foundation.
10  *
11  * License details at the LICENSE file included with OSSEC or 
12  * online at: http://www.ossec.net/en/licensing.html
13  */
14
15
16 #ifndef _DBD_H
17 #define _DBD_H
18
19
20 #include "shared.h"
21 #include "db_op.h"
22 #include "config/dbd-config.h"
23
24
25 /** Prototypes **/
26
27 /* Read database config */
28 int OS_ReadDBConf(int test_config, char *cfgfile, DBConfig *db_config);
29
30
31 /* Inserts server info to the db. */
32 int OS_Server_ReadInsertDB(void *db_config);
33    
34
35 /* Insert rules in to the database */
36 int OS_InsertRulesDB(DBConfig *db_config);
37
38
39 /* Get maximum ID */
40 int OS_SelectMaxID(DBConfig *db_config);
41
42
43 /* Insert alerts in to the database */
44 int OS_Alert_InsertDB(alert_data *al_data, DBConfig *db_config);
45
46
47 /* Database inserting main function */
48 void OS_DBD(DBConfig *db_config);
49
50
51 /* Setting config pointer for osbd_op */
52 void osdb_setconfig(DBConfig *db_config);
53
54
55
56 /** Global vars **/
57
58 /* System hostname */
59 char __shost[512];
60
61
62 #endif