summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-kernel.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-05-14 22:24:26 +0200
committerLennart Poettering <lennart@poettering.net>2013-05-14 22:28:45 +0200
commitbc7fd8cdbef54ebd3902cdd455ecad3e095f7450 (patch)
tree74df33906ba2efeae69c6d77f3b94d17171e55d5 /src/libsystemd-bus/bus-kernel.h
parenta3dc35472f3a48ea8445ad7a943e2ff253170417 (diff)
bus: properly handle message bodies that are a chain of memory areas rather than a single one
Diffstat (limited to 'src/libsystemd-bus/bus-kernel.h')
-rw-r--r--src/libsystemd-bus/bus-kernel.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-kernel.h b/src/libsystemd-bus/bus-kernel.h
index ac746afe03..ed3f987ccd 100644
--- a/src/libsystemd-bus/bus-kernel.h
+++ b/src/libsystemd-bus/bus-kernel.h
@@ -23,6 +23,15 @@
#include "sd-bus.h"
+#define MEMFD_CACHE_MAX 32
+#define MEMFD_CACHE_ITEM_SIZE_MAX (128*1024)
+
+struct memfd_cache {
+ int fd;
+ void *address;
+ size_t size;
+};
+
int bus_kernel_connect(sd_bus *b);
int bus_kernel_take_fd(sd_bus *b);
@@ -30,3 +39,8 @@ int bus_kernel_write_message(sd_bus *bus, sd_bus_message *m);
int bus_kernel_read_message(sd_bus *bus, sd_bus_message **m);
int bus_kernel_create(const char *name, char **s);
+
+int bus_kernel_pop_memfd(sd_bus *bus, void **address, size_t *size);
+void bus_kernel_push_memfd(sd_bus *bus, int fd, void *address, size_t size);
+
+void bus_kernel_flush_memfd(sd_bus *bus);