Imported Upstream version 2.7
[ossec-hids.git] / src / os_csyslogd / csyslogd.h
1 /* @(#) $Id: ./src/os_csyslogd/csyslogd.h, 2011/09/08 dcid Exp $
2  */
3
4 /* Copyright (C) 2009 Trend Micro Inc.
5  * All rights reserved.
6  *
7  * This program is a free software; you can redistribute it
8  * and/or modify it under the terms of the GNU General Public
9  * License (version 2) as published by the FSF - Free Software
10  * Foundation.
11  *
12  * License details at the LICENSE file included with OSSEC or
13  * online at: http://www.ossec.net/en/licensing.html
14  */
15
16
17 #ifndef _CSYSLOGD_H
18 #define _CSYSLOGD_H
19
20
21 #include "config/csyslogd-config.h"
22
23 #define OS_CSYSLOGD_MAX_TRIES 10
24
25 /** Prototypes **/
26
27 /* Read syslog config */
28 void *OS_ReadSyslogConf(int test_config, char *cfgfile,
29                         SyslogConfig **sys_config);
30
31
32 /* Send alerts via syslog */
33 int OS_Alert_SendSyslog(alert_data *al_data, SyslogConfig *syslog_config);
34
35
36 /* Database inserting main function */
37 void OS_CSyslogD(SyslogConfig **syslog_config);
38
39 /* Conditional Field Formatting */
40 int field_add_int(char *dest, int size, const char *format, const int value );
41 int field_add_string(char *dest, int size, const char *format, const char *value );
42 int field_add_truncated(char *dest, int size, const char *format, const char *value,  int fmt_size );
43
44
45 /** Global vars **/
46
47 /* System hostname */
48 char __shost[512];
49
50
51 #endif