gmdns(1)

πŸ“¦
version 3.0.4 Β· 2 versions
, in debian trixie, epel 9, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

🌸 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._tcp energy, 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's unspec, the service/query is for IPv4 and IPv6 both, bestie, why choose. otherwise it's only for the protocol you specified. defaults to unspec. slay 🌈
  • -s, --service β€” advertise a network service instead of doing a query. in this case, name, type, and port must 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. see regex(7) for the details πŸ“–
  • if the string starts with '@', then the data after it is treated as a standard glob. see glob(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