This creates a new port map and adds
it to the end of the port map list; you do not need to use mnUpdateNAT
for the new port map to appear in the list.
mnStartNAT must be used before this command.
Errors may occur if the router does not like the specified parameters e.g. the Internal IP may be invalid, or if the external port is already in use.
char * Protocol: new port map’s protocol. This should normally
be either TCP or UDP.
long ExternalPort: new port map’s external port.
long InternalPort: new port map’s internal port.
char * InternalIP: new port map’s InternalIP.
bool Enabled: specified whether the new port map should be
enabled or disabled. Whilst disabled the port map is inactive and does
nothing.
bool Block: If set to true the command will block until the operation has completed.
When blocking:
0 if no error occurred
-1 if an error occurred
When not blocking:
Any number; this is the action to be used with mnPollUPNP
-1 if an error occurred
DBP
C++
.Net