-
Notifications
You must be signed in to change notification settings - Fork 99
Mapping 2.0
Represents a port forwarding entry in the NAT translation table.
Initializes a new instance of the class.
Name | Description |
---|---|
protocol: | The protocol. |
privateIP: | The private ip. |
privatePort: | The private port. |
publicPort: | The public port. |
lifetime: | The lifetime. |
description: | The description. |
Initializes a new instance of the class.
Name | Description |
---|---|
protocol: | The protocol. |
privatePort: | The private port. |
publicPort: | The public port. |
This constructor initializes a Permanent mapping. The description by deafult is "Open.NAT"
Initializes a new instance of the class.
Name | Description |
---|---|
protocol: | The protocol. |
privatePort: | The private port. |
publicPort: | The public port. |
description: | The description. |
This constructor initializes a Permanent mapping.
Initializes a new instance of the class.
Name | Description |
---|---|
protocol: | The protocol. |
privatePort: | The private port. |
publicPort: | The public port. |
lifetime: | The lifetime. |
description: | The description. |
Determines whether this instance is expired.
Permanent mappings never expires.
Returns a that represents this instance.
Returns: A that represents this instance.
Gets the mapping's description. It is the value stored in the NewPortMappingDescription parameter. The NewPortMappingDescription parameter is a human readable string that describes the connection. It is used in sorme web interfaces of routers so the user can see which program is using what port.
Gets the private ip.
Gets the protocol.
The PrivatePort parameter specifies the port on a client machine to which all traffic coming in on PublicPort for the protocol specified by Protocol should be forwarded to.
Gets the public ip.
Gets the external (visible) port number. It is the value stored in the NewExternalPort parameter . The NewExternalPort parameter is used to specify the TCP or UDP port on the WAN side of the router which should be forwarded.
Gets the lifetime. The Lifetime parameter tells the router how long the portmapping should be active. Since most programs don't know this in advance, it is often set to 0, which means 'unlimited' or 'permanent'.
All portmappings are release automatically as part of the shutdown process when NatUtility.ReleaseOnShutdown is true. Permanent portmappings will not be released if the process ends anormally. Since most programs don't know the lifetime in advance, Open.NAT renew all the portmappings (except the permanents) before they expires. So, developers have to close explicitly those portmappings they don't want to remain open for the session.
Gets the expiration. The property value is calculated using Lifetime property.