Mirror of Apple's Reachability sample application at http://developer.apple.com/library/ios/#samplecode/Reachability/