---
title: VZFileHandleNetworkDeviceAttachment
framework: virtualization
role: symbol
role_heading: Class
path: virtualization/vzfilehandlenetworkdeviceattachment
---

# VZFileHandleNetworkDeviceAttachment

A network device that transmits raw network packets and frames using a datagram socket.

## Declaration

```swift
class VZFileHandleNetworkDeviceAttachment
```

## Overview

Overview A VZFileHandleNetworkDeviceAttachment object maps a network interface to a connected datagram socket. This attachment transmits data at the data link layer. You configure and manage the socket in your app, and manage the corresponding data transfers. To configure a network device with a socket-based file handle: Create a socket with the SOCK_DGRAM type in your app. Create a FileHandle from the socket’s file descriptor. Create the VZFileHandleNetworkDeviceAttachment object using the file handle. Assign the attachment object to the attachment property of a VZVirtioNetworkDeviceConfiguration object. Add the VZVirtioNetworkDeviceConfiguration object to the networkDevices property of your VZVirtualMachineConfiguration. This attachment doesn’t require your app to have the com.apple.vm.networking entitlement.

## Topics

### Creating the attachment point

- [init(fileHandle:)](virtualization/vzfilehandlenetworkdeviceattachment/init(filehandle:).md)

### Getting the file handle

- [fileHandle](virtualization/vzfilehandlenetworkdeviceattachment/filehandle.md)

### Specifying the network packet size

- [maximumTransmissionUnit](virtualization/vzfilehandlenetworkdeviceattachment/maximumtransmissionunit.md)

## Relationships

### Inherits From

- [VZNetworkDeviceAttachment](virtualization/vznetworkdeviceattachment.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Attachment points

- [VZBridgedNetworkDeviceAttachment](virtualization/vzbridgednetworkdeviceattachment.md)
- [VZNATNetworkDeviceAttachment](virtualization/vznatnetworkdeviceattachment.md)
- [VZVmnetNetworkDeviceAttachment](virtualization/vzvmnetnetworkdeviceattachment.md)
- [VZNetworkDeviceAttachment](virtualization/vznetworkdeviceattachment.md)
