---
title: "SCNetworkReachabilityCreateWithAddressPair(_:_:_:)"
framework: systemconfiguration
role: symbol
role_heading: Function
path: "systemconfiguration/scnetworkreachabilitycreatewithaddresspair(_:_:_:)"
---

# SCNetworkReachabilityCreateWithAddressPair(_:_:_:)

Creates a reachability reference to the specified network address.

## Declaration

```swift
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

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

## Discussion

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

## See Also

### Creating a Reachability Reference

- [SCNetworkReachabilityCreateWithAddress(_:_:)](systemconfiguration/scnetworkreachabilitycreatewithaddress(_:_:).md)
- [SCNetworkReachabilityCreateWithName(_:_:)](systemconfiguration/scnetworkreachabilitycreatewithname(_:_:).md)
