Systemd/src/resolve/resolved-resolv-conf.h
Lennart Poettering 4261ab654c resolved: expose a new bus property that informs about the /etc/resolv.conf mode
It can be one of "foreign", "missing", "stub", "static", "uplink",
depending on how /etc/resolv.conf is set up:

foreign → someone/something else manages /etc/resolv.conf,
    systemd-resolved is just the consumer

missing → /etc/resolv.conf is missing altogether

stub/static/uplink → the file is managed by resolved, with the
    well-known modes

Fixes: #17159
2020-09-30 10:27:50 +02:00

24 lines
643 B
C

/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include "resolved-manager.h"
int manager_check_resolv_conf(const Manager *m);
int manager_read_resolv_conf(Manager *m);
int manager_write_resolv_conf(Manager *m);
typedef enum ResolvConfMode {
RESOLV_CONF_UPLINK,
RESOLV_CONF_STUB,
RESOLV_CONF_STATIC,
RESOLV_CONF_FOREIGN,
RESOLV_CONF_MISSING,
_RESOLV_CONF_MODE_MAX,
_RESOLV_CONF_MODE_INVALID = -1,
} ResolvConfMode;
int resolv_conf_mode(void);
const char* resolv_conf_mode_to_string(ResolvConfMode m) _const_;
ResolvConfMode resolv_conf_mode_from_string(const char *s) _pure_;