<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: 10.1.0 - 10.6.0",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SystemConfiguration",
  "identifier" : "/documentation/SystemConfiguration/SCNetworkCheckReachabilityByName",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "System Configuration"
    ],
    "preciseIdentifier" : "c:@F@SCNetworkCheckReachabilityByName"
  },
  "title" : "SCNetworkCheckReachabilityByName"
}
-->

# SCNetworkCheckReachabilityByName

Determines whether the specified network host or node name is reachable using the current network configuration.

```
Boolean SCNetworkCheckReachabilityByName(const char *nodename, SCNetworkConnectionFlags *flags);
```

## Parameters

`nodename`

The node name of the desired host. This is the same name that would be passed to the gethostbyname(3) or getaddrinfo(3) functions.

`flags`

A pointer to memory that, on output, will be filled with a set of [`SCNetworkConnectionFlags`](/documentation/SystemConfiguration/SCNetworkConnectionFlags) values detailing the reachability of the specified address

## Return Value

`TRUE` if the network connection flags are valid; `FALSE` if the status could not be determined.

## Discussion

This function is deprecated, but you can get equivalent results using the following code:

```objc
SCNetworkReachabilityRef target;
SCNetworkConnectionFlags flags = 0;
Boolean ok;
target = SCNetworkReachabilityCreateWithName(NULL, name);
ok = SCNetworkReachabilityGetFlags(target, &flags);
CFRelease(target);
```

---

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)