2
* Copyright (c) 2002-2009 BalaBit IT Ltd, Budapest, Hungary
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License version 2 as published
6
* by the Free Software Foundation.
8
* Note that this permission is granted for only version 2 of the GPL.
10
* As an additional exemption you are allowed to compile & link against the
11
* OpenSSL libraries as published by the OpenSSL project. See the file
12
* COPYING for details.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
#ifndef SDFILE_H_INCLUDED
25
#define SDFILE_H_INCLUDED
28
#include "logreader.h"
29
#include "logwriter.h"
31
#define AFFILE_PIPE 0x00000001
32
#define AFFILE_NO_EXPAND 0x00000002
33
#define AFFILE_TMPL_ESCAPE 0x00000004
34
#define AFFILE_CREATE_DIRS 0x00000008
35
#define AFFILE_FSYNC 0x00000010
36
#define AFFILE_PRIVILEGED 0x00000020
38
typedef struct _AFFileSourceDriver
42
/* FIXME: the code assumes that reader is a LogReader at a lot of places, so this should be changed to LogReader */
44
LogReaderOptions reader_options;
46
/* state information to follow a set of files using a wildcard expression */
49
LogDriver *affile_sd_new(gchar *filename, guint32 flags);
50
void affile_sd_set_recursion(LogDriver *s, const gint recursion);
51
void affile_sd_set_pri_level(LogDriver *s, const gint16 severity);
52
void affile_sd_set_pri_facility(LogDriver *s, const gint16 facility);
54
typedef struct _AFFileDestWriter AFFileDestWriter;
56
typedef struct _AFFileDestDriver
59
LogTemplate *filename_template;
60
AFFileDestWriter *single_writer;
68
gchar *local_time_zone;
69
TimeZoneInfo *local_time_zone_info;
70
LogWriterOptions writer_options;
71
GHashTable *writer_hash;
73
gint overwrite_if_older;
74
gboolean use_time_recvd;
79
LogDriver *affile_dd_new(gchar *filename, guint32 flags);
81
void affile_dd_set_compress(LogDriver *s, gboolean compress);
82
void affile_dd_set_encrypt(LogDriver *s, gboolean enable);
83
void affile_dd_set_file_uid(LogDriver *s, const gchar *file_uid);
84
void affile_dd_set_file_gid(LogDriver *s, const gchar *file_gid);
85
void affile_dd_set_file_perm(LogDriver *s, mode_t file_perm);
86
void affile_dd_set_dir_uid(LogDriver *s, const gchar *dir_uid);
87
void affile_dd_set_dir_gid(LogDriver *s, const gchar *dir_gid);
88
void affile_dd_set_dir_perm(LogDriver *s, mode_t dir_perm);
89
void affile_dd_set_create_dirs(LogDriver *s, gboolean create_dirs);
90
void affile_dd_set_fsync(LogDriver *s, gboolean enable);
91
void affile_dd_set_overwrite_if_older(LogDriver *s, gint overwrite_if_older);
92
void affile_dd_set_local_time_zone(LogDriver *s, const gchar *local_time_zone);