From: Dmitry Rozhkov Date: Thu, 19 Jan 2017 09:47:51 +0000 (+0200) Subject: resolve: Add support for mDNS to systemd-resolve utility X-Git-Tag: v233~108^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=062aabb92438cd91642ff64721ebb8a110ea5ea3;p=thirdparty%2Fsystemd.git resolve: Add support for mDNS to systemd-resolve utility Signed-off-by: Dmitry Rozhkov --- diff --git a/man/systemd-resolve.xml b/man/systemd-resolve.xml index bfd5a68fd97..f3dbaec744d 100644 --- a/man/systemd-resolve.xml +++ b/man/systemd-resolve.xml @@ -182,7 +182,9 @@ (i.e. classic unicast DNS), llmnr (Link-Local Multicast Name Resolution), llmnr-ipv4, llmnr-ipv6 (LLMNR via the indicated underlying IP - protocols). By default the lookup is done via all protocols suitable for the lookup. If used, limits the set of + protocols), mdns (Multicast DNS), + mdns-ipv4, mdns-ipv6 (MDNS via the indicated underlying IP protocols). + By default the lookup is done via all protocols suitable for the lookup. If used, limits the set of protocols that may be used. Use this option multiple times to enable resolving via multiple protocols at the same time. The setting llmnr is identical to specifying this switch once with llmnr-ipv4 and once via llmnr-ipv6. Note that this option does not force diff --git a/src/resolve/resolve-tool.c b/src/resolve/resolve-tool.c index 07d9582ccb2..0c62e5b3859 100644 --- a/src/resolve/resolve-tool.c +++ b/src/resolve/resolve-tool.c @@ -1524,7 +1524,7 @@ static int status_all(sd_bus *bus) { static void help_protocol_types(void) { if (arg_legend) puts("Known protocol types:"); - puts("dns\nllmnr\nllmnr-ipv4\nllmnr-ipv6"); + puts("dns\nllmnr\nllmnr-ipv4\nllmnr-ipv6\nmdns\nmnds-ipv4\nmdns-ipv6"); } static void help_dns_types(void) { @@ -1722,6 +1722,12 @@ static int parse_argv(int argc, char *argv[]) { arg_flags |= SD_RESOLVED_LLMNR_IPV4; else if (streq(optarg, "llmnr-ipv6")) arg_flags |= SD_RESOLVED_LLMNR_IPV6; + else if (streq(optarg, "mdns")) + arg_flags |= SD_RESOLVED_MDNS; + else if (streq(optarg, "mdns-ipv4")) + arg_flags |= SD_RESOLVED_MDNS_IPV4; + else if (streq(optarg, "mdns-ipv6")) + arg_flags |= SD_RESOLVED_MDNS_IPV6; else { log_error("Unknown protocol specifier: %s", optarg); return -EINVAL;