tfNatConfigStatic

Jump to: navigation, search

Table of Contents >> Optional Protocols >> NAT


#include <trsocket.h>


int tfNatConfigStatic (
ttUserInterface interfaceHandle,
ttUserIpAddress ipPublic,
ttUserIpAddress ipPrivate
);


Function Description

This function permanently associates a public IP with a private IP. The user is allowed to configure as many static associations as they wish on a public NAT interface, being sure to avoid conflicts of course (different public IP's) with other static IP configurations. Inner server configurations on the same public IP should come later or the static configuration would hide them. Dynamic IP configurations should never use the same IP address.


Parameters

  • interfaceHandle
    The interface handle of the public NAT device on which to create a static association.
  • ipPublic
    The public IP address in network byte order.
  • ipPrivate
    The private IP address in network byte order.


Returns

  • TM_ENOERROR
    Success.
  • TM_EINVAL
    There is IP/port/protocol conflict. For more information, please enable TM_ERROR_CHECKING.
  • TM_ENOMEM
    Insufficient memory to complete the operation, or too many triggers already added.


Table of Contents >> Optional Protocols >> NAT