gmdns(1)
πΈ gmdns β bestie's guide to the mDNS tool π
okay so welcome to gmdns(1), section 1 of the manual, and let me just say β this little icon is a tool for doing mDNS operations, and if you don't know what that means yet, don't even worry, we're getting there together π«Ά
β¨ NAME β¨
gmdns β the tool for doing mDNS operations. that's it. that's the name. short, sweet, main character energy π
π 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]
no cap, that's the whole vibe right there. every bracket is optional, every | is "pick a lane bestie" β
π¦ DESCRIPTION π¦
so like. the gmdns program lets you do exactly two things, and both of them are iconic:
- advertise an mDNS service π₯
- query for mDNS services on the local network π
that's the tea. one binary, two moods, zero drama β¨
π OPTIONS π
every flag, every default, nothing skipped, because we don't gatekeep here:
-n,--name strβ the name field for the service/query. literally its name. give it a name π-t,--type strβ the type field for the service/query. like_http._tcpenergy, you know the drill β¨-m,--domain strβ the domain field for the service/query. the domain. yes queen πΈ-o,--host strβ the host field for the service/query. who's hosting? this one π«Ά-i,--interface numβ the interface number for the service/query. if it's-1, you're service/querying all the interfaces on the system. defaults to-1. so like, the default is "everybody's invited" π-y,--nettype unspec|ipv4|ipv6β the network type for the service/query. if it'sunspec, the service/query is for IPv4 and IPv6 both, bestie, why choose. otherwise it's only for the protocol you specified. defaults tounspec. slay π-s,--serviceβ advertise a network service instead of doing a query. in this case,name,type, andportmust be provided β non-negotiable, it's giving mandatory. the others are optional and should not be provided unless you actually need them, so don't just fill in every field for fun π-x,--txt strβ add the string to the set of text strings advertised for a service. only makes sense with-s. periodt π-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. like, we got what we came for, we're leaving, bye π--timeout timeβ the amount of time to wait, in milliseconds, before closing everything and terminating. it's a countdown bestie, tick tock β³-d,--debugβ generate debugging output. specifying it more than once increases the output. stack it, layer it, go feral with it π-h,--helpβ help output. the classic. the icon π
π STRING VALUES FOR QUERIES π
okay this is the part where it gets spicy, pay attention πΆοΈ
the string values for queries may use regular expressions or globs. here's the cheat sheet:
- if the string starts with
'%', then the data after it is treated as a regular expression, and fields are matched against that. seeregex(7)for the details π - if the string starts with
'@', then the data after it is treated as a standard glob. seeglob(7)for the 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 β so yeah, that leading char counts, don't forget it π«
and now the scary part: the behavior of matching for any other starting character is undefined. undefined!! not "probably fine", not "works most of the time" β undefined. so in general, you should always use'@','%', or'='as the starting character of all your query strings to be sure. i'm literally begging you π
π SEE ALSO π
go read your siblings, they're all iconic too:
π KNOWN PROBLEMS π
None.
yes bestie, that's the whole section. not one single problem. flawless behavior. no bugs, only vibes π§
π AUTHOR π
Corey Minyard <minyard@acm.org> β the legend, the moment, the whole reason we're here π
and that's the page!! this came out of the 2020 edition of the gmdns(1) manual, dated Oct 15 β so if you're reading this, shoutout to the source and version, and remember: always use '@', '%', or '=' in your query strings, and never start one with a random character. bye bestie, go mDNS responsibly πβ¨ππ¦πΈ
π¦ where this page comes from
- debian trixie: gensio-bin 2.8.13-7 Β· GPL-2.0-only
- epel 9: gensio 2.8.15-1.el9 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 43: gensio 2.8.15-5.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 43: gensio 3.0.4-1.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 44: gensio 3.0.2-1.fc44 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 44: gensio 3.0.4-1.fc44 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- opensuse-leap 16.0: gensio 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: gensio 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: gensio 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: gensio 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- ubuntu noble: gensio-bin 2.8.2-6.1build1 Β· GPL-2.0-only
- ubuntu questing: gensio-bin 2.8.13-7
- ubuntu resolute: gensio-bin 3.0.0-1build1 Β· GPL-2.0-only
- ubuntu stonking: gensio-bin 3.0.0-1ubuntu1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms