Jump To:
Leopard Sample Code
Darwin is the UNIX technology-based foundation of Mac OS X. Darwin integrates several technologies. Among the most important are 4.4BSD-based operating-system services (built on the Mach 3.0 microkernel), the I/O Kit, networking facilities, and support for multiple integrated file systems. Developers can use Darwin to port UNIX/Linux applications and create kernel extensions.

A guided introduction and learning path for developers new to Darwin.   Essential information for developers working in the Darwin environment.   C and Objective-C API references organized by framework.
Document Descriptions
On Off
Display

Sorted by
Title
Sort by
Topic
Sort by
Date
BootstrapDump (HTML) (DMG) (ZIP)
Print Mach bootstrap namespace information.
Interprocess Communication, Process Management 2008-06-18
CFLocalServer (HTML) (DMG) (ZIP)
Uses UNIX domain sockets to communicate between client and server programs on the same machine.
Networking, Process Management 2005-07-26
CFProxySupportTool (HTML) (DMG) (ZIP)
Shows how to use the CFProxySupport APIs to decide whether a network connection should pass through a proxy.
Networking 2007-10-29
CheckExecutableArchitecture (HTML) (DMG) (ZIP)
Determine whether a particular Mach-O executable contains a version suitable for executing on a given processor architecture.
Runtime Architecture 2006-02-07
CryptNoMore (HTML) (DMG) (ZIP)
Shows how to authenticate a user using Open Directory (Directory Services).
Security 2008-03-17
CryptoSample (HTML) (DMG) (ZIP)
Contains sample code showing symmetric encryption and message digest calculation.
Security 2003-02-06
dist_fft (HTML) (DMG) (ZIP)
Gigaelement FFTs on Apple G5 clusters
Performance 2004-08-23
DNSServiceMetaQuery (HTML) (DMG) (ZIP)
Shows how to discover Bonjour service types being advertised on the local network.
Networking 2005-06-01
EmptyFS (HTML) (DMG) (ZIP)
A very simple VFS plug-in that mounts a volume that is completely empty.
File Management, Kernel 2006-11-09
FileNotification (HTML) (DMG) (ZIP)
kqueue file notification introduced in 10.3. Notification API to detect file system modifications.
File Management 2005-10-27
filesystem_examples (HTML) (DMG) (ZIP)
Collection of command line tools illustrating filesystem features.
File Management 2006-01-10
FSMegaInfo (HTML) (DMG) (ZIP)
Prints information about various file system objects; helpful when debugging VFS plug-ins.
File Management 2008-02-25
GetMACAddressSample (HTML) (DMG) (ZIP)
Demonstrates how to retrieve the MAC address for each Ethernet interface from the Mac OS X I/O Registry.
Networking, Security 2003-01-14
GetPrimaryMACAddress (HTML) (DMG) (ZIP)
Demonstrates retrieving the MAC address of the built-in Ethernet controller. Useful for uniquely identifying a Macintosh system.
Networking, Security 2005-10-27
IOKitWithLibrary (HTML) (DMG) (ZIP)
Shows how an I/O Kit driver can link with a C library from a separate kernel extension.
Hardware & Drivers, Kernel 2003-08-27
IOPrintSuperClasses (HTML) (DMG) (ZIP)
Given the name of a class, this tool will print all of the super-classes of that class.
Hardware & Drivers, Kernel 2005-08-17
KauthORama (HTML) (DMG) (ZIP)
Prints each Kauth request, illustrating how Kauth interacts with high-level operations, like copying files.
Kernel, Security 2007-04-30
MachPortDump (HTML) (DMG) (ZIP)
Dumps out the Mach port name space of a process; useful when debugging port right leaks.
Resource Management 2005-08-10
MapLargeFile (HTML) (DMG) (ZIP)
Shows a technique for mapping files greater than 4GB into memory for faster access.
Resource Management 2003-11-19
MemoryBasedBundle (HTML) (DMG) (ZIP)
Shows how to execute Mach-O code from memory, much like GetMemFragment in CFM.
Runtime Architecture 2005-08-10
MFSLives (HTML) (DMG) (ZIP)
Sample VFS plug-in for the Macintosh File System (MFS) volume format, as used on 400KB floppies.
File Management, Kernel 2006-11-09
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
File Management, Networking, Porting, Process Management, Resource Management, Runtime Architecture, Security 2003-10-27
MoreSCF (HTML) (DMG) (ZIP)
High-level wrapper around System Configuration framework, making common operations easy.
Networking 2007-06-07
Moriarity (HTML) (DMG) (ZIP)
Implementing a Cocoa GUI that wraps command-line functionality, calling a UNIX task and presenting the results in a GUI.
Porting 2003-01-14
NetworkAuthentication (HTML) (DMG) (ZIP)
Demonstrates authentication with Open Directory APIs and GSSAPI
Networking 2005-06-01
NotifyTool (HTML) (DMG) (ZIP)
Shows how to use the BSD notify API.
Interprocess Communication 2007-09-25
PIDFromBSDProcessName (HTML) (DMG) (ZIP)
Provides a simple API to do process PID lookup based on BSD process name.
Porting, Process Management, Tools 2003-02-13
QISA (HTML) (DMG) (ZIP)
Demonstrates the basics of writing an Internet setup assistant for traditional Mac OS and Mac OS X.
Networking, Security 2003-05-15
SampleD (HTML) (DMG) (ZIP)
Demonstrates use of launchd and Apple System Logger.
Process Management 2005-10-27
SampleFilterScheme (HTML) (DMG) (ZIP)
Demonstrates a simple filter scheme which passes all operations through to its provider unchanged.
Hardware & Drivers, Kernel 2006-01-03
SampleUSBAudioPlugin (HTML) (DMG) (ZIP)
USB audio plugin that performs a lowpass filtering operation on audio streamed through an audio USB Device.
Hardware & Drivers 2005-03-07
SCSIHBAEmulator (HTML) (DMG) (ZIP)
Demonstration of how to implement a virtual parallel tasking SCSI host bus adapter (HBA)
Hardware & Drivers 2007-02-20
SimpleDataQueue (HTML) (DMG) (ZIP)
Implements an IODataQueue inside an I/O Kit KEXT which passes events and data to user space.
Hardware & Drivers, Kernel 2003-01-14
SimpleDial (HTML) (DMG) (ZIP)
Demonstrates management of dialup connections, such as PPP, using System Configuration framework network connection API.
Networking 2005-07-26
SimplePing (HTML) (DMG) (ZIP)
Sample provides simple API to programatically ping a remote host without admin privileges
Networking 2003-10-27
SimpleReach (HTML) (DMG) (ZIP)
Demonstrates network host reachability testing using the System Configuration framework asynchronous network reachability API.
Networking 2005-07-26
SimpleUserClient (HTML) (DMG) (ZIP)
Shows how to create a user client for an I/O Kit kernel driver.
Hardware & Drivers, Kernel 2008-08-27
SocketCancel (HTML) (DMG) (ZIP)
Shows how to safely cancel threads that are blocked within BSD sockets calls.
Networking 2005-08-10
SSLSample (HTML) (DMG) (ZIP)
Contains examples showing how to use SecureTransport.
Security 2003-01-14
TimerEventSample (HTML) (DMG) (ZIP)
Shows how to set up and use an IOTimerEventSource in a kext.
Hardware & Drivers, Kernel 2003-01-14
UTXplorer (HTML) (DMG) (ZIP)
Uses the <utmpx.h> API to display current login sessions and login history.
Process Management 2008-03-19
VendorSpecificType00 (HTML) (DMG) (ZIP)
Demonstrates how to access vendor-specific storage device functionality using a simple interface from user space code.
Hardware & Drivers, Kernel 2006-10-02
VolumeToBSDNode (HTML) (DMG) (ZIP)
Shows how to iterate across all mounted volumes and retrieve their BSD node names.
File Management, Hardware & Drivers 2006-10-16
Watcher (HTML) (DMG) (ZIP)
Uses FSEvents to monitor a directory hierarchy to keep track of its total size
File Management 2006-08-04