mnAddPortMap

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.

Parameters

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.

Returns (Long Long Integer)

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

Present in

DBP

C++

.Net




This page is in the following sections:
(1) Universal Plug and Play
(0) DarkNet Help