nf_srv_setTimeout

Specifies a timeout value for the specified activity.
NF_STATUS nf_srv_setTimeout(NF_SRV_TIMEOUT_TYPE type, unsigned int value)

Parameters

type
Timeout type:
NSTT_NAT_TCP - timeout for TCP NAT entries. Default value is 2 hours.
NSTT_NAT_TCP_SYN - timeout for TCP NAT entries with SYN_SENT state, which means that the connection is not yet established. Default value is 20 seconds.
NSTT_NAT_TCP_CLOSE - timeout for TCP NAT entries in CLOSED state. Default value is 20 seconds.
NSTT_NAT_UDP - timeout for UDP NAT entries. Default value is 20 seconds.
value
Timeout value in seconds. It is possible to specify zero value to disable timeout.

Return Values

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

Remarks

The driver deletes inactive TCP and UDP NAT entries after exceeding the specified timeouts.

Requirements

Header nfsrvapi.h
Library nfsrvapi.lib