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 | 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 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. |
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.
{65607A27-2B73-4D43-B4CC-0BA2C817FBDE}
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::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 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.