Version: 1.2

Posted: 2005-06-01

Build Requirements: Xcode 1.0 or later

Runtime Requirements: Mac OS X 10.3 or later

View Source Code:

Download Sample (“DNSServiceMetaQuery.zip”, 18.0K)
Download Sample (“DNSServiceMetaQuery.dmg”, 77.3K)



Description

This sample uses DNSServiceQueryRecord to send a Multicast DNS query that returns a list of Bonjour service types being advertised on the local network. Machines must be running mDNSResponder-58.6 (Mac OS X 10.3.4) or later in order to respond to this query.

Document Revision History

Date Notes
2005-06-01Added "#include <sys/socket.h>" to fix compiler errors in Mac OS X 10.4.
2004-12-09Added call to disable the CFSocket's kCFSocketCloseOnInvalidate option, since it's bad to close the DNSServiceRef's socket behind its back. Also removed inappropriate CFRelease of the CFSocket.
2004-05-29Shows how to discover Bonjour service types being advertised on the local network.

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.