resolve: DNSStubListenerExtra → DnsStubListenerExtra

All our other struct types use the "Dns" spelling, rather than "DNS". Do
the same for this struct.
This commit is contained in:
Lennart Poettering 2020-09-08 19:00:47 +02:00
parent c6552f7cd5
commit 36aaabc35e
4 changed files with 15 additions and 15 deletions

View File

@ -29,7 +29,7 @@ static const char* const dns_stub_listener_mode_table[_DNS_STUB_LISTENER_MODE_MA
};
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);
@ -38,7 +38,7 @@ static void dns_stub_listener_extra_hash_func(const DNSStubListenerExtra *a, str
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);
@ -61,7 +61,7 @@ static int dns_stub_listener_extra_compare_func(const DNSStubListenerExtra *a, c
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);
@ -436,7 +436,7 @@ int config_parse_dns_stub_listener_extra(
void *data,
void *userdata) {
_cleanup_free_ DNSStubListenerExtra *stub = NULL;
_cleanup_free_ DnsStubListenerExtra *stub = NULL;
Manager *m = userdata;
const char *p;
int r;

View File

@ -14,10 +14,10 @@
* 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;
@ -26,7 +26,7 @@ int dns_stub_listener_extra_new(DNSStubListenerExtra **ret) {
return 0;
}
DNSStubListenerExtra *dns_stub_listener_extra_free(DNSStubListenerExtra *p) {
DnsStubListenerExtra *dns_stub_listener_extra_free(DnsStubListenerExtra *p) {
if (!p)
return NULL;
@ -483,7 +483,7 @@ static int manager_dns_stub_udp_fd(Manager *m) {
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;
@ -659,7 +659,7 @@ static int manager_dns_stub_tcp_fd(Manager *m) {
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;
@ -773,7 +773,7 @@ int manager_dns_stub_start(Manager *m) {
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.");

View File

@ -3,8 +3,8 @@
#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);

View File

@ -31,7 +31,7 @@ typedef struct EtcHosts {
Set *no_address;
} EtcHosts;
typedef struct DNSStubListenerExtra {
typedef struct DnsStubListenerExtra {
DnsStubListenerMode mode;
int family;
@ -40,7 +40,7 @@ typedef struct DNSStubListenerExtra {
sd_event_source *udp_event_source;
sd_event_source *tcp_event_source;
} DNSStubListenerExtra;
} DnsStubListenerExtra;
struct Manager {
sd_event *event;