CreateTicket (Windows Embedded CE 6.0)
1/6/2010
This function creates a port mapping for an inbound session.
Syntax
NTSTATUS CreateTicket(
PVOID InterfaceHandle,
UCHAR Protocol,
ULONG PrivateAddress,
USHORT PrivatePort,
ULONG RemoteAddress,
USHORT RemotePort,
PULONG PublicAddress,
PUSHORT PublicPort
)
Parameters
- InterfaceHandle
[in] Handle to an interface.
Protocol
[in] Unsigned character that specifies the protocol field of the IP header. It is one of the values in the following table.Value Description NAT_PROTOCOL_TCP
Specifies the TCP protocol.
NAT_PROTOCOL_UDP
Specifies the UDP protocol.
- PrivateAddress
[in] Unsigned long integer that specifies the private IP address to which PublicAddress and PublicPort should translate.
- PrivatePort
[in] Unsigned short integer that specifies the private port to which PublicAddress and PublicPort should translate.
- RemoteAddress
[in] Unsigned long integer that specifies an address for which to create a mapping. This parameter is optional, and if a value for this parameter is specified, the function creates a mapping only on sessions from this address.
- RemotePort
[in] Unsigned short integer that specifies a port for which to create a mapping. This parameter is optional, and if a value for this parameter is specified, the function creates a mapping only on sessions from this port.
- PublicAddress
[out] Pointer to an unsigned long integer that receives the public address that is used in the mapping.
- PublicPort
[out] Pointer to an unsigned short integer that receives the port that is used in the mapping.
Return Value
STATUS_SUCCESS indicates success. A non-zero value indicates failure.
Requirements
Header | natedit.h |
Library | coredll.dll |
Windows Embedded CE | Windows CE 3.0 and later |