---
title: "init(addresses:subnetMasks:)"
framework: networkextension
role: symbol
role_heading: Initializer
path: "networkextension/neipv4settings/init(addresses:subnetmasks:)"
---

# init(addresses:subnetMasks:)

Initializes an IPv4 settings object.

## Declaration

```swift
init(addresses: [String], subnetMasks: [String])
```

## Parameters

- `addresses`: An array of IPv4 address strings. These IPv4 addresses will be assigned to the tunnel’s TUN interface.
- `subnetMasks`: An array of IPv4 network mask strings. Each mask in this array is combined with the IP address in the corresponding index in addresses to specify an IPv4 network that the TUN interface is (virtually) connected to.

## Return Value

Return Value The initialized NEIPv4Settings object.
