INetworkAdapter Interface Reference

List of all members.

Public Member Functions

void attachToNAT ()
 Attach the network adapter to the Network Address Translation (NAT) interface.
void attachToHostInterface ()
 Attach the network adapter to a host interface.
void attachToInternalNetwork ()
 Attach the network adapter to an internal 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 that is currently in use.
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.
attribute long TAPFileDescriptor
 File descriptor of the TAP device.
attribute wstring TAPSetupApplication
 Application to start to configure the TAP device.
attribute wstring TAPTerminateApplication
 Application to start before closing a TAP device.


Member Function Documentation

void INetworkAdapter::attachToNAT (  ) 

Attach the network adapter to the Network Address Translation (NAT) interface.

void INetworkAdapter::attachToHostInterface (  ) 

Attach the network adapter to a host interface.

On Linux, the TAP setup application will be executed if configured and unless a device name and/or file descriptor has been set, a new TAP interface will be created.

void INetworkAdapter::attachToInternalNetwork (  ) 

Attach the network adapter to an internal network.

void INetworkAdapter::detach (  ) 

Detach the network adapter.


Member Data Documentation

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, VirtualBox will generate a unique MAC address.

attribute wstring INetworkAdapter::hostInterface

Name of the Host Network Interface that is currently in use.

NULL will be returned if no device has been allocated. On Linux, setting this refers to a permanent TAP device. However, a file descriptor has precedence over the interface name on Linux. Note that when VBox allocates a TAP device, this property will not be set, i.e. the interface name would have to be determined using the file descriptor and /proc/self/fd.

Name of the internal network the VM is attached to.

attribute wstring INetworkAdapter::NATNetwork

Name of the NAT network the VM is attached to.

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.

File descriptor of the TAP device.

It can either be setup by the caller which has to supply an existing valid file handle allocated in the parent process of the VM process or allocated by VirtualBox. The value is -1 if it has not been defined. This property is non persistent, i.e. it will not be stored in the VM's configuration data and thus has to be set at each startup.

Application to start to configure the TAP device.

It is being passed two parameters, 1) the file handle (as ascii), 2) the TAP device name if it is available.

Application to start before closing a TAP device.

It is being passed two parameters, 1) the file handle (as ascii), 2) the TAP device name if it is available.


Generated on Fri Nov 21 21:38:41 2008 for VirtualBox Main API by  doxygen 1.5.5