|
VirtualBox Main API
|
Public Member Functions | |
| void | addLocalMapping (in wstring hostid, in long offset) |
| void | addPortForwardRule (in boolean isIpv6, in wstring ruleName, in NATProtocol proto, in wstring hostIP, in unsigned short hostPort, in wstring guestIP, in unsigned short guestPort) |
| void | removePortForwardRule (in boolean isIpv6, in wstring ruleName) |
| void | start () |
| void | stop () |
Public Attributes | |
| attribute wstring | networkName |
| 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. | |
| attribute boolean | enabled |
| attribute wstring | network |
| This is CIDR IPv4 string. | |
| readonly attribute wstring | gateway |
| This attribute is read-only. | |
| attribute boolean | IPv6Enabled |
| This attribute define whether gateway will support IPv6 or not. | |
| attribute wstring | IPv6Prefix |
| This a CIDR IPv6 defining prefix for link-local addresses autoconfiguration within network. | |
| attribute boolean | advertiseDefaultIPv6RouteEnabled |
| attribute boolean | needDhcpServer |
| readonly attribute IEventSource | eventSource |
| readonly attribute wstring[] | portForwardRules4 |
| Array of NAT port-forwarding rules in string representation, in the following format: "name:protocolid:[host ip]:host port:[guest ip]:guest port". | |
| readonly attribute wstring[] | localMappings |
| Array of mappings (address,offset),e.g. | |
| attribute long | loopbackIp6 |
| Offset in ipv6 network from network id for address mapped into loopback6 interface of the host. | |
| readonly attribute wstring[] | portForwardRules6 |
| Array of NAT port-forwarding rules in string representation, in the following format: "name:protocolid:[host ip]:host port:[guest ip]:guest port". | |
| void INATNetwork::addLocalMapping | ( | in wstring | hostid, |
| in long | offset | ||
| ) |
| void INATNetwork::addPortForwardRule | ( | in boolean | isIpv6, |
| in wstring | ruleName, | ||
| in NATProtocol | proto, | ||
| in wstring | hostIP, | ||
| in unsigned short | hostPort, | ||
| in wstring | guestIP, | ||
| in unsigned short | guestPort | ||
| ) |
| void INATNetwork::removePortForwardRule | ( | in boolean | isIpv6, |
| in wstring | ruleName | ||
| ) |
| void INATNetwork::start | ( | ) |
| void INATNetwork::stop | ( | ) |
| attribute wstring INATNetwork::networkName |
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.
| attribute boolean INATNetwork::enabled |
| attribute wstring INATNetwork::network |
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).
| readonly attribute wstring INATNetwork::gateway |
This attribute is read-only.
It's recalculated on changing network attribute (low address of network + 1).
| attribute boolean INATNetwork::IPv6Enabled |
This attribute define whether gateway will support IPv6 or not.
| attribute wstring INATNetwork::IPv6Prefix |
This a CIDR IPv6 defining prefix for link-local addresses autoconfiguration within network.
Note: ignored if attribute IPv6Enabled is false.
| attribute boolean INATNetwork::advertiseDefaultIPv6RouteEnabled |
| attribute boolean INATNetwork::needDhcpServer |
| readonly attribute IEventSource INATNetwork::eventSource |
| readonly attribute wstring [] INATNetwork::portForwardRules4 |
Array of NAT port-forwarding rules in string representation, in the following format: "name:protocolid:[host ip]:host port:[guest ip]:guest port".
| readonly attribute wstring [] INATNetwork::localMappings |
Array of mappings (address,offset),e.g.
("127.0.1.1=4") maps 127.0.1.1 to networkid + 4.
| attribute long INATNetwork::loopbackIp6 |
Offset in ipv6 network from network id for address mapped into loopback6 interface of the host.
| readonly attribute wstring [] INATNetwork::portForwardRules6 |
Array of NAT port-forwarding rules in string representation, in the following format: "name:protocolid:[host ip]:host port:[guest ip]:guest port".