X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fos_csyslogd%2Fcsyslogd.h;fp=src%2Fos_csyslogd%2Fcsyslogd.h;h=c2fb91996a4d39654993e9d3d8213861b5c12045;hp=28435c94c264af6c65e3bbc3e6c989a057d148fc;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hpb=927951d1c1ad45ba9e7325f07d996154a91c911b diff --git a/src/os_csyslogd/csyslogd.h b/src/os_csyslogd/csyslogd.h old mode 100755 new mode 100644 index 28435c9..c2fb919 --- a/src/os_csyslogd/csyslogd.h +++ b/src/os_csyslogd/csyslogd.h @@ -1,6 +1,3 @@ -/* @(#) $Id: ./src/os_csyslogd/csyslogd.h, 2011/09/08 dcid Exp $ - */ - /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * @@ -8,16 +5,11 @@ * 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 _CSYSLOGD_H #define _CSYSLOGD_H - #include "config/csyslogd-config.h" #define OS_CSYSLOGD_MAX_TRIES 10 @@ -25,27 +17,25 @@ /** Prototypes **/ /* Read syslog config */ -void *OS_ReadSyslogConf(int test_config, char *cfgfile, - SyslogConfig **sys_config); - +SyslogConfig **OS_ReadSyslogConf(int test_config, const char *cfgfile); /* Send alerts via syslog */ -int OS_Alert_SendSyslog(alert_data *al_data, SyslogConfig *syslog_config); - +int OS_Alert_SendSyslog(alert_data *al_data, const SyslogConfig *syslog_config); /* Database inserting main function */ -void OS_CSyslogD(SyslogConfig **syslog_config); +void OS_CSyslogD(SyslogConfig **syslog_config) __attribute__((noreturn)); /* Conditional Field Formatting */ -int field_add_int(char *dest, int size, const char *format, const int value ); -int field_add_string(char *dest, int size, const char *format, const char *value ); -int field_add_truncated(char *dest, int size, const char *format, const char *value, int fmt_size ); - +int field_add_int(char *dest, size_t size, const char *format, const int value ); +int field_add_string(char *dest, size_t size, const char *format, const char *value ); +int field_add_truncated(char *dest, size_t size, const char *format, const char *value, int fmt_size ); -/** Global vars **/ +/** Global variables **/ /* System hostname */ -char __shost[512]; +extern char __shost[512]; +/* System hostname (full length) */ +extern char __shost_long[512]; +#endif /* _CSYSLOGD_H */ -#endif