#include "strv.h"
#include "socket-util.h"
+#include "af-list.h"
#include "resolved-dns-domain.h"
#include "resolved-dns-scope.h"
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;
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);
return -EINVAL;
}
-
-static const char* const family_table[] = {
- [AF_UNSPEC] = "unspec",
- [AF_UNIX] = "unix",
- [AF_INET] = "inet",
- [AF_INET6] = "inet6",
- [AF_NETLINK] = "netlink",
- [AF_PACKET] = "packet",
- [AF_BLUETOOTH] = "bluetooth",
- [AF_NFC] = "nfc",
-};
-DEFINE_STRING_TABLE_LOOKUP(family, int);
assert(family == AF_INET || family == AF_INET6);
return family == AF_INET6 ? 16 : 4;
}
-
-const char* family_to_string(int i) _const_;
-int family_from_string(const char *s) _pure_;