summaryrefslogtreecommitdiffstats
path: root/src/shared/bus-message-util.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-07-19 03:57:04 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-07-20 21:08:22 +0200
commit976009897b2aac52d768e035bc9c2d4862c3956a (patch)
tree08f0f5afbd562725663420a272fb07dce4dc3b98 /src/shared/bus-message-util.h
parentutil: drop duplicated inclusion of sd-bus.h (diff)
downloadsystemd-976009897b2aac52d768e035bc9c2d4862c3956a.tar.xz
systemd-976009897b2aac52d768e035bc9c2d4862c3956a.zip
util: introduce helper functions to read in_addr from bus message
Diffstat (limited to 'src/shared/bus-message-util.h')
-rw-r--r--src/shared/bus-message-util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/bus-message-util.h b/src/shared/bus-message-util.h
new file mode 100644
index 0000000000..79bef325e3
--- /dev/null
+++ b/src/shared/bus-message-util.h
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
+#pragma once
+
+#include "sd-bus.h"
+
+#include "in-addr-util.h"
+
+int bus_message_read_family(sd_bus_message *message, sd_bus_error *error, int *ret);
+int bus_message_read_in_addr_auto(sd_bus_message *message, sd_bus_error *error, int *ret_family, union in_addr_union *ret_addr);