Download Treck TCP/IP User Manual

Transcript
Treck Real-Time TCP/IP User’s Manual
tfNatConfigInnerTcpServer
#include <trsocket.h>
int
(
ttUserInterface
ttUserIpAddress
ttUserIpAddress
ttUserIpPort
ttUserIpPort
);
tfNatConfigInnerTcpServer
interfaceHandle,
ipPublic,
ipPrivate,
portPublic,
portPrivate
Function Description
Configure 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 at
ipPrivate:portPrivate.
Call this function as many times as you like, being sure not to assign conflicting
public or private ip/port/protocol triads.
Parameters
Parameter
interfaceHandle
ipPublic
ipPrivate
portPublic
portprivate
Returns
Value
TM_ENOMEM
TM_ENOERROR
TM_EINVAL
7.66
© 2004 Treck Incorporated
Description
Interface handle of the public NAT
device to configure public a TCP
port on.
The server's public identity,
network byte order
The server’s private identity,
network byte order.
The server’s pubic implementation,
host byte order.
The server's private implementation, host byte order
Meaning
Insufficient memory or too many
triggers already
Newly allocated trigger, ip's and
ports initialized
Erroneous use, for details enable
TM_NAT_TRACE