syslog-ng source
logproto-file-reader.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Balabit
3  * Copyright (c) 2017 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 LOG_PROTO_FILE_READER_H_INCLUDED
25 #define LOG_PROTO_FILE_READER_H_INCLUDED
26 
29 
30 typedef struct _LogProtoFileReaderOptions
31 {
32  LogProtoServerOptions super;
33  gint pad_size;
35 
36 typedef union _LogProtoFileReaderOptionsStorage
37 {
38  LogProtoServerOptionsStorage storage;
40 
42 // _Static_assert() is a C11 feature, so we use a typedef trick to perform the static assertion
44  sizeof(LogProtoServerOptionsStorage) >= sizeof(LogProtoFileReaderOptions) ? 1 : -1];
45 
46 LogProtoServer *log_proto_file_reader_new(LogTransport *transport, const LogProtoFileReaderOptionsStorage *options);
47 
51 
52 #endif
char static_assert_size_check_LogProtoFileReaderOptions[sizeof(LogProtoServerOptionsStorage) >=sizeof(LogProtoFileReaderOptions) ? 1 :-1]
Definition: logproto-file-reader.h:44
void log_proto_file_reader_options_defaults(LogProtoFileReaderOptionsStorage *options)
Definition: logproto-file-reader.c:63
void log_proto_file_reader_options_destroy(LogProtoFileReaderOptionsStorage *options)
LogProtoServer * log_proto_file_reader_new(LogTransport *transport, const LogProtoFileReaderOptionsStorage *options)
Definition: logproto-file-reader.c:29
gboolean log_proto_file_reader_options_init(LogProtoFileReaderOptionsStorage *options, GlobalConfig *cfg)
Definition: logproto-file-reader.c:81
Definition: logproto-file-reader.h:31
LogProtoServerOptions super
Definition: logproto-file-reader.h:32
gint pad_size
Definition: logproto-file-reader.h:33
GlobalConfig * cfg
Definition: test_batched_ack_tracker.c:34
Definition: logproto-file-reader.h:37
LogProtoServerOptionsStorage storage
Definition: logproto-file-reader.h:38
LogProtoFileReaderOptions super
Definition: logproto-file-reader.h:39