net: modify network Kconfig entries for socket
authorSangsoon Lim <ssoon.lim@samsung.com>
Tue, 11 Apr 2017 04:33:39 +0000 (13:33 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Tue, 18 Apr 2017 03:02:17 +0000 (12:02 +0900)
Configuration sync with Tizen RT spin git for socket and tcp.

Change-Id: Iebfaf0d290e3dbb253d41c978a308469ee889092

build/configs/artik053/nettest/defconfig
build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig
os/include/net/lwip/lwipopts.h
os/include/sys/select.h
os/include/sys/socket.h
os/net/Kconfig
os/net/lwip/configs/Kconfig
os/net/lwip/configs/socket/Kconfig [new file with mode: 0644]
os/net/lwip/configs/tcp/Kconfig [new file with mode: 0644]
os/net/socket/Make.defs

index 9024661..0366000 100644 (file)
@@ -647,14 +647,14 @@ CONFIG_NET_LWIP_MEMP_NUM_TCP_SEG=80
 CONFIG_NET_LWIP_MEMP_NUM_REASSDATA=5
 CONFIG_NET_LWIP_MEMP_NUM_FRAG_PBUF=15
 CONFIG_NET_LWIP_MEMP_NUM_ARP_QUEUE=30
-CONFIG_NET_LWIP_SOCKET=y
-CONFIG_NET_LWIP_RAW=y
-# CONFIG_NET_LWIP_SOCKET_OPTION_BROADCAST is not set
-# CONFIG_NET_LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS is not set
-# CONFIG_NET_LWIP_SOCKET_SENDTIMEOUT is not set
-CONFIG_NET_LWIP_SOCKET_RECVTIMEOUT=y
-# CONFIG_NET_LWIP_SOCKET_RCVBUF is not set
-CONFIG_NET_LWIP_SOCKET_REUSE=y
+CONFIG_NET_SOCKET=y
+CONFIG_NET_RAW=y
+# CONFIG_NET_SOCKET_OPTION_BROADCAST is not set
+# CONFIG_NET_RANDOMIZE_INITIAL_LOCAL_PORTS is not set
+# CONFIG_NET_SO_SNDTIMEO is not set
+CONFIG_NET_SO_RCVTIMEO=y
+# CONFIG_NET_SO_RCVBUF is not set
+CONFIG_NET_SO_REUSE=y
 CONFIG_NET_LWIP_ICMP=y
 # CONFIG_NET_LWIP_ICMP_BROADCAST_PING is not set
 # CONFIG_NET_LWIP_ICMP_MULTICAST_PING is not set
@@ -662,16 +662,16 @@ CONFIG_NET_LWIP_IGMP=y
 CONFIG_NET_LWIP_MEMP_NUM_IGMP_GROUP=8
 CONFIG_NET_LWIP_UDP=y
 # CONFIG_NET_LWIP_UDPLITE is not set
-CONFIG_NET_LWIP_TCP=y
-CONFIG_NET_LWIP_TCP_KEEPALIVE=y
-CONFIG_NET_LWIP_TCP_WINDOW_SIZE=58400
-CONFIG_NET_LWIP_TCP_MAX_RETRANS=12
-CONFIG_NET_LWIP_TCP_SYN_MAX_RETRANS=6
-CONFIG_NET_LWIP_TCP_QUEUE_OOSEQ=y
-CONFIG_NET_LWIP_TCP_MSS=1460
-CONFIG_NET_LWIP_TCP_SEND_BUF=29200
-# CONFIG_NET_LWIP_TCP_TIMESTAMPS is not set
-# CONFIG_NET_LWIP_TCP_LISTEN_BACKLOG is not set
+CONFIG_NET_TCP=y
+CONFIG_NET_TCP_KEEPALIVE=y
+CONFIG_NET_TCP_WND=58400
+CONFIG_NET_TCP_MAXRTX=12
+CONFIG_NET_TCP_SYNMAXRTX=6
+CONFIG_NET_TCP_QUEUE_OOSEQ=y
+CONFIG_NET_TCP_MSS=1460
+CONFIG_NET_TCP_SND_BUF=29200
+# CONFIG_NET_TCP_TIMESTAMPS is not set
+# CONFIG_NET_TCP_LISTEN_BACKLOG is not set
 CONFIG_NET_ARP=y
 CONFIG_NET_ARP_TABLESIZE=10
 CONFIG_NET_ARP_QUEUEING=y
@@ -718,7 +718,7 @@ CONFIG_NET_LWIP_STATS_UDP=y
 CONFIG_NET_LWIP_STATS_TCP=y
 CONFIG_NET_LWIP_STATS_MEM=y
 CONFIG_NET_LWIP_STATS_SYS=y
-CONFIG_NSOCKET_DESCRIPTORS=16
+CONFIG_NSOCKET_DESCRIPTORS=8
 CONFIG_NET_SECURITY_TLS=y
 # CONFIG_TLS_WITH_SSS is not set
 
index b540388..6fe60d6 100755 (executable)
@@ -648,14 +648,14 @@ CONFIG_NET_LWIP_MEMP_NUM_TCP_SEG=80
 CONFIG_NET_LWIP_MEMP_NUM_REASSDATA=5
 CONFIG_NET_LWIP_MEMP_NUM_FRAG_PBUF=15
 CONFIG_NET_LWIP_MEMP_NUM_ARP_QUEUE=30
-CONFIG_NET_LWIP_SOCKET=y
-CONFIG_NET_LWIP_RAW=y
-# CONFIG_NET_LWIP_SOCKET_OPTION_BROADCAST is not set
-# CONFIG_NET_LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS is not set
-# CONFIG_NET_LWIP_SOCKET_SENDTIMEOUT is not set
-CONFIG_NET_LWIP_SOCKET_RECVTIMEOUT=y
-# CONFIG_NET_LWIP_SOCKET_RCVBUF is not set
-CONFIG_NET_LWIP_SOCKET_REUSE=y
+CONFIG_NET_SOCKET=y
+CONFIG_NET_RAW=y
+# CONFIG_NET_SOCKET_OPTION_BROADCAST is not set
+# CONFIG_NET_RANDOMIZE_INITIAL_LOCAL_PORTS is not set
+# CONFIG_NET_SO_SNDTIMEO is not set
+CONFIG_NET_SO_RCVTIMEO=y
+# CONFIG_NET_SO_RCVBUF is not set
+CONFIG_NET_SO_REUSE=y
 CONFIG_NET_LWIP_ICMP=y
 # CONFIG_NET_LWIP_ICMP_BROADCAST_PING is not set
 # CONFIG_NET_LWIP_ICMP_MULTICAST_PING is not set
@@ -663,16 +663,16 @@ CONFIG_NET_LWIP_IGMP=y
 CONFIG_NET_LWIP_MEMP_NUM_IGMP_GROUP=8
 CONFIG_NET_LWIP_UDP=y
 # CONFIG_NET_LWIP_UDPLITE is not set
-CONFIG_NET_LWIP_TCP=y
-CONFIG_NET_LWIP_TCP_KEEPALIVE=y
-CONFIG_NET_LWIP_TCP_WINDOW_SIZE=58400
-CONFIG_NET_LWIP_TCP_MAX_RETRANS=12
-CONFIG_NET_LWIP_TCP_SYN_MAX_RETRANS=6
-CONFIG_NET_LWIP_TCP_QUEUE_OOSEQ=y
-CONFIG_NET_LWIP_TCP_MSS=1460
-CONFIG_NET_LWIP_TCP_SEND_BUF=29200
-# CONFIG_NET_LWIP_TCP_TIMESTAMPS is not set
-# CONFIG_NET_LWIP_TCP_LISTEN_BACKLOG is not set
+CONFIG_NET_TCP=y
+CONFIG_NET_TCP_KEEPALIVE=y
+CONFIG_NET_TCP_WND=58400
+CONFIG_NET_TCP_MAXRTX=12
+CONFIG_NET_TCP_SYNMAXRTX=6
+CONFIG_NET_TCP_QUEUE_OOSEQ=y
+CONFIG_NET_TCP_MSS=1460
+CONFIG_NET_TCP_SND_BUF=29200
+# CONFIG_NET_TCP_TIMESTAMPS is not set
+# CONFIG_NET_TCP_LISTEN_BACKLOG is not set
 CONFIG_NET_ARP=y
 CONFIG_NET_ARP_TABLESIZE=10
 CONFIG_NET_ARP_QUEUEING=y
@@ -719,7 +719,7 @@ CONFIG_NET_LWIP_STATS_UDP=y
 CONFIG_NET_LWIP_STATS_TCP=y
 CONFIG_NET_LWIP_STATS_MEM=y
 CONFIG_NET_LWIP_STATS_SYS=y
-CONFIG_NSOCKET_DESCRIPTORS=16
+CONFIG_NSOCKET_DESCRIPTORS=8
 CONFIG_NET_SECURITY_TLS=y
 # CONFIG_TLS_WITH_SSS is not set
 
index 7f57005..602aa35 100755 (executable)
 #define LWIP_RAND()                     rand()
 
 /* ---------- TCP options ---------- */
-#ifdef CONFIG_NET_LWIP_TCP
+#ifdef CONFIG_NET_TCP
 #define LWIP_TCP                1
 
-#ifdef CONFIG_NET_LWIP_TCP_WINDOW_SIZE
-#define TCP_WND                 CONFIG_NET_LWIP_TCP_WINDOW_SIZE
+#ifdef CONFIG_NET_TCP_WND
+#define TCP_WND                 CONFIG_NET_TCP_WND
 #endif
 
-#ifdef CONFIG_NET_LWIP_TCP_MAX_RETRANS
-#define TCP_MAXRTX              CONFIG_NET_LWIP_TCP_MAX_RETRANS
+#ifdef CONFIG_NET_TCP_MAXRTX
+#define TCP_MAXRTX              CONFIG_NET_TCP_MAXRTX
 #endif
 
-#ifdef CONFIG_NET_LWIP_TCP_SYN_MAX_RETRANS
-#define TCP_SYNMAXRTX           CONFIG_NET_LWIP_TCP_SYN_MAX_RETRANS
+#ifdef CONFIG_NET_TCP_SYNMAXRTX
+#define TCP_SYNMAXRTX           CONFIG_NET_TCP_SYNMAXRTX
 #endif
 
-#ifdef CONFIG_NET_LWIP_TCP_QUEUE_OOSEQ
+#ifdef CONFIG_NET_TCP_QUEUE_OOSEQ
 #define TCP_QUEUE_OOSEQ         1
 #else
 #define TCP_QUEUE_OOSEQ         0
 #endif
 
-#ifdef CONFIG_NET_LWIP_TCP_MSS
-#define TCP_MSS                 CONFIG_NET_LWIP_TCP_MSS
+#ifdef CONFIG_NET_TCP_MSS
+#define TCP_MSS                 CONFIG_NET_TCP_MSS
 #endif
 
-#ifdef CONFIG_NET_LWIP_TCP_SEND_BUF
-#define TCP_SND_BUF             CONFIG_NET_LWIP_TCP_SEND_BUF
+#ifdef CONFIG_NET_TCP_SND_BUF
+#define TCP_SND_BUF             CONFIG_NET_TCP_SND_BUF
 #endif
 
-#ifdef CONFIG_NET_LWIP_TCP_TIMESTAMPS
+#ifdef CONFIG_NET_TCP_TIMESTAMPS
 #define LWIP_TCP_TIMESTAMPS             1
 #else
 #define LWIP_TCP_TIMESTAMPS             0
 #endif
 
-#ifdef CONFIG_NET_LWIP_TCP_KEEPALIVE
+#ifdef CONFIG_NET_TCP_KEEPALIVE
 #define LWIP_TCP_KEEPALIVE              1
 #else
 #define LWIP_TCP_KEEPALIVE              0
 #endif
 
-#ifdef CONFIG_NET_LWIP_TCP_LISTEN_BACKLOG
+#ifdef CONFIG_NET_TCP_LISTEN_BACKLOG
 #define TCP_LISTEN_BACKLOG              1
 #else
 #define TCP_LISTEN_BACKLOG              0
 
 
 /* ---------- Socket options ---------- */
-#ifdef CONFIG_NET_LWIP_SOCKET
+#ifdef CONFIG_NET_SOCKET
 #define LWIP_SOCKET                     1
 
-#ifdef CONFIG_NET_LWIP_RAW
+#ifdef CONFIG_NET_RAW
 #define LWIP_RAW                        1
 #else
 #define LWIP_RAW                        0
 #endif
 
-#ifdef CONFIG_NET_LWIP_SOCKET_OPTION_BROADCAST
+#ifdef CONFIG_NET_SOCKET_OPTION_BROADCAST
 #define IP_SOF_BROADCAST                1
 #else
 #define IP_SOF_BROADCAST                0
 #endif
 
 
-#ifdef CONFIG_NET_LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS
+#ifdef CONFIG_NET_RANDOMIZE_INITIAL_LOCAL_PORTS
 #define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS      1
 #else
 #define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS      0
 #endif
 
-#ifdef CONFIG_NET_LWIP_SOCKET_SENDTIMEOUT
+#ifdef CONFIG_NET_SO_SNDTIMEO
 #define LWIP_SO_SNDTIMEO                        1
 #else
 #define LWIP_SO_SNDTIMEO                        0
 #endif
 
-#ifdef CONFIG_NET_LWIP_SOCKET_RECVTIMEOUT
+#ifdef CONFIG_NET_SO_RCVTIMEO
 #define LWIP_SO_RCVTIMEO                        1
 #else
 #define LWIP_SO_RCVTIMEO                        0
 #endif
 
-#ifdef CONFIG_NET_LWIP_SOCKET_RCVBUF
+#ifdef CONFIG_NET_SO_RCVBUF
 #define LWIP_SO_RCVBUF                          1
 #else
 #define LWIP_SO_RCVBUF                          0
 #endif
 
-#ifdef CONFIG_NET_LWIP_SOCKET_REUSE
+#ifdef CONFIG_NET_SO_REUSE
 #define SO_REUSE                                1
 #else
 #define SO_REUSE                                0
index 73cb2c3..8fb6129 100644 (file)
@@ -73,7 +73,7 @@
 
 #if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
 
-#if defined(CONFIG_DISABLE_POLL) && defined(CONFIG_NET_LWIP_SOCKET)
+#if defined(CONFIG_DISABLE_POLL) && defined(CONFIG_NET_SOCKET)
 
 #include <net/lwip/sockets.h>
 
index 57af046..d3c77cd 100644 (file)
@@ -70,7 +70,7 @@
 #include <sys/sock_internal.h>
 #include <sys/types.h>
 
-#ifdef CONFIG_NET_LWIP_SOCKET 
+#ifdef CONFIG_NET_SOCKET
 #include <net/lwip/sockets.h>
 #include <net/lwip/api.h>
 #endif                                                 /* CONFIG_CUSTOM_SOCKETS */
index da2664f..85da0b6 100644 (file)
@@ -34,12 +34,6 @@ if NET_LWIP
 source net/lwip/configs/Kconfig
 endif #NET_LWIP
 
-config NSOCKET_DESCRIPTORS
-       int "Number of socket descriptor"
-       default 8
-       ---help---
-               Maximum number of socket descriptors.
-
 config NET_SECURITY_TLS
        bool "TLS Support"
        default n
index 8bb3095..6724f5f 100644 (file)
@@ -50,7 +50,7 @@ config NET_LWIP_MEMP_NUM_PBUF
 config NET_LWIP_MEMP_NUM_RAW_PCB
        int "Number of raw connection PCBs"
        default 4
-       depends on NET_LWIP_RAW
+       depends on NET_RAW
        ---help---
                Number of raw connection PCBs
 
@@ -64,21 +64,21 @@ config NET_LWIP_MEMP_NUM_UDP_PCB
 config NET_LWIP_MEMP_NUM_TCP_PCB
        int "Number of tcp connection PCBs"
        default 5
-       depends on NET_LWIP_TCP
+       depends on NET_TCP
        ---help---
                Number of tcp connection PCBs
 
 config NET_LWIP_MEMP_NUM_TCP_PCB_LISTEN
        int "Number of listening tcp connections"
        default 5
-       depends on NET_LWIP_TCP
+       depends on NET_TCP
        ---help---
                Number of simultaneously queued TCP segments
 
 config NET_LWIP_MEMP_NUM_TCP_SEG
        int "Number of simultaneously queued TCP segments"
        default 16
-       depends on NET_LWIP_TCP
+       depends on NET_TCP
        ---help---
                Number of simultaneously queued TCP segments
 
@@ -106,46 +106,7 @@ config NET_LWIP_MEMP_NUM_ARP_QUEUE
 
 endmenu #LwIP memory options
 
-menuconfig NET_LWIP_SOCKET
-       bool "Socket support"
-       default y
-
-if NET_LWIP_SOCKET
-
-config NET_LWIP_RAW
-       bool "Raw socket support"
-       default y
-
-config NET_LWIP_SOCKET_OPTION_BROADCAST
-       bool "Support SO_BROADCAST Option"
-       default n
-       ---help---
-               Enable SO_BROADCAST option support.
-
-config NET_LWIP_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_LWIP_SOCKET_SENDTIMEOUT
-       bool "Enable send timeout socket option"
-       default n
-
-config NET_LWIP_SOCKET_RECVTIMEOUT
-       bool "Enable receive timeout socket option"
-       default n
-
-config NET_LWIP_SOCKET_RCVBUF
-       bool "Enable SO_RCVBUF socket option"
-       default y
-
-config NET_LWIP_SOCKET_REUSE
-       bool "Enable SO_REUSE socket option"
-       default n
-
-endif #NET_LWIP_SOCKET
+source "net/lwip/configs/socket/Kconfig"
 
 menuconfig NET_LWIP_ICMP
        bool "ICMP support"
@@ -195,70 +156,7 @@ config NET_LWIP_UDPLITE
 
 endif #NET_LWIP_UDP
 
-menuconfig NET_LWIP_TCP
-       bool "TCP support"
-       default y
-
-if NET_LWIP_TCP
-
-config NET_LWIP_TCP_KEEPALIVE
-       bool "Enable TCP Keepalive"
-       default n
-
-
-config NET_LWIP_TCP_WINDOW_SIZE
-       int "The size of a TCP window"
-       default 2144
-       ---help---
-               The size of a TCP window.  This must be at least
-               (2 * TCP_MSS) for things to work well
-
-config NET_LWIP_TCP_MAX_RETRANS
-       int "Maximum number of retransmissions of data segments"
-       default 12
-       ---help---
-               The Maximum number of retransmissions of data segments.
-
-config NET_LWIP_TCP_SYN_MAX_RETRANS
-       int "Maximum number of retransmissions of SYN segments"
-       default 6
-       ---help---
-               The maximum number of retransmissions of SYN segments
-
-config NET_LWIP_TCP_QUEUE_OOSEQ
-       bool "Enable queueing out of order packets"
-       default y
-       ---help---
-               Queue segments that arrive out of order.
-               Disable if your device is low on memory.
-
-config NET_LWIP_TCP_MSS
-       int "TCP Maximum segment size"
-       default 536
-       ---help---
-               TCP Maximum segment size in bytes.
-
-config NET_LWIP_TCP_SEND_BUF
-       int "TCP send buffer size in bytes"
-       default 1072
-       ---help---
-               TCP sender buffer space (bytes).
-               To achieve good performance, this should be at least 2 * TCP_MSS.
-
-config NET_LWIP_TCP_TIMESTAMPS
-       bool "Support the TCP timestamp option"
-       default n
-       ---help---
-               Support the TCP timestamp option.
-
-config NET_LWIP_TCP_LISTEN_BACKLOG
-       bool "Support the backlog option for tcp listen pcb"
-       default n
-       ---help---
-               Support the the backlog option for tcp listen pcb.
-
-endif #NET_LWIP_TCP
-
+source "net/lwip/configs/tcp/Kconfig"
 source "net/lwip/configs/arp/Kconfig"
 
 menu "IP options"
diff --git a/os/net/lwip/configs/socket/Kconfig b/os/net/lwip/configs/socket/Kconfig
new file mode 100644 (file)
index 0000000..e17b63c
--- /dev/null
@@ -0,0 +1,83 @@
+#
+# 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
diff --git a/os/net/lwip/configs/tcp/Kconfig b/os/net/lwip/configs/tcp/Kconfig
new file mode 100644 (file)
index 0000000..7431f2f
--- /dev/null
@@ -0,0 +1,157 @@
+#
+# 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 "TCP Networking"
+
+config NET_TCP
+       bool "Enable TCP"
+       depends on NET_IPv4
+       default y
+       ---help---
+               TCP support on or off
+
+if NET_TCP
+
+config NET_TCP_TTL
+       int "TCP TTL"
+       default 255
+       ---help---
+               Default Time-To-Live value
+
+config NET_TCP_WND
+       int "TCP Window Size"
+       default 2144
+       ---help---
+               The size of a TCP window.  This must be at least (2 * TCP_MSS)
+               for things to work well
+
+config NET_TCP_MAXRTX
+       int "TCP Max Retransmissions"
+       default 12
+       ---help---
+               Maximum number of retransmissions of data segments.
+
+config NET_TCP_SYNMAXRTX
+       int "TCP SYN Max Retransmissions"
+       default 6
+       ---help---
+               Maximum number of retransmissions of SYN segments.
+
+config NET_TCP_QUEUE_OOSEQ
+       bool "TCP out of order support"
+       default y
+       ---help---
+               TCP will queue segments that arrive out of order.
+               Select 'n' if your device is low on memory.
+
+config NET_TCP_MSS
+       int "TCP MSS"
+       default 536
+       ---help---
+               TCP Maximum segment size. (default is 536, a conservative default,
+               you might want to increase this.) For the receive side, this MSS is
+               advertised to the remote side when opening a connection. For the transmit
+               size, this MSS sets an upper limit on the MSS advertised by the remote host.
+
+config NET_TCP_CALCULATE_EFF_SEND_MSS
+       bool "TCP Enable Effective Send MSS"
+       default y
+       ---help---
+               The maximum size of a segment that TCP really sends, the 'effective send MSS,
+               ' MUST be the smaller of the send MSS (which reflects the available reassembly
+               buffer size at the remote host) and the largest size permitted by
+               the IP layer (RFC 1122)
+               Setting this to 1 enables code that checks TCP_MSS against the MTU of
+               the netif used for a connection and limits the MSS if it would be too
+               big otherwise.
+
+
+config NET_TCP_SND_BUF
+       int "TCP Send Buffer"
+       default 1072
+       ---help---
+               TCP sender buffer space (bytes).
+               To achieve good performance, this should be at least 2 * TCP_MSS.
+
+
+config NET_TCP_SND_QUEUELEN
+       int "TCP Send Buffer Pbuf"
+       default 8
+       ---help---
+               TCP sender buffer space (pbufs).
+               This must be at least as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
+
+if !NET_TCP_QUEUE_OOSEQ
+
+config NET_TCP_OOSEQ_MAX_BYTES
+       int "The maximum number of bytes queued on ooseq"
+       default 0
+       ---help---
+               The maximum number of bytes queued on ooseq per pcb.
+               Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==n.
+
+
+config NET_TCP_OOSEQ_MAX_PBUFS
+       int "The maximum number of pbufs queued on ooseq per pcb"
+       default 0
+       ---help---
+               The maximum number of pbufs queued on ooseq per pcb.
+               Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==n.
+
+endif #!NET_TCP_QUEUE_OOSEQ
+
+
+config NET_TCP_LISTEN_BACKLOG
+       bool "Enable the backlog"
+       default n
+       ---help---
+               Enable the backlog option for tcp listen pcb.
+
+if NET_TCP_LISTEN_BACKLOG
+
+config NET_TCP_DEFAULT_LISTEN_BACKLOG
+       hex "The maximum allowed backlog"
+       default 0xff
+       range 0x0 0xff
+       ---help---
+               The maximum allowed backlog for TCP listen netconns.
+               This backlog is used unless another is explicitly specified.
+               0xff is the maximum (u8_t).
+
+endif #NET_TCP_LISTEN_BACKLOG
+
+config NET_TCP_OVERSIZE
+       int "TCP Oversize"
+       default 536
+       ---help---
+               TCP_OVERSIZE: The maximum number of bytes that tcp_write may
+               allocate ahead of time in an attempt to create shorter pbuf chains
+               for transmission. The meaningful range is 0 to TCP_MSS. Some
+               suggested values are:
+               * 0:         Disable oversized allocation.
+                            Each tcp_write() allocates a new pbuf (old behaviour).
+               * 1:         Allocate size-aligned pbufs with minimal excess.
+                            Use this if your scatter-gather DMA requires aligned fragments.
+               * 128:       Limit the pbuf/memory overhead to 20%.
+               * TCP_MSS:   Try to create unfragmented TCP packets.
+               * TCP_MSS/4: Try to create 4 fragments or less per TCP packet.
+
+
+config NET_TCP_TIMESTAMPS
+       bool "Enable Timestamp"
+       default n
+       ---help---
+               support the TCP timestamp option.
+
+
+config NET_TCP_WND_UPDATE_THREASHOLD
+       int "TCP Window Update Threshold"
+       default 536
+       ---help---
+               Difference in window to trigger an explicit window update
+
+endif #NET_TCP
+
+endmenu #TCP Networking
index 9ba4385..ba838ca 100644 (file)
@@ -53,7 +53,7 @@
 
 # Include socket source files
 
-ifeq ($(CONFIG_NET_LWIP_SOCKET),y)
+ifeq ($(CONFIG_NET_SOCKET),y)
 SOCK_CSRCS += net_sockets.c net_close.c net_dupsd.c net_dupsd2.c
 SOCK_CSRCS += net_clone.c net_vfcntl.c bsd_socket_api.c