new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / os_dbd / dbd.h
1 /* Copyright (C) 2009 Trend Micro Inc.
2  * All rights reserved.
3  *
4  * This program is a free software; you can redistribute it
5  * and/or modify it under the terms of the GNU General Public
6  * License (version 2) as published by the FSF - Free Software
7  * Foundation.
8  */
9
10 #ifndef _DBD_H
11 #define _DBD_H
12
13 #include "shared.h"
14 #include "db_op.h"
15 #include "config/dbd-config.h"
16
17 /** Prototypes **/
18
19 /* Read database config */
20 int OS_ReadDBConf(int test_config, const char *cfgfile, DBConfig *db_config) __attribute__((nonnull));
21
22 /* Inserts server info to the db */
23 int OS_Server_ReadInsertDB(const DBConfig *db_config) __attribute__((nonnull));
24
25 /* Insert rules in to the database */
26 int OS_InsertRulesDB(DBConfig *db_config) __attribute__((nonnull));
27
28 /* Get maximum ID */
29 int OS_SelectMaxID(const DBConfig *db_config) __attribute__((nonnull));
30
31 /* Insert alerts in to the database */
32 int OS_Alert_InsertDB(const alert_data *al_data, DBConfig *db_config) __attribute__((nonnull));
33
34 /* Database inserting main function */
35 void OS_DBD(DBConfig *db_config) __attribute__((nonnull)) __attribute__((noreturn));
36
37 /* Set config pointer for osbd_op */
38 void osdb_setconfig(DBConfig *db_config);
39
40 #endif /* _DBD_H */
41