---
title: "vmnet_stop_interface(_:_:_:)"
framework: vmnet
role: symbol
role_heading: Function
platforms: [Mac Catalyst 13.0+, macOS 10.10+]
path: "vmnet/vmnet_stop_interface(_:_:_:)"
---

# vmnet_stop_interface(_:_:_:)

Stops I/O on the virtual interface.

## Declaration

```swift
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

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

## Discussion

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(_:_:_:_:), this call releases the associated network object.

## See Also

### Starting and stopping interfaces

- [vmnet_start_interface(_:_:_:)](vmnet/vmnet_start_interface(_:_:_:).md)
- [vmnet_interface_start_with_network(_:_:_:_:)](vmnet/vmnet_interface_start_with_network(_:_:_:_:).md)
- [vmnet_interface_set_event_callback(_:_:_:_:)](vmnet/vmnet_interface_set_event_callback(_:_:_:_:).md)
