X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fos_dbd%2Fdbd.h;h=f26f0db28adb8385578ef9cbb99a8750cabe637f;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hp=17d715092835b699204867bc79819e1bc507d188;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/os_dbd/dbd.h b/src/os_dbd/dbd.h old mode 100755 new mode 100644 index 17d7150..f26f0db --- a/src/os_dbd/dbd.h +++ b/src/os_dbd/dbd.h @@ -1,62 +1,41 @@ -/* @(#) $Id: dbd.h,v 1.6 2009/06/24 17:06:30 dcid Exp $ */ - /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * * This program is a free software; you can redistribute it * and/or modify it under the terms of the GNU General Public - * License (version 3) as published by the FSF - Free Software + * 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); - +int OS_ReadDBConf(int test_config, const char *cfgfile, DBConfig *db_config) __attribute__((nonnull)); -/* Inserts server info to the db. */ -int OS_Server_ReadInsertDB(void *db_config); - +/* 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