nf_srv_getDestinationAddress

Returns the destination address for TCP connections and UDP sockets by source address.
NF_STATUS nf_srv_getDestinationAddress(PNF_ADDRESS srcAddress, PNF_ADDRESS dstAddress, char protocol, unsigned __int64 payloadHash)

Parameters

srcAddress
Pointer to source address in NF_ADDRESS structure for searching in NAT table
dstAddress
Pointer to destination address in NF_ADDRESS structure
protocol
IPPROTO_TCP or IPPROTO_UDP
payloadHash
UDP data hash for identifying the first received datagram from some endpoint. Not used for TCP.

Return Values

NF_STATUS_SUCCESS on success, or other NF_STATUS error code on fail.

Remarks

For TCP protocol it is necessary to specify the source address in srcAddress field, IPPROTO_TCP in protocol. The matching destination address will be returned in dstAddress.

For UDP protocol it is necessary to specify both source and destination addresses in srcAddress and dstAddress fields, IPPROTO_UDP in protocol. The matching destination address will be returned in dstAddress.

Requirements

Header nfsrvapi.h
Library nfsrvapi.lib