X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fos_csyslogd%2Fcsyslogd.h;h=c2fb91996a4d39654993e9d3d8213861b5c12045;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hp=87bfc403a7f76140c486d99d06698d8784ecbf93;hpb=301048b51990573e58a30dc4a5bb4ec285cad554;p=ossec-hids.git diff --git a/src/os_csyslogd/csyslogd.h b/src/os_csyslogd/csyslogd.h old mode 100755 new mode 100644 index 87bfc40..c2fb919 --- a/src/os_csyslogd/csyslogd.h +++ b/src/os_csyslogd/csyslogd.h @@ -1,5 +1,3 @@ -/* @(#) $Id$ */ - /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * @@ -7,39 +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 _CSYSLOGD_H #define _CSYSLOGD_H - #include "config/csyslogd-config.h" +#define OS_CSYSLOGD_MAX_TRIES 10 /** 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, 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