chiark / gitweb /
resolved: add LLMNR support for looking up names
[elogind.git] / src / shared / in-addr-util.c
index 6ece85e37da911dc3d88932c64341e1087058e7c..0c6ebec336446d2fc3ee67210a7ff4e8e88472a5 100644 (file)
@@ -231,3 +231,15 @@ int in_addr_from_string_auto(const char *s, unsigned *family, union in_addr_unio
 
         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);