new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / os_csyslogd / csyslogd.h
1 /* Copyright (C) 2009 Trend Micro Inc.
2  * All rights reserved.
3  *
4  * This program is a free software; you can redistribute it
5  * and/or modify it under the terms of the GNU General Public
6  * License (version 2) as published by the FSF - Free Software
7  * Foundation.
8  */
9
10 #ifndef _CSYSLOGD_H
11 #define _CSYSLOGD_H
12
13 #include "config/csyslogd-config.h"
14
15 #define OS_CSYSLOGD_MAX_TRIES 10
16
17 /** Prototypes **/
18
19 /* Read syslog config */
20 SyslogConfig **OS_ReadSyslogConf(int test_config, const char *cfgfile);
21
22 /* Send alerts via syslog */
23 int OS_Alert_SendSyslog(alert_data *al_data, const SyslogConfig *syslog_config);
24
25 /* Database inserting main function */
26 void OS_CSyslogD(SyslogConfig **syslog_config) __attribute__((noreturn));
27
28 /* Conditional Field Formatting */
29 int field_add_int(char *dest, size_t size, const char *format, const int value );
30 int field_add_string(char *dest, size_t size, const char *format, const char *value );
31 int field_add_truncated(char *dest, size_t size, const char *format, const char *value,  int fmt_size );
32
33 /** Global variables **/
34
35 /* System hostname */
36 extern char __shost[512];
37 /* System hostname (full length) */
38 extern char __shost_long[512];
39
40 #endif /* _CSYSLOGD_H */
41