};
DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(dns_stub_listener_mode, DnsStubListenerMode, DNS_STUB_LISTENER_YES);
-static void dns_stub_listener_extra_hash_func(const DNSStubListenerExtra *a, struct siphash *state) {
+static void dns_stub_listener_extra_hash_func(const DnsStubListenerExtra *a, struct siphash *state) {
assert(a);
siphash24_compress(&a->mode, sizeof(a->mode), state);
siphash24_compress(&a->port, sizeof(a->port), state);
}
-static int dns_stub_listener_extra_compare_func(const DNSStubListenerExtra *a, const DNSStubListenerExtra *b) {
+static int dns_stub_listener_extra_compare_func(const DnsStubListenerExtra *a, const DnsStubListenerExtra *b) {
int r;
assert(a);
DEFINE_PRIVATE_HASH_OPS_WITH_KEY_DESTRUCTOR(
dns_stub_listener_extra_hash_ops,
- DNSStubListenerExtra,
+ DnsStubListenerExtra,
dns_stub_listener_extra_hash_func,
dns_stub_listener_extra_compare_func,
dns_stub_listener_extra_free);
void *data,
void *userdata) {
- _cleanup_free_ DNSStubListenerExtra *stub = NULL;
+ _cleanup_free_ DnsStubListenerExtra *stub = NULL;
Manager *m = userdata;
const char *p;
int r;
* IP and UDP header sizes */
#define ADVERTISE_DATAGRAM_SIZE_MAX (65536U-14U-20U-8U)
-int dns_stub_listener_extra_new(DNSStubListenerExtra **ret) {
- DNSStubListenerExtra *l;
+int dns_stub_listener_extra_new(DnsStubListenerExtra **ret) {
+ DnsStubListenerExtra *l;
- l = new0(DNSStubListenerExtra, 1);
+ l = new0(DnsStubListenerExtra, 1);
if (!l)
return -ENOMEM;
return 0;
}
-DNSStubListenerExtra *dns_stub_listener_extra_free(DNSStubListenerExtra *p) {
+DnsStubListenerExtra *dns_stub_listener_extra_free(DnsStubListenerExtra *p) {
if (!p)
return NULL;
return TAKE_FD(fd);
}
-static int manager_dns_stub_udp_fd_extra(Manager *m, DNSStubListenerExtra *l) {
+static int manager_dns_stub_udp_fd_extra(Manager *m, DnsStubListenerExtra *l) {
_cleanup_free_ char *pretty = NULL;
_cleanup_close_ int fd = -1;
union sockaddr_union sa;
return TAKE_FD(fd);
}
-static int manager_dns_stub_tcp_fd_extra(Manager *m, DNSStubListenerExtra *l) {
+static int manager_dns_stub_tcp_fd_extra(Manager *m, DnsStubListenerExtra *l) {
_cleanup_free_ char *pretty = NULL;
_cleanup_close_ int fd = -1;
union sockaddr_union sa;
return log_error_errno(r, "Failed to listen on %s socket 127.0.0.53:53: %m", t);
if (!ordered_set_isempty(m->dns_extra_stub_listeners)) {
- DNSStubListenerExtra *l;
+ DnsStubListenerExtra *l;
log_debug("Creating extra stub listeners.");
#include "resolved-manager.h"
-int dns_stub_listener_extra_new(DNSStubListenerExtra **ret);
-DNSStubListenerExtra *dns_stub_listener_extra_free(DNSStubListenerExtra *p);
+int dns_stub_listener_extra_new(DnsStubListenerExtra **ret);
+DnsStubListenerExtra *dns_stub_listener_extra_free(DnsStubListenerExtra *p);
void manager_dns_stub_stop(Manager *m);
int manager_dns_stub_start(Manager *m);
Set *no_address;
} EtcHosts;
-typedef struct DNSStubListenerExtra {
+typedef struct DnsStubListenerExtra {
DnsStubListenerMode mode;
int family;
sd_event_source *udp_event_source;
sd_event_source *tcp_event_source;
-} DNSStubListenerExtra;
+} DnsStubListenerExtra;
struct Manager {
sd_event *event;