---
name: "gmdns"
section: "1"
platform: "linux"
package: "gensio-bin"
version: "2.8.13-7"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gmdns"
---

# gmdns(1)

Tool for doing mDNS operations

## NAME

gmdns - Tool for doing mDNS operations

## SYNOPSIS

**gmdns** \[-n\|--name str\] \[-t\|--type str\] \[-m\|--domain str\] \[-o\|--host str\] \[-i\|--interface num\] \[-y\|--nettype unspec\|ipv4\|ipv6\] \[-s\|--service\] \[-x\|--txt str\] \[-p\|--port num\] \[-c\|--close-on-done\] \[--timeout time\_in\_msecs\] \[-d\|--debug\] \[-h\|--help\]

## DESCRIPTION

The **gmdns** program allows you to advertise an mDNS service or query for mDNS services on the local network.

## OPTIONS

- *-n\|--name str*

  The name field for the service/query.

- *-t\|--type str*

  The type field for the service/query.

- *-m\|--domain str*

  The domain field for the service/query.

- *-o\|--host str*

  The host field for the service/query.

- *-i\|--interface num*

  The interface number for the service/query.  If -1, service/query all the interfaces on the system.  Defaults to -1.

- *-y\|--nettype unspec\|ipv4\|ipv6*

  The network type for the service/query.  If unspec, the service/query is for IPv4 and IPv6.  Otherwise it's only for the specified protocol. Defaults to unspec.

- *-s\|--service*

  Advertise a network service instead of doing a query.  In this case, the name, type, and port options must be provided.  The others are optional and should not be provided unless you need them.

- *-x\|--txt str*

  Add the string to the set of text strings advertised for a service. Only makes sense with -s.

- *-p\|--port str*

  Use the given port for the advertised service.  Only make sense with -s.

- *-c\|--close-on-done*

  For a query, after all currently known services are reported, exit.

- *--timeout time*

  The amount of time to wait, in milliseconds, before closing everything and terminating.

- *-d\|--debug*

  Generate debugging output.  Specifying more than once increases the output.

- *-h\|--help*

  Help output

## STRING VALUES FOR QUERIES

The string values for queries may use regular expressions or globs. If the string starts with '%', then the data after it is treated as a regular expression and fields are matched against that.  If the string starts with '@', the the data after it is treated as a standard glob. See the [regex(7)](/regex/7.md) and [glob(7)](/glob/7.md) man pages for details.

If the string starts with '=', an exact comparison is done with the data after it.

If the string starts with a-z0-9\_ or a space, then an exact string comparison is done, including the first character.

The behavior of matching for any other starting character is undefined.  In general, you should always use '@', '%', or '=' as the starting character of all your query strings to be sure.

## SEE ALSO

[gensio\_mdns(3)](/gensio_mdns/3.md), [regex(7)](/regex/7.md), [glob(7)](/glob/7.md)

## KNOWN PROBLEMS

None.

## AUTHOR

Corey Minyard \<minyard@acm.org\>
