<!--
{
  "availability" : [
    "iOS: 16.1.0 -",
    "iPadOS: 16.1.0 -",
    "macCatalyst: 16.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVRouting",
  "identifier" : "/documentation/AVRouting/AVCustomRoutingPartialIP",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVRouting"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCustomRoutingPartialIP"
  },
  "title" : "AVCustomRoutingPartialIP"
}
-->

# AVCustomRoutingPartialIP

An object that represents a full or partial IP address.

```
class AVCustomRoutingPartialIP
```

## Overview

Use this type to define the IP address and subnet mask of known routes on a local network. Create an instance of this class and add it to a custom routing controller’s [`knownRouteIPs`](/documentation/AVRouting/AVCustomRoutingController/knownRouteIPs) array like shown below:

```swift
// Define the IP address.
let anIPAddressInBytes:[UInt8] = [192, 168, 10, 5]
let address = Data(bytes: anIPAddressInBytes, count: anIPAddressInBytes.count)

// Define the subnet mask.
let aMaskInBytes:[UInt8] = [255, 255, 255, 255]
let mask = Data(bytes: aMaskInBytes, count: aMaskInBytes.count)

// Create a new object to represent the address and mask.
let partialIP = AVCustomRoutingPartialIP(address: address, mask: mask)

// Add the instance to the custom routing controller's known routes.
routingController.knownRouteIPs.append(partialIP)
```

## Topics

### Creating an IP fragment

[`init(address:mask:)`](/documentation/AVRouting/AVCustomRoutingPartialIP/init(address:mask:))

Creates an IP fragment.

### Inspecting the IP fragment

[`address`](/documentation/AVRouting/AVCustomRoutingPartialIP/address)

A full or partial IP address for a device known to be on the network.

[`mask`](/documentation/AVRouting/AVCustomRoutingPartialIP/mask)

A mask that represents how many octets of the IP address to respect.



---

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)