tfNatConfigInnerUdpServer

Jump to: navigation, search

Table of Contents >> Optional Protocols >> NAT


#include <trsocket.h>


int tfNatConfigInnerUdpServer (
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 UDP 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 UDP 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
    There is IP/port/protocol conflict.
  • TM_ENOMEM
    Insufficient memory to complete the operation, or too many triggers already added.


Table of Contents >> Optional Protocols >> NAT