]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/journal/journald.h
udev: check-keymaps.sh - fix source directory
[thirdparty/systemd.git] / src / journal / journald.h
CommitLineData
e6960940
LP
1/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3#ifndef foojournaldhfoo
4#define foojournaldhfoo
5
6/***
7 This file is part of systemd.
8
9 Copyright 2011 Lennart Poettering
10
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
23***/
24
25#include <inttypes.h>
26#include <sys/types.h>
27#include <stdbool.h>
28
29#include "journal-file.h"
30#include "hashmap.h"
31#include "util.h"
d7832d2c 32#include "audit.h"
e6960940
LP
33#include "journal-rate-limit.h"
34#include "list.h"
35
36typedef struct StdoutStream StdoutStream;
37
38typedef struct Server {
39 int epoll_fd;
40 int signal_fd;
41 int syslog_fd;
42 int native_fd;
43 int stdout_fd;
6c1e6b98 44 int proc_kmsg_fd;
e6960940
LP
45
46 JournalFile *runtime_journal;
47 JournalFile *system_journal;
48 Hashmap *user_journals;
49
50 uint64_t seqnum;
51
52 char *buffer;
53 size_t buffer_size;
54
55 JournalRateLimit *rate_limit;
56 usec_t rate_limit_interval;
57 unsigned rate_limit_burst;
58
59 JournalMetrics runtime_metrics;
60 JournalMetrics system_metrics;
61
62 bool compress;
63
224f2ee2
LP
64 bool forward_to_kmsg;
65 bool forward_to_syslog;
66 bool forward_to_console;
67
6c1e6b98
LP
68 bool import_proc_kmsg;
69 char proc_kmsg_buffer[LINE_MAX+1];
70 size_t proc_kmsg_length;
71
e6960940
LP
72 uint64_t cached_available_space;
73 usec_t cached_available_space_timestamp;
74
75 uint64_t var_available_timestamp;
76
5e41cfec
LP
77 gid_t file_gid;
78 bool file_gid_valid;
79
e6960940
LP
80 LIST_HEAD(StdoutStream, stdout_streams);
81 unsigned n_stdout_streams;
82} Server;
83
84/* gperf lookup function */
85const struct ConfigPerfItem* journald_gperf_lookup(const char *key, unsigned length);
86
87#endif