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:
To obtain a list of the handles containing information about existing port forwarding entries, use the PrlVirtNet_GetPortForwardList function. To create a new port forwarding entry, use PrlPortFwd_Create to create a new handle. Use the functions describes in this section to define or modify the port forwarding entry properties and then use the PrlVirtNet_SetPortForwardList function to save it.
|
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.
|