syslog-ng source
afprog.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2011 Balabit
3  * Copyright (c) 1998-2011 Balázs Scheidler
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 as published
7  * by the Free Software Foundation, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * As an additional exemption you are allowed to compile & link against the
19  * OpenSSL libraries as published by the OpenSSL project. See the file
20  * COPYING for details.
21  *
22  */
23 
24 #ifndef AFPROG_H_INCLUDED
25 #define AFPROG_H_INCLUDED
26 
27 #include "driver.h"
28 #include "logwriter.h"
29 #include "logreader.h"
30 
31 typedef struct _AFProgramProcessInfo
32 {
33  pid_t pid;
34  GString *cmdline;
37 
38 typedef struct _AFProgramSourceDriver
39 {
40  LogSrcDriver super;
42  LogReader *reader;
45 
46 typedef struct _AFProgramDestDriver
47 {
48  LogDestDriver super;
50  LogWriter *writer;
51  gboolean keep_alive;
54 
55 LogDriver *afprogram_sd_new(gchar *cmdline, GlobalConfig *cfg);
56 LogDriver *afprogram_dd_new(gchar *cmdline, GlobalConfig *cfg);
57 
58 void afprogram_dd_set_keep_alive(AFProgramDestDriver *self, gboolean keep_alive);
59 void afprogram_set_inherit_environment(AFProgramProcessInfo *self, gboolean inherit_environment);
60 
61 #endif
LogDriver * afprogram_sd_new(gchar *cmdline, GlobalConfig *cfg)
Definition: afprog.c:372
void afprogram_set_inherit_environment(AFProgramProcessInfo *self, gboolean inherit_environment)
Definition: afprog.c:727
LogDriver * afprogram_dd_new(gchar *cmdline, GlobalConfig *cfg)
Definition: afprog.c:701
void afprogram_dd_set_keep_alive(AFProgramDestDriver *self, gboolean keep_alive)
Definition: afprog.c:721
Definition: afprog.h:47
LogWriter * writer
Definition: afprog.h:50
LogDestDriver super
Definition: afprog.h:48
LogWriterOptions writer_options
Definition: afprog.h:52
AFProgramProcessInfo process_info
Definition: afprog.h:49
gboolean keep_alive
Definition: afprog.h:51
Definition: afprog.h:32
gboolean inherit_environment
Definition: afprog.h:35
pid_t pid
Definition: afprog.h:33
GString * cmdline
Definition: afprog.h:34
Definition: afprog.h:39
AFProgramProcessInfo process_info
Definition: afprog.h:41
LogReaderOptions reader_options
Definition: afprog.h:43
LogSrcDriver super
Definition: afprog.h:40
LogReader * reader
Definition: afprog.h:42
Definition: logreader.h:47
Definition: logwriter.h:51
GlobalConfig * cfg
Definition: test_batched_ack_tracker.c:34