<!--
{
  "availability" : [
    "iOS: 2.0.0 - 17.4.0",
    "iPadOS: 2.0.0 - 17.4.0",
    "macCatalyst: 13.1.0 - 17.4.0",
    "macOS: 10.3.0 - 14.4.0",
    "tvOS: -",
    "visionOS: 1.0.0 - 1.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "SystemConfiguration",
  "identifier" : "/documentation/SystemConfiguration/SCNetworkReachabilityCreateWithAddressPair(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "System Configuration"
    ],
    "preciseIdentifier" : "c:@F@SCNetworkReachabilityCreateWithAddressPair"
  },
  "title" : "SCNetworkReachabilityCreateWithAddressPair(_:_:_:)"
}
-->

# SCNetworkReachabilityCreateWithAddressPair(_:_:_:)

Creates a reachability reference to the specified network address.

```
func SCNetworkReachabilityCreateWithAddressPair(_ allocator: CFAllocator?, _ localAddress: UnsafePointer<sockaddr>?, _ remoteAddress: UnsafePointer<sockaddr>?) -> SCNetworkReachability?
```

## Parameters

`allocator`

The allocator to use. Pass `NULL` or <doc://com.apple.documentation/documentation/CoreFoundation/kCFAllocatorDefault> to use the default allocator.

`localAddress`

The local address associated with a network connection. If `NULL`, only the remote address is of interest. The value of this parameter is copied into the new object.

`remoteAddress`

The remote address associated with a network connection. If `NULL`, only the local address is of interest. The value of this parameter is copied into the new object.

## Return Value

A new immutable reachability reference. You must release the returned value.

## Discussion

You can use the reachability reference returned by this function to monitor the reachability of the target host.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)