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

# vmnet_stop_interface(_:_:_:)

Stops I/O on the virtual interface.

```
func vmnet_stop_interface(_ interface: interface_ref, _ queue: dispatch_queue_t, _ handler: @escaping vmnet_interface_completion_handler_t) -> vmnet_return_t
```

## Parameters

`interface`

The interface to halt I/O on.

`queue`

The queue to schedule the stop handler on.

`handler`

The block that is invoked when the stop interface request completes.

## Return Value

`VMNET_SUCCESS` if the framework scheduled the completion handler, an error code otherwise.

## Discussion

Once an app calls this function, subsequent calls to read or write packets on this interface fail. If the app created the  interface through [`vmnet_interface_start_with_network(_:_:_:_:)`](/documentation/vmnet/vmnet_interface_start_with_network(_:_:_:_:)), this call releases the associated network object.

---

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)