Post

Replies

Boosts

Views

Activity

Reply to Virtualization.Framework support for VZFileHandleNetworkDeviceAttachment
I did setup it succesfully with socketpair() like below: let socket_vector = Array<Int32>(unsafeUninitializedCapacity: 2) { buffer, initializedCount in guard Darwin.socketpair(AF_UNIX, SOCK_DGRAM, 0, buffer.baseAddress) == 0 else { assertionFailure(String(cString: Darwin.strerror(errno)!)) initializedCount = 0 return } initializedCount = 2 } for socket_descriptor in socket_vector { let virtioSocketNet = VZVirtioNetworkDeviceConfiguration() let fh = FileHandle(fileDescriptor: socket_descriptor) virtioSocketNet.attachment = VZFileHandleNetworkDeviceAttachment(fileHandle: fh) config.networkDevices += [virtioSocketNet] } I struggle to send/receive anything with it. Does anyone happen to have a working netcat/socat command that successfully sends anything? I use Linux as a guest system, and interfaces register as enp0s2, enp0s3
Aug ’22
Reply to Virtualization.Framework support for VZFileHandleNetworkDeviceAttachment
I did setup it succesfully with socketpair() like below: let socket_vector = Array<Int32>(unsafeUninitializedCapacity: 2) { buffer, initializedCount in guard Darwin.socketpair(AF_UNIX, SOCK_DGRAM, 0, buffer.baseAddress) == 0 else { assertionFailure(String(cString: Darwin.strerror(errno)!)) initializedCount = 0 return } initializedCount = 2 } for socket_descriptor in socket_vector { let virtioSocketNet = VZVirtioNetworkDeviceConfiguration() let fh = FileHandle(fileDescriptor: socket_descriptor) virtioSocketNet.attachment = VZFileHandleNetworkDeviceAttachment(fileHandle: fh) config.networkDevices += [virtioSocketNet] } I struggle to send/receive anything with it. Does anyone happen to have a working netcat/socat command that successfully sends anything? I use Linux as a guest system, and interfaces register as enp0s2, enp0s3
Replies
Boosts
Views
Activity
Aug ’22