org.virtualbox_7_2
Class INATNetwork

java.lang.Object
  extended by org.virtualbox_7_2.IUnknown
      extended by org.virtualbox_7_2.INATNetwork

public class INATNetwork
extends IUnknown


Field Summary
 
Fields inherited from class org.virtualbox_7_2.IUnknown
obj, objMgr, port
 
Constructor Summary
INATNetwork(java.lang.String wrapped, org.virtualbox_7_2.ObjectRefManager objMgr, org.virtualbox_7_2.jaxws.VboxPortType port)
           
 
Method Summary
 void addLocalMapping(java.lang.String hostid, java.lang.Integer offset)
           
 void addPortForwardRule(java.lang.Boolean isIpv6, java.lang.String ruleName, NATProtocol proto, java.lang.String hostIP, java.lang.Integer hostPort, java.lang.String guestIP, java.lang.Integer guestPort)
           
 java.lang.Boolean getAdvertiseDefaultIPv6RouteEnabled()
           
 java.lang.Boolean getEnabled()
           
 IEventSource getEventSource()
           
 java.lang.Boolean getForwardBroadcast()
          Forwards broadcast packets sent by the guest to the host machine as such.
 java.lang.String getGateway()
          This attribute is read-only.
 java.lang.Boolean getIPv6Enabled()
          This attribute define whether gateway will support IPv6 or not.
 java.lang.String getIPv6Prefix()
          This a CIDR IPv6 defining prefix for link-local addresses autoconfiguration within network.
 java.lang.Boolean getLocalhostReachable()
          Whether traffic from the guest directed to 10.0.2.2 will reach the host's loopback interface, i.e.
 java.util.List<java.lang.String> getLocalMappings()
          Array of mappings (address,offset),e.g.
 java.lang.Integer getLoopbackIp6()
          Offset in ipv6 network from network id for address mapped into loopback6 interface of the host.
 java.lang.Long getNatMRU()
          MRU (maximum receive unit) of the NAT engine in bytes.
 java.lang.Long getNatMTU()
          MTU (maximum transmission unit) of the NAT engine in bytes.
 java.lang.Boolean getNeedDhcpServer()
           
 java.lang.String getNetwork()
          This is CIDR IPv4 string.
 java.lang.String getNetworkName()
          TBD: the idea, technically we can start any number of the NAT networks, but we should expect that at some point we will get collisions because of port-forwanding rules.
 java.util.List<java.lang.String> getPortForwardRules4()
          Array of NAT port-forwarding rules in string representation, in the following format: "name:protocolid:[host ip]:host port:[guest ip]:guest port".
 java.util.List<java.lang.String> getPortForwardRules6()
          Array of NAT port-forwarding rules in string representation, in the following format: "name:protocolid:[host ip]:host port:[guest ip]:guest port".
static INATNetwork queryInterface(IUnknown obj)
           
 void removePortForwardRule(java.lang.Boolean isIpv6, java.lang.String ruleName)
           
 void setAdvertiseDefaultIPv6RouteEnabled(java.lang.Boolean value)
           
 void setEnabled(java.lang.Boolean value)
           
 void setForwardBroadcast(java.lang.Boolean value)
          Forwards broadcast packets sent by the guest to the host machine as such.
 void setIPv6Enabled(java.lang.Boolean value)
          This attribute define whether gateway will support IPv6 or not.
 void setIPv6Prefix(java.lang.String value)
          This a CIDR IPv6 defining prefix for link-local addresses autoconfiguration within network.
 void setLocalhostReachable(java.lang.Boolean value)
          Whether traffic from the guest directed to 10.0.2.2 will reach the host's loopback interface, i.e.
 void setLoopbackIp6(java.lang.Integer value)
          Offset in ipv6 network from network id for address mapped into loopback6 interface of the host.
 void setNatMRU(java.lang.Long value)
          MRU (maximum receive unit) of the NAT engine in bytes.
 void setNatMTU(java.lang.Long value)
          MTU (maximum transmission unit) of the NAT engine in bytes.
 void setNeedDhcpServer(java.lang.Boolean value)
           
 void setNetwork(java.lang.String value)
          This is CIDR IPv4 string.
 void setNetworkName(java.lang.String value)
          TBD: the idea, technically we can start any number of the NAT networks, but we should expect that at some point we will get collisions because of port-forwanding rules.
 void start()
           
 void stop()
           
 
Methods inherited from class org.virtualbox_7_2.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

INATNetwork

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

getNetworkName

public java.lang.String getNetworkName()
TBD: the idea, technically we can start any number of the NAT networks, but we should expect that at some point we will get collisions because of port-forwanding rules. so perhaps we should support only single instance of NAT network.

Returns:
String

setNetworkName

public void setNetworkName(java.lang.String value)
TBD: the idea, technically we can start any number of the NAT networks, but we should expect that at some point we will get collisions because of port-forwanding rules. so perhaps we should support only single instance of NAT network.

Parameters:
value - String

getEnabled

public java.lang.Boolean getEnabled()

setEnabled

public void setEnabled(java.lang.Boolean value)

getNetwork

public java.lang.String getNetwork()
This is CIDR IPv4 string. Specifying it user defines IPv4 addresses of gateway (low address + 1) and DHCP server (= low address + 2). Note: If there are defined IPv4 port-forward rules update of network will be ignored (because new assignment could break existing rules).

Returns:
String

setNetwork

public void setNetwork(java.lang.String value)
This is CIDR IPv4 string. Specifying it user defines IPv4 addresses of gateway (low address + 1) and DHCP server (= low address + 2). Note: If there are defined IPv4 port-forward rules update of network will be ignored (because new assignment could break existing rules).

Parameters:
value - String

getGateway

public java.lang.String getGateway()
This attribute is read-only. It's recalculated on changing network attribute (low address of network + 1).

Returns:
String

getIPv6Enabled

public java.lang.Boolean getIPv6Enabled()
This attribute define whether gateway will support IPv6 or not.

Returns:
Boolean

setIPv6Enabled

public void setIPv6Enabled(java.lang.Boolean value)
This attribute define whether gateway will support IPv6 or not.

Parameters:
value - Boolean

getIPv6Prefix

public java.lang.String getIPv6Prefix()
This a CIDR IPv6 defining prefix for link-local addresses autoconfiguration within network. Note: ignored if attribute IPv6Enabled is false.

Returns:
String

setIPv6Prefix

public void setIPv6Prefix(java.lang.String value)
This a CIDR IPv6 defining prefix for link-local addresses autoconfiguration within network. Note: ignored if attribute IPv6Enabled is false.

Parameters:
value - String

getAdvertiseDefaultIPv6RouteEnabled

public java.lang.Boolean getAdvertiseDefaultIPv6RouteEnabled()

setAdvertiseDefaultIPv6RouteEnabled

public void setAdvertiseDefaultIPv6RouteEnabled(java.lang.Boolean value)

getNeedDhcpServer

public java.lang.Boolean getNeedDhcpServer()

setNeedDhcpServer

public void setNeedDhcpServer(java.lang.Boolean value)

getEventSource

public IEventSource getEventSource()

getPortForwardRules4

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

Returns:
List<String>

getLocalMappings

public java.util.List<java.lang.String> getLocalMappings()
Array of mappings (address,offset),e.g. ("127.0.1.1=4") maps 127.0.1.1 to networkid + 4.

Returns:
List<String>

getLocalhostReachable

public java.lang.Boolean getLocalhostReachable()
Whether traffic from the guest directed to 10.0.2.2 will reach the host's loopback interface, i.e. localhost or 127.0.0.1.

Returns:
Boolean

setLocalhostReachable

public void setLocalhostReachable(java.lang.Boolean value)
Whether traffic from the guest directed to 10.0.2.2 will reach the host's loopback interface, i.e. localhost or 127.0.0.1.

Parameters:
value - Boolean

getForwardBroadcast

public java.lang.Boolean getForwardBroadcast()
Forwards broadcast packets sent by the guest to the host machine as such. IP address will show to host as 255.255.255.255.

Returns:
Boolean

setForwardBroadcast

public void setForwardBroadcast(java.lang.Boolean value)
Forwards broadcast packets sent by the guest to the host machine as such. IP address will show to host as 255.255.255.255.

Parameters:
value - Boolean

getNatMTU

public java.lang.Long getNatMTU()
MTU (maximum transmission unit) of the NAT engine in bytes.

Returns:
Long

setNatMTU

public void setNatMTU(java.lang.Long value)
MTU (maximum transmission unit) of the NAT engine in bytes.

Parameters:
value - Long

getNatMRU

public java.lang.Long getNatMRU()
MRU (maximum receive unit) of the NAT engine in bytes.

Returns:
Long

setNatMRU

public void setNatMRU(java.lang.Long value)
MRU (maximum receive unit) of the NAT engine in bytes.

Parameters:
value - Long

getLoopbackIp6

public java.lang.Integer getLoopbackIp6()
Offset in ipv6 network from network id for address mapped into loopback6 interface of the host.

Returns:
Integer

setLoopbackIp6

public void setLoopbackIp6(java.lang.Integer value)
Offset in ipv6 network from network id for address mapped into loopback6 interface of the host.

Parameters:
value - Integer

getPortForwardRules6

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

Returns:
List<String>

queryInterface

public static INATNetwork queryInterface(IUnknown obj)

addLocalMapping

public void addLocalMapping(java.lang.String hostid,
                            java.lang.Integer offset)

addPortForwardRule

public void addPortForwardRule(java.lang.Boolean isIpv6,
                               java.lang.String ruleName,
                               NATProtocol proto,
                               java.lang.String hostIP,
                               java.lang.Integer hostPort,
                               java.lang.String guestIP,
                               java.lang.Integer guestPort)

removePortForwardRule

public void removePortForwardRule(java.lang.Boolean isIpv6,
                                  java.lang.String ruleName)

start

public void start()

stop

public void stop()