summaryrefslogtreecommitdiff
path: root/src/journal/journald-server.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2017-10-10 00:22:57 +0200
committerMichael Biebl <biebl@debian.org>2017-10-10 00:22:57 +0200
commitf5e65279187b6aa0c0c5a00b14dca9eab441ffb2 (patch)
treeb834735b2b8fabf24499bb8cc12d4f24870436f7 /src/journal/journald-server.h
parent81c583552ee1c3355cdef1b11a33737dd98e6971 (diff)
downloadsystemd-f5e65279187b6aa0c0c5a00b14dca9eab441ffb2.tar.gz
New upstream version 235
Diffstat (limited to 'src/journal/journald-server.h')
-rw-r--r--src/journal/journald-server.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/journal/journald-server.h b/src/journal/journald-server.h
index 203460c50a..f4bdd588cb 100644
--- a/src/journal/journald-server.h
+++ b/src/journal/journald-server.h
@@ -28,9 +28,11 @@ typedef struct Server Server;
#include "hashmap.h"
#include "journal-file.h"
+#include "journald-context.h"
#include "journald-rate-limit.h"
#include "journald-stream.h"
#include "list.h"
+#include "prioq.h"
typedef enum Storage {
STORAGE_AUTO,
@@ -112,6 +114,7 @@ struct Server {
bool compress;
bool seal;
+ bool read_kmsg;
bool forward_to_kmsg;
bool forward_to_syslog;
@@ -165,6 +168,15 @@ struct Server {
usec_t watchdog_usec;
usec_t last_realtime_clock;
+
+ size_t line_max;
+
+ /* Caching of client metadata */
+ Hashmap *client_contexts;
+ Prioq *client_contexts_lru;
+
+ ClientContext *my_context; /* the context of journald itself */
+ ClientContext *pid1_context; /* the context of PID 1 */
};
#define SERVER_MACHINE_ID(s) ((s)->machine_id_field + strlen("_MACHINE_ID="))
@@ -175,13 +187,14 @@ struct Server {
#define N_IOVEC_OBJECT_FIELDS 14
#define N_IOVEC_PAYLOAD_FIELDS 15
-void server_dispatch_message(Server *s, struct iovec *iovec, unsigned n, unsigned m, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len, const char *unit_id, int priority, pid_t object_pid);
+void server_dispatch_message(Server *s, struct iovec *iovec, unsigned n, unsigned m, ClientContext *c, const struct timeval *tv, int priority, pid_t object_pid);
void server_driver_message(Server *s, const char *message_id, const char *format, ...) _printf_(3,0) _sentinel_;
/* gperf lookup function */
const struct ConfigPerfItem* journald_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
int config_parse_storage(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+int config_parse_line_max(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
const char *storage_to_string(Storage s) _const_;
Storage storage_from_string(const char *s) _pure_;