<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "vmnet",
  "identifier" : "/documentation/vmnet/vmnet_network_configuration_set_ipv4_subnet(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "vmnet"
    ],
    "preciseIdentifier" : "c:@F@vmnet_network_configuration_set_ipv4_subnet"
  },
  "title" : "vmnet_network_configuration_set_ipv4_subnet(_:_:_:)"
}
-->

# vmnet_network_configuration_set_ipv4_subnet(_:_:_:)

Configures the IPv4 addresses of a vmnet network.

```
func vmnet_network_configuration_set_ipv4_subnet(_ config: vmnet_network_configuration_ref, _ subnet_addr: UnsafePointer<in_addr>, _ subnet_mask: UnsafePointer<in_addr>) -> vmnet_return_t
```

## Parameters

`config`

The network configuration object to be modified.

`subnet_addr`

The subnet address.

`subnet_mask`

The subnet mask.

## Return Value

VMNET_SUCCESS on success, error otherwise.

## Discussion

> Note: The framework reserves the first, second, and last addresses of the range. The second address is reserved for the host, the first and last are not assignable to any node.

---

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)