Virtuozzo Virtualization SDK C API Reference
|
The PHT_PORT_FORWARDING handle provides access to the Port Forwarding functionality. Using this functionality, you can redirect all incoming data from a specific TCP or UDP port in the host machine to the specified port in a virtual machine.
Port forwarding is used when you have a virtual machine communicating with the outside world using shared networking and would like other computers to be able to access certain services running in it (e.g. HTTP server, FTP server, or any other service listening for client requests on a particular port). In order to do so, you have to tell the host machine to forward all data that it receives on a certain port to the appropriate port in the virtual machine. This is accomplished by creating a port forwarding entry using the PHT_PORT_FORWARDING handle. A port forwarding entry has the following properties:
|
Name |
Description |
|
Creates a new handle of type PHT_PORT_FORWARDING. | |
|
Returns the incoming port. | |
|
Returns the redirect IP address of the specified port forward entry. | |
|
Returns the redirect port. | |
|
Returns the redirect virtual machine identifier of the specified port forward entry. | |
|
Returns the rule name of the specified port forward entry. | |
|
Sets the specified incoming port. | |
|
Sets the specified port forwardi entry redirect IP address. | |
|
Sets the specified redirect port. | |
|
Sets the specified port forward entry virtual machine identifier. | |
|
Sets the specified port forward entry rule name. |