The Zeroconf DNS Service Discovery APIs


Unless you're an operating system vendor or a hardware maker, the first two layers of Zeroconf technologylink-local addressing and Multicast DNSshould be provided for you by operating system components or add-ins. On Mac OS X, they are built-in. On Windows XP, they are provided by Apple's "Bonjour for Windows." On Linux and other Unix platforms, this functionality is available using Apple's Darwin code or a variety of other implementations and is already included in some newer Linux distributions.

Understanding how link-local addressing and Multicast DNS work is valuable background information, but when it comes to actual programming, most programmers will interact with Zeroconf through the DNS Service Discovery APIs in their chosen language.

Chapter 6 introduces the dns-sd command-line tool that lets you experiment with Zeroconf service advertising and discovery before you actually write your first line of Zeroconf code.

Chapter 7 introduces the C API for advertising and browsing for services. The same C API exists on Mac OS X, Windows, Linux, and all the supported Unix platforms. In Apple's implementation, all the other APIs are layered on top of the C API. In much the same way as Java sockets on most platforms are implemented by making use of the kernel's native sockets support, Java's DNS-SD API is built on top of the common C API that exists on all supported platforms.

Chapter 8 explains the Java API, which lets you write portable cross-platform programs that will run on any supported platform that has Java and Zeroconf installed.

Chapter 9 describes two of the Bonjour APIs that are specific to Mac OS X: CFNetServices and Cocoa's NSNetServices.

Chapter 10 rounds out the review of APIs, outlining the Zeroconf support appearing in some unexpected languages like Ruby and Python. In fact, the Python support for Zeroconf was built using a technology called Simplified Wrapper and Interface Generator (SWIG, http://www.swig.org/), so that single piece of work means Zeroconf service discovery is now accessible from a wide variety of well-known and lesser-known programming languages, including Tcl, Perl, Scheme, PHP, Objective Caml, Pike, C#, Allegro Common Lisp, and Modula-3.




Zero Configuration Networking. The Definitive Guide
Zero Configuration Networking: The Definitive Guide
ISBN: 0596101007
EAN: 2147483647
Year: 2004
Pages: 97

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net