You can use the dns-sd command to browse and discover services similarly to how you use the ping or traceroute commands. The dns-sd command is primarily used interactively, mainly because its command-line arguments and output format can change over time, which makes invoking the command from a shell script unpredictable and risky. Additionally, the asynchronous nature of DNS service discovery (DNS-SD) does not easily lend itself to script-oriented programming.
For examples, see Advertising Resources for DNS in Working With Oracle Solaris 11.2 Directory and Naming Services: DNS and NIS . See also the dns-sd (1M) man page.