summaryrefslogtreecommitdiff
path: root/src/shared/in-addr-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-18 12:34:02 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-18 12:38:32 +0200
commit1716f6dcf54d4c181c2e2558e3d5414f54c8d9ca (patch)
tree32dd8c93d766d205354d72eea44fee55a2d9a55b /src/shared/in-addr-util.c
parent9d485985338a46b8cb1acdf1af6c1eb2e88acfee (diff)
resolved: add LLMNR support for looking up names
Diffstat (limited to 'src/shared/in-addr-util.c')
-rw-r--r--src/shared/in-addr-util.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/shared/in-addr-util.c b/src/shared/in-addr-util.c
index 6ece85e37d..0c6ebec336 100644
--- a/src/shared/in-addr-util.c
+++ b/src/shared/in-addr-util.c
@@ -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);