2022-10-17 15:13:34 +08:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
|
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
|
|
#
|
|
|
|
|
|
|
|
config NET_NAT
|
|
|
|
bool "Network Address Translation (NAT)"
|
|
|
|
default n
|
2022-11-15 17:49:43 +08:00
|
|
|
depends on NET_IPFORWARD && IOB_BUFSIZE >= 68
|
2022-10-17 15:13:34 +08:00
|
|
|
---help---
|
|
|
|
Enable or disable Network Address Translation (NAT) function.
|
2022-11-01 18:13:50 +08:00
|
|
|
|
2022-11-15 17:49:43 +08:00
|
|
|
Note: When forwarding IPv4 packet and applying NAT, NAT may be
|
|
|
|
applied directly on a single I/O buffer containing L3 packet header,
|
|
|
|
and NAT may need a continuous buffer of at least 68 Bytes
|
|
|
|
(IPv4 20B + ICMP 8B + IPv4 20B + TCP 20B).
|
|
|
|
|
2022-11-01 18:13:50 +08:00
|
|
|
config NET_NAT_TCP_EXPIRE_SEC
|
|
|
|
int "TCP NAT entry expiration seconds"
|
|
|
|
default 86400
|
|
|
|
depends on NET_NAT
|
|
|
|
---help---
|
|
|
|
The expiration time for idle TCP entry in NAT.
|
|
|
|
|
|
|
|
Note: The default value 86400 is suggested by RFC2663, Section 2.6,
|
|
|
|
Page 5.
|
2022-10-31 11:33:06 +08:00
|
|
|
|
2022-11-03 14:26:21 +08:00
|
|
|
config NET_NAT_UDP_EXPIRE_SEC
|
|
|
|
int "UDP NAT entry expiration seconds"
|
|
|
|
default 240
|
|
|
|
depends on NET_NAT
|
|
|
|
---help---
|
|
|
|
The expiration time for idle UDP entry in NAT.
|
|
|
|
|
|
|
|
Note: RFC2663 (Section 2.6, Page 5) suggests that non-TCP sessions
|
|
|
|
that have not been used for a couple of minutes can be assumed to be
|
|
|
|
terminated.
|
|
|
|
|
2022-10-31 11:33:06 +08:00
|
|
|
config NET_NAT_ICMP_EXPIRE_SEC
|
|
|
|
int "ICMP NAT entry expiration seconds"
|
|
|
|
default 60
|
|
|
|
depends on NET_NAT
|
|
|
|
---help---
|
|
|
|
The expiration time for idle ICMP entry in NAT.
|
|
|
|
|
|
|
|
Note: The default value 60 is suggested by RFC5508, Section 3.2,
|
|
|
|
Page 8.
|