tfNatConfigInnerTcpServer

Jump to: navigation, search
Table of Contents >> Optional Protocols >> NAT


#include <trsocket.h>


int tfNatConfigInnerTcpServer (
ttUserInterface interfaceHandle,
ttUserIpAddress ipPublic,
ttUserIpAddress ipPrivate,
ttUserIpPort portPublic,
ttUserIpPort portPrivate
);


Function Description

This function configures a server on the private network for access via a specific TCP port on the public network. The public world will know the server as ipPublic:portPublic. On the private network, the server will be implemented as ipPrivate:portPrivate.

The user may call this function as many times as desired. Be sure not to assign any conflicting public or private IP/port/protocol triads.


Parameters

  • interfaceHandle
    The interface handle of the public NAT device on which to configure the public TCP port on.
  • ipPublic
    The server's public identity in network byte order.
  • ipPrivate
    The server's private identity in network byte order.
  • portPublic
    The server's public implementation in host byte order.
  • portPublic
    The server's private implementation in host byte order.


Returns

  • TM_ENOERROR
    Success.
  • TM_EINVAL
    One of the following:
  • There is IP/port/protocol conflict.
  • Either the public or private port is 21 (the FTP server port). The user should call tfNatConfigInnerFtpServer().
  • TM_ENOMEM
    Insufficient memory to complete the operation, or too many triggers already added.


Table of Contents >> Optional Protocols >> NAT