VZFileHandleNetworkDeviceAttachment
A network device that transmits raw network packets and frames using a datagram socket.
Declaration
class VZFileHandleNetworkDeviceAttachmentOverview
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_DGRAMtype 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.