Represents a virtual network adapter that is attached to a virtual machine. More...
Public Member Functions | |
void | attachToNAT () |
Attach the network adapter to the Network Address Translation (NAT) interface. | |
void | attachToBridgedInterface () |
Attach the network adapter to a bridged host interface. | |
void | attachToInternalNetwork () |
Attach the network adapter to an internal network. | |
void | attachToHostOnlyInterface () |
Attach the network adapter to the host-only network. | |
void | attachToVDE () |
Attach the network adapter to a VDE network. | |
void | detach () |
Detach the network adapter. | |
Public Attributes | |
attribute NetworkAdapterType | adapterType |
Type of the virtual network adapter. | |
readonly attribute unsigned long | slot |
Slot number this adapter is plugged into. | |
attribute boolean | enabled |
Flag whether the network adapter is present in the guest system. | |
attribute wstring | MACAddress |
Ethernet MAC address of the adapter, 12 hexadecimal characters. | |
readonly attribute NetworkAttachmentType | attachmentType |
attribute wstring | hostInterface |
Name of the host network interface the VM is attached to. | |
attribute wstring | internalNetwork |
Name of the internal network the VM is attached to. | |
attribute wstring | NATNetwork |
Name of the NAT network the VM is attached to. | |
attribute wstring | VDENetwork |
Name of the VDE switch the VM is attached to. | |
attribute boolean | cableConnected |
Flag whether the adapter reports the cable as connected or not. | |
attribute unsigned long | lineSpeed |
Line speed reported by custom drivers, in units of 1 kbps. | |
attribute boolean | traceEnabled |
Flag whether network traffic from/to the network card should be traced. | |
attribute wstring | traceFile |
Filename where a network trace will be stored. | |
readonly attribute INATEngine | natDriver |
Points to the NAT engine which handles the network address translation for this interface. | |
attribute unsigned long | bootPriority |
Network boot priority of the adapter. | |
attribute unsigned long | bandwidthLimit |
Maximum throughput allowed for this network adapter, in units of 1 mbps. |
Represents a virtual network adapter that is attached to a virtual machine.
Each virtual machine has a fixed number of network adapter slots with one instance of this attached to each of them. Call IMachine::getNetworkAdapter to get the network adapter that is attached to a given slot in a given machine.
Each network adapter can be in one of five attachment modes, which are represented by the NetworkAttachmentType enumeration; see the attachmentType attribute.
{9BF58A46-C3F7-4F31-80FA-DDE9A5DC0B7B}
void INetworkAdapter::attachToNAT | ( | ) |
Attach the network adapter to the Network Address Translation (NAT) interface.
void INetworkAdapter::attachToBridgedInterface | ( | ) |
Attach the network adapter to a bridged host interface.
void INetworkAdapter::attachToInternalNetwork | ( | ) |
Attach the network adapter to an internal network.
void INetworkAdapter::attachToHostOnlyInterface | ( | ) |
Attach the network adapter to the host-only network.
void INetworkAdapter::attachToVDE | ( | ) |
Attach the network adapter to a VDE network.
void INetworkAdapter::detach | ( | ) |
Detach the network adapter.
Type of the virtual network adapter.
Depending on this value, VirtualBox will provide a different virtual network hardware to the guest.
readonly attribute unsigned long INetworkAdapter::slot |
Slot number this adapter is plugged into.
Corresponds to the value you pass to IMachine::getNetworkAdapter to obtain this instance.
attribute boolean INetworkAdapter::enabled |
Flag whether the network adapter is present in the guest system.
If disabled, the virtual guest hardware will not contain this network adapter. Can only be changed when the VM is not running.
attribute wstring INetworkAdapter::MACAddress |
Ethernet MAC address of the adapter, 12 hexadecimal characters.
When setting it to null
or an empty string, VirtualBox will generate a unique MAC address.
readonly attribute NetworkAttachmentType INetworkAdapter::attachmentType |
attribute wstring INetworkAdapter::hostInterface |
Name of the host network interface the VM is attached to.
attribute wstring INetworkAdapter::internalNetwork |
Name of the internal network the VM is attached to.
attribute wstring INetworkAdapter::NATNetwork |
Name of the NAT network the VM is attached to.
attribute wstring INetworkAdapter::VDENetwork |
Name of the VDE switch the VM is attached to.
attribute boolean INetworkAdapter::cableConnected |
Flag whether the adapter reports the cable as connected or not.
It can be used to report offline situations to a VM.
attribute unsigned long INetworkAdapter::lineSpeed |
Line speed reported by custom drivers, in units of 1 kbps.
attribute boolean INetworkAdapter::traceEnabled |
Flag whether network traffic from/to the network card should be traced.
Can only be toggled when the VM is turned off.
attribute wstring INetworkAdapter::traceFile |
Filename where a network trace will be stored.
If not set, VBox-pid.pcap will be used.
readonly attribute INATEngine INetworkAdapter::natDriver |
Points to the NAT engine which handles the network address translation for this interface.
This is active only when the interface actually uses NAT (see attachToNAT).
attribute unsigned long INetworkAdapter::bootPriority |
Network boot priority of the adapter.
Priority 1 is highest. If not set, the priority is considered to be at the lowest possible setting.
attribute unsigned long INetworkAdapter::bandwidthLimit |
Maximum throughput allowed for this network adapter, in units of 1 mbps.
A zero value means uncapped/unlimited.