vmnet provides a low-level virtual network interface API for attaching virtual machines to host networking on macOS. Use it to connect a VM to the host network in shared, bridged, or host modes, selecting among the configurations described by operating_modes_t. You send and receive raw packets through vmpktdesc descriptors, respond to interface state changes reported via interface_event_t, and check the outcome of operations with the vmnet_return_t status codes.
Network Modes 1
Select how a virtual machine attaches to host networking.
- Enoperating_modes_t@typedef operating_modes_t
Packet Transfer 1
Send and receive raw packets through the virtual interface.
- Stvmpktdesc@struct vmpktdesc
Interface Events 1
Observe state changes reported by the virtual network interface.
- Stinterface_event_t@typedef interface_event_t
Status Codes 1
Inspect the outcome of vmnet operations.
- Envmnet_return_t@typedef vmnet_return_t
Type Aliases 9
- Tyvmnet_mode_t
- Tyinterface_ref@typedef interface_ref
- Tyvmnet_start_interface_completion_handler_t@typedef vmnet_start_interface_completion_handler_t
- Tyvmnet_interface_event_callback_t@typedef vmnet_interface_event_callback_t
- Tyvmnet_interface_completion_handler_t@typedef vmnet_interface_completion_handler_t
- Tyvmnet_interface_get_port_forwarding_rules_handler_t@typedef vmnet_interface_get_port_forwarding_rules_handler_t
- Tyvmnet_interface_get_ip_port_forwarding_rules_handler_t@typedef vmnet_interface_get_ip_port_forwarding_rules_handler_t
- Tyvmnet_network_ref
- Tyvmnet_network_configuration_ref