chiark / gitweb /
in-addr-util: remove family_to_string() API
[elogind.git] / src / resolve / resolved-dns-scope.c
index 373f5c3205638deeb3691e5aaab09e56ccb625ba..e74fcd4491710a8c64e5ddee27817c38e876f1c8 100644 (file)
 
 #include "strv.h"
 #include "socket-util.h"
+#include "af-list.h"
 #include "resolved-dns-domain.h"
 #include "resolved-dns-scope.h"
 
 #define SEND_TIMEOUT_USEC (2*USEC_PER_SEC)
 
-int dns_scope_new(Manager *m, DnsScope **ret, Link *l, DnsProtocol protocol, unsigned char family) {
+int dns_scope_new(Manager *m, DnsScope **ret, Link *l, DnsProtocol protocol, int family) {
         DnsScope *s;
 
         assert(m);
@@ -47,7 +48,7 @@ int dns_scope_new(Manager *m, DnsScope **ret, Link *l, DnsProtocol protocol, uns
 
         dns_scope_llmnr_membership(s, true);
 
-        log_debug("New scope on link %s, protocol %s, family %s", strna(l ? l->name : NULL), dns_protocol_to_string(protocol), family_to_string(family));
+        log_debug("New scope on link %s, protocol %s, family %s", l ? l->name : "*", dns_protocol_to_string(protocol), family == AF_UNSPEC ? "*" : af_to_name(family));
 
         *ret = s;
         return 0;
@@ -57,7 +58,7 @@ DnsScope* dns_scope_free(DnsScope *s) {
         if (!s)
                 return NULL;
 
-        log_debug("Removing scope on link %s, protocol %s, family %s", strna(s->link ? s->link->name : NULL), dns_protocol_to_string(s->protocol), family_to_string(s->family));
+        log_debug("Removing scope on link %s, protocol %s, family %s", s->link ? s->link->name : "*", dns_protocol_to_string(s->protocol), s->family == AF_UNSPEC ? "*" : af_to_name(s->family));
 
         dns_scope_llmnr_membership(s, false);
 
@@ -106,7 +107,7 @@ void dns_scope_next_dns_server(DnsScope *s) {
 int dns_scope_send(DnsScope *s, DnsPacket *p) {
         union in_addr_union addr;
         int ifindex = 0, r;
-        unsigned char family;
+        int family;
         uint16_t port;
         uint32_t mtu;
         int fd;