X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fos_dbd%2Fdbd.h;fp=src%2Fos_dbd%2Fdbd.h;h=f26f0db28adb8385578ef9cbb99a8750cabe637f;hp=0defbfbbae7fa42f1a91158ee93a67dfea8c226c;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hpb=927951d1c1ad45ba9e7325f07d996154a91c911b diff --git a/src/os_dbd/dbd.h b/src/os_dbd/dbd.h old mode 100755 new mode 100644 index 0defbfb..f26f0db --- a/src/os_dbd/dbd.h +++ b/src/os_dbd/dbd.h @@ -1,6 +1,3 @@ -/* @(#) $Id: ./src/os_dbd/dbd.h, 2011/09/08 dcid Exp $ - */ - /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * @@ -8,56 +5,37 @@ * and/or modify it under the terms of the GNU General Public * License (version 2) as published by the FSF - Free Software * Foundation. - * - * License details at the LICENSE file included with OSSEC or - * online at: http://www.ossec.net/en/licensing.html */ - #ifndef _DBD_H #define _DBD_H - #include "shared.h" #include "db_op.h" #include "config/dbd-config.h" - /** Prototypes **/ /* Read database config */ -int OS_ReadDBConf(int test_config, char *cfgfile, DBConfig *db_config); - - -/* Inserts server info to the db. */ -int OS_Server_ReadInsertDB(void *db_config); +int OS_ReadDBConf(int test_config, const char *cfgfile, DBConfig *db_config) __attribute__((nonnull)); +/* Inserts server info to the db */ +int OS_Server_ReadInsertDB(const DBConfig *db_config) __attribute__((nonnull)); /* Insert rules in to the database */ -int OS_InsertRulesDB(DBConfig *db_config); - +int OS_InsertRulesDB(DBConfig *db_config) __attribute__((nonnull)); /* Get maximum ID */ -int OS_SelectMaxID(DBConfig *db_config); - +int OS_SelectMaxID(const DBConfig *db_config) __attribute__((nonnull)); /* Insert alerts in to the database */ -int OS_Alert_InsertDB(alert_data *al_data, DBConfig *db_config); - +int OS_Alert_InsertDB(const alert_data *al_data, DBConfig *db_config) __attribute__((nonnull)); /* Database inserting main function */ -void OS_DBD(DBConfig *db_config); - +void OS_DBD(DBConfig *db_config) __attribute__((nonnull)) __attribute__((noreturn)); -/* Setting config pointer for osbd_op */ +/* Set config pointer for osbd_op */ void osdb_setconfig(DBConfig *db_config); +#endif /* _DBD_H */ - -/** Global vars **/ - -/* System hostname */ -char __shost[512]; - - -#endif