org.virtualbox_6_1
Class INATEngine

java.lang.Object
  extended by org.virtualbox_6_1.IUnknown
      extended by org.virtualbox_6_1.INATEngine

public class INATEngine
extends IUnknown

Interface for managing a NAT engine which is used with a virtual machine. This allows for changing NAT behavior such as port-forwarding rules. This interface is used in theINetworkAdapter.getNATEngine()attribute. Interface ID: {8FAEF61E-6E15-4F71-A6A5-94E707FAFBCC}


Field Summary
 
Fields inherited from class org.virtualbox_6_1.IUnknown
obj, objMgr, port
 
Constructor Summary
INATEngine(java.lang.String wrapped, org.virtualbox_6_1.ObjectRefManager objMgr, org.virtualbox_6_1.jaxws.VboxPortType port)
           
 
Method Summary
 void addRedirect(java.lang.String name, NATProtocol proto, java.lang.String hostIP, java.lang.Integer hostPort, java.lang.String guestIP, java.lang.Integer guestPort)
          Adds a new NAT port-forwarding rule.
 java.lang.Long getAliasMode()
           
 java.lang.Boolean getDNSPassDomain()
          Whether the DHCP server should pass the DNS domain used by the host.
 java.lang.Boolean getDNSProxy()
          Whether the DHCP server (and the DNS traffic by NAT) should pass the address of the DNS proxy and process traffic using DNS servers registered on the host.
 java.lang.Boolean getDNSUseHostResolver()
          Whether the DHCP server (and the DNS traffic by NAT) should pass the address of the DNS proxy and process traffic using the host resolver mechanism.
 java.lang.String getHostIP()
          IP of host interface to bind all opened sockets to.
 java.lang.String getNetwork()
          The network attribute of the NAT engine (the same value is used with built-in DHCP server to fill corresponding fields of DHCP leases).
 void getNetworkSettings(Holder<java.lang.Long> mtu, Holder<java.lang.Long> sockSnd, Holder<java.lang.Long> sockRcv, Holder<java.lang.Long> TcpWndSnd, Holder<java.lang.Long> TcpWndRcv)
          Returns network configuration of NAT engine.
 java.util.List<java.lang.String> getRedirects()
          Array of NAT port-forwarding rules in string representation, in the following format: "name,protocol id,host ip,host port,guest ip,guest port".
 java.lang.String getTFTPBootFile()
          TFTP boot file attribute which is used with the built-in DHCP server to fill the corresponding fields of DHCP leases.
 java.lang.String getTFTPNextServer()
          TFTP server attribute which is used with the built-in DHCP server to fill the corresponding fields of DHCP leases.
 java.lang.String getTFTPPrefix()
          TFTP prefix attribute which is used with the built-in DHCP server to fill the corresponding fields of DHCP leases.
static INATEngine queryInterface(IUnknown obj)
           
 void removeRedirect(java.lang.String name)
          Removes a port-forwarding rule that was previously registered.
 void setAliasMode(java.lang.Long value)
           
 void setDNSPassDomain(java.lang.Boolean value)
          Whether the DHCP server should pass the DNS domain used by the host.
 void setDNSProxy(java.lang.Boolean value)
          Whether the DHCP server (and the DNS traffic by NAT) should pass the address of the DNS proxy and process traffic using DNS servers registered on the host.
 void setDNSUseHostResolver(java.lang.Boolean value)
          Whether the DHCP server (and the DNS traffic by NAT) should pass the address of the DNS proxy and process traffic using the host resolver mechanism.
 void setHostIP(java.lang.String value)
          IP of host interface to bind all opened sockets to.
 void setNetwork(java.lang.String value)
          The network attribute of the NAT engine (the same value is used with built-in DHCP server to fill corresponding fields of DHCP leases).
 void setNetworkSettings(java.lang.Long mtu, java.lang.Long sockSnd, java.lang.Long sockRcv, java.lang.Long TcpWndSnd, java.lang.Long TcpWndRcv)
          Sets network configuration of the NAT engine.
 void setTFTPBootFile(java.lang.String value)
          TFTP boot file attribute which is used with the built-in DHCP server to fill the corresponding fields of DHCP leases.
 void setTFTPNextServer(java.lang.String value)
          TFTP server attribute which is used with the built-in DHCP server to fill the corresponding fields of DHCP leases.
 void setTFTPPrefix(java.lang.String value)
          TFTP prefix attribute which is used with the built-in DHCP server to fill the corresponding fields of DHCP leases.
 
Methods inherited from class org.virtualbox_6_1.IUnknown
getObjMgr, getRemoteWSPort, getWrapped, releaseRemote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

INATEngine

public INATEngine(java.lang.String wrapped,
                  org.virtualbox_6_1.ObjectRefManager objMgr,
                  org.virtualbox_6_1.jaxws.VboxPortType port)
Method Detail

getNetwork

public java.lang.String getNetwork()
The network attribute of the NAT engine (the same value is used with built-in DHCP server to fill corresponding fields of DHCP leases).

Returns:
String

setNetwork

public void setNetwork(java.lang.String value)
The network attribute of the NAT engine (the same value is used with built-in DHCP server to fill corresponding fields of DHCP leases).

Parameters:
value - String

getHostIP

public java.lang.String getHostIP()
IP of host interface to bind all opened sockets to. NOTE: Changing this does not change binding of port forwarding.

Returns:
String

setHostIP

public void setHostIP(java.lang.String value)
IP of host interface to bind all opened sockets to. NOTE: Changing this does not change binding of port forwarding.

Parameters:
value - String

getTFTPPrefix

public java.lang.String getTFTPPrefix()
TFTP prefix attribute which is used with the built-in DHCP server to fill the corresponding fields of DHCP leases.

Returns:
String

setTFTPPrefix

public void setTFTPPrefix(java.lang.String value)
TFTP prefix attribute which is used with the built-in DHCP server to fill the corresponding fields of DHCP leases.

Parameters:
value - String

getTFTPBootFile

public java.lang.String getTFTPBootFile()
TFTP boot file attribute which is used with the built-in DHCP server to fill the corresponding fields of DHCP leases.

Returns:
String

setTFTPBootFile

public void setTFTPBootFile(java.lang.String value)
TFTP boot file attribute which is used with the built-in DHCP server to fill the corresponding fields of DHCP leases.

Parameters:
value - String

getTFTPNextServer

public java.lang.String getTFTPNextServer()
TFTP server attribute which is used with the built-in DHCP server to fill the corresponding fields of DHCP leases. NOTE: The preferred form is IPv4 addresses.

Returns:
String

setTFTPNextServer

public void setTFTPNextServer(java.lang.String value)
TFTP server attribute which is used with the built-in DHCP server to fill the corresponding fields of DHCP leases. NOTE: The preferred form is IPv4 addresses.

Parameters:
value - String

getAliasMode

public java.lang.Long getAliasMode()
Returns:
Long

setAliasMode

public void setAliasMode(java.lang.Long value)
Parameters:
value - Long

getDNSPassDomain

public java.lang.Boolean getDNSPassDomain()
Whether the DHCP server should pass the DNS domain used by the host.

Returns:
Boolean

setDNSPassDomain

public void setDNSPassDomain(java.lang.Boolean value)
Whether the DHCP server should pass the DNS domain used by the host.

Parameters:
value - Boolean

getDNSProxy

public java.lang.Boolean getDNSProxy()
Whether the DHCP server (and the DNS traffic by NAT) should pass the address of the DNS proxy and process traffic using DNS servers registered on the host.

Returns:
Boolean

setDNSProxy

public void setDNSProxy(java.lang.Boolean value)
Whether the DHCP server (and the DNS traffic by NAT) should pass the address of the DNS proxy and process traffic using DNS servers registered on the host.

Parameters:
value - Boolean

getDNSUseHostResolver

public java.lang.Boolean getDNSUseHostResolver()
Whether the DHCP server (and the DNS traffic by NAT) should pass the address of the DNS proxy and process traffic using the host resolver mechanism.

Returns:
Boolean

setDNSUseHostResolver

public void setDNSUseHostResolver(java.lang.Boolean value)
Whether the DHCP server (and the DNS traffic by NAT) should pass the address of the DNS proxy and process traffic using the host resolver mechanism.

Parameters:
value - Boolean

getRedirects

public java.util.List<java.lang.String> getRedirects()
Array of NAT port-forwarding rules in string representation, in the following format: "name,protocol id,host ip,host port,guest ip,guest port".

Returns:
List<String>

queryInterface

public static INATEngine queryInterface(IUnknown obj)

setNetworkSettings

public void setNetworkSettings(java.lang.Long mtu,
                               java.lang.Long sockSnd,
                               java.lang.Long sockRcv,
                               java.lang.Long TcpWndSnd,
                               java.lang.Long TcpWndRcv)
Sets network configuration of the NAT engine.

Parameters:
mtu - MTU (maximum transmission unit) of the NAT engine in bytes.
sockSnd - Capacity of the socket send buffer in bytes when creating a new socket.
sockRcv - Capacity of the socket receive buffer in bytes when creating a new socket.
TcpWndSnd - Initial size of the NAT engine's sending TCP window in bytes when establishing a new TCP connection.
TcpWndRcv - Initial size of the NAT engine's receiving TCP window in bytes when establishing a new TCP connection.

getNetworkSettings

public void getNetworkSettings(Holder<java.lang.Long> mtu,
                               Holder<java.lang.Long> sockSnd,
                               Holder<java.lang.Long> sockRcv,
                               Holder<java.lang.Long> TcpWndSnd,
                               Holder<java.lang.Long> TcpWndRcv)
Returns network configuration of NAT engine. SeesetNetworkSettings(Long,Long,Long,Long,Long)for parameter descriptions.


addRedirect

public void addRedirect(java.lang.String name,
                        NATProtocol proto,
                        java.lang.String hostIP,
                        java.lang.Integer hostPort,
                        java.lang.String guestIP,
                        java.lang.Integer guestPort)
Adds a new NAT port-forwarding rule.

Parameters:
name - The name of the rule. An empty name is acceptable, in which case the NAT engine auto-generates one using the other parameters.
proto - Protocol handled with the rule.
hostIP - IP of the host interface to which the rule should apply. An empty ip address is acceptable, in which case the NAT engine binds the handling socket to any interface.
hostPort - The port number to listen on.
guestIP - The IP address of the guest which the NAT engine will forward matching packets to. An empty IP address is acceptable, in which case the NAT engine will forward packets to the first DHCP lease (x.x.x.15).
guestPort - The port number to forward.

removeRedirect

public void removeRedirect(java.lang.String name)
Removes a port-forwarding rule that was previously registered.

Parameters:
name - The name of the rule to delete.