NSL and how it relates to Bonjour

Q: I thought NSL was a protocol independent way for applications to discover network services. How does NSL relate to Bonjour?

A: NSL is a protocol independent library which has existed since Mac OS 8.5, but it predominately uses Service Location Protocol (SLP) and AppleTalk for service discovery of URLs. In Mac OS X 10.2, Apple introduced three new APIs that use Bonjour for service discovery. The new APIs are CFNetServices, NSNetServices and DNSServiceDiscovery.

Currently, the lower level NSL API cannot be used to register or browse for Bonjour services. However, the high level "Connect To Server" dialog, which you get by calling NSLStandardGetURL, can be used to browse for Bonjour services.

If your application is targeted to run on Mac OS X 10.2 and later, Apple highly recommends that you use the Bonjour APIs directly for your service discovery needs, instead of NSL.

For more information on Bonjour, please visit the Bonjour Developer Web Site.

Document Revision History

DateNotes
2003-09-18Explains the relationship between NSL and Bonjour.

Posted: 2003-09-18


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.