vmnet_network_configuration_create(_:_:)
Creates a network configuration object with the specified operating mode.
Declaration
func vmnet_network_configuration_create(_ mode: vmnet_mode_t, _ status: UnsafeMutablePointer<vmnet_return_t>?) -> vmnet_network_configuration_ref?Parameters
- mode:
Shared mode or host-only mode.
- status:
Optional output parameter, returns status.
Return Value
A vmnet network handle on success, otherwise NULL.
Discussion
All other parameters are optional and have the following default value:
External interface: default interface per the routing table
NAT44: enabled
NAT66: enabled
DHCP: enabled
DNS proxy: enabled
Router advertisement: enabled
IPv4 subnet: A /24 suffix, under 192.168/16 (the private address space defined by RFC-1918).
IPv6 prefix: random Unique Local Addresses (ULA) prefix
Port forwarding rule: none
DHCP reservation: none
MTU: 1500
Use CFRelease to release the network configuration object.