#
# For a description of the syntax of this configuration file,
# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
#

menu "Socket support"

config NET_SOCKET
	bool
	default y

if NET_SOCKET

config NSOCKET_DESCRIPTORS
	int "Number of socket descriptor"
	default 8
	---help---
		Maximum number of socket descriptors per task/thread.

config NET_TCP_KEEPALIVE
	bool "TCP keepalive"
	default y
	---help---
		Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT options processing.
		Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set in seconds.
		(does not require sockets.c, and will affect tcp.c)

config NET_RAW
	bool "Raw socket support"
	default y

config NET_SOCKET_OPTION_BROADCAST
	bool "Support SO_BROADCAST Option"
	default n
	---help---
		Enable SO_BROADCAST option support.

config NET_RANDOMIZE_INITIAL_LOCAL_PORTS
	bool "Randomize the initial local port for TCP/UDP"
	default n
	---help---
		Randomize the local port for the first local TCP/UDP pcb (default==0).
		This can prevent creating predictable port numbers after booting a device.

config NET_SO_SNDTIMEO
	bool "Enable send timeout socket option"
	default n
	---help---
		Enable send timeout for sockets/netconns and SO_SNDTIMEO processing.

config NET_SO_RCVTIMEO
	bool "Enable receive timeout socket option"
	default y
	---help---
		Enable receive timeout for sockets/netconns and SO_RCVTIMEO processing.

config NET_SO_RCVBUF
	bool "Enable SO_RCVBUF socket option"
	default n
	---help---
		Enable SO_RCVBUF processing.

config NET_SO_REUSE
	bool "Enable SO_REUSE socket option"
	default y
	---help---
		Enable SO_REUSEADDR option.

if NET_SO_REUSE

config NET_SO_REUSE_RXTOALL
	bool "Enable RX to All"
	default n
	---help---
		Pass a copy of incoming broadcast/multicast packets to all local matches
		if SO_REUSEADDR is turned on.
		WARNING: Adds a memcpy for every packet if passing to more than one pcb!

endif #NET_SO_REUSE

endif #NET_SOCKET

endmenu #Socket support
