new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / os_csyslogd / csyslogd.h
old mode 100755 (executable)
new mode 100644 (file)
index 28435c9..c2fb919
@@ -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
 /** 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