summaryrefslogtreecommitdiffstats
path: root/src/resolve
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-09-22 22:41:56 +0200
committerLennart Poettering <lennart@poettering.net>2023-10-06 11:49:38 +0200
commitabef4a7b3c4625e85e4c4f8b5a17a04260b845b2 (patch)
treef26d97d6142f9bdc6feb57bfc5a805e8492bd234 /src/resolve
parentvarlink: add varlink_connect_url() and varlink_connect_exec() calls (diff)
downloadsystemd-abef4a7b3c4625e85e4c4f8b5a17a04260b845b2.tar.xz
systemd-abef4a7b3c4625e85e4c4f8b5a17a04260b845b2.zip
tree-wide: make all our Varlink APIs introspectable
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-varlink.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/resolve/resolved-varlink.c b/src/resolve/resolved-varlink.c
index 83b8e52807..c9bb616acb 100644
--- a/src/resolve/resolved-varlink.c
+++ b/src/resolve/resolved-varlink.c
@@ -5,6 +5,8 @@
#include "resolved-dns-synthesize.h"
#include "resolved-varlink.h"
#include "socket-netlink.h"
+#include "varlink-io.systemd.Resolve.h"
+#include "varlink-io.systemd.Resolve.Monitor.h"
typedef struct LookupParameters {
int ifindex;
@@ -699,6 +701,10 @@ static int varlink_monitor_server_init(Manager *m) {
varlink_server_set_userdata(server, m);
+ r = varlink_server_add_interface(server, &vl_interface_io_systemd_Resolve_Monitor);
+ if (r < 0)
+ return log_error_errno(r, "Failed to add Resolve.Monitor interface to varlink server: %m");
+
r = varlink_server_bind_method_many(
server,
"io.systemd.Resolve.Monitor.SubscribeQueryResults", vl_method_subscribe_query_results,
@@ -741,6 +747,10 @@ static int varlink_main_server_init(Manager *m) {
varlink_server_set_userdata(s, m);
+ r = varlink_server_add_interface(s, &vl_interface_io_systemd_Resolve);
+ if (r < 0)
+ return log_error_errno(r, "Failed to add Resolve interface to varlink server: %m");
+
r = varlink_server_bind_method_many(
s,
"io.systemd.Resolve.ResolveHostname", vl_method_resolve_hostname,