Kconfig 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. menu "Network"
  2. menu "Socket abstraction layer"
  3. config RT_USING_SAL
  4. bool "Enable socket abstraction layer"
  5. default n
  6. if RT_USING_SAL
  7. if RT_USING_LWIP || AT_USING_SOCKET
  8. menu "protocol stack implement"
  9. config SAL_USING_LWIP
  10. bool "Support lwIP stack"
  11. default y
  12. depends on RT_USING_LWIP
  13. config SAL_USING_AT
  14. bool "Support AT Commands stack"
  15. default y
  16. depends on AT_USING_SOCKET
  17. config SAL_USING_TLS
  18. bool "Support MbedTLS protocol"
  19. default y
  20. depends on PKG_USING_MBEDTLS
  21. endmenu
  22. endif
  23. config SAL_USING_POSIX
  24. bool "Enable BSD socket operated by file system API"
  25. default n
  26. select RT_USING_DFS
  27. select RT_USING_LIBC
  28. select RT_USING_POSIX
  29. help
  30. Let BSD socket operated by file system API, such as read/write and involveed in select/poll POSIX APIs.
  31. if !SAL_USING_POSIX
  32. config SAL_SOCKETS_NUM
  33. int "the maximum number of sockets"
  34. default 16
  35. endif
  36. config SAL_PROTO_FAMILIES_NUM
  37. int "the maximum number of protocol families"
  38. default 4
  39. endif
  40. endmenu
  41. menu "light weight TCP/IP stack"
  42. config RT_USING_LWIP
  43. bool "Enable lwIP stack"
  44. select RT_USING_DEVICE
  45. default n
  46. if RT_USING_LWIP
  47. choice
  48. prompt "lwIP version"
  49. default RT_USING_LWIP202
  50. help
  51. Select the lwIP version
  52. config RT_USING_LWIP141
  53. bool "lwIP v1.4.1"
  54. config RT_USING_LWIP202
  55. bool "lwIP v2.0.2"
  56. config RT_USING_LWIP210
  57. bool "lwIP v2.1.0"
  58. endchoice
  59. if (RT_USING_LWIP210 || RT_USING_LWIP202)
  60. config RT_USING_LWIP_IPV6
  61. bool "IPV6 protocol"
  62. default n
  63. endif
  64. config RT_LWIP_IGMP
  65. bool "IGMP protocol"
  66. default y
  67. config RT_LWIP_ICMP
  68. bool "ICMP protocol"
  69. default y
  70. config RT_LWIP_SNMP
  71. bool "SNMP protocol"
  72. select RT_LWIP_STATS
  73. default n
  74. config RT_LWIP_DNS
  75. bool "Enble DNS for name resolution"
  76. select RT_LWIP_UDP
  77. default y
  78. config RT_LWIP_DHCP
  79. bool "Enable alloc ip address through DHCP"
  80. select RT_LWIP_UDP
  81. default y
  82. if RT_LWIP_DHCP
  83. config IP_SOF_BROADCAST
  84. int "SOF broadcast"
  85. default 1
  86. config IP_SOF_BROADCAST_RECV
  87. int "SOF broadcast recv"
  88. default 1
  89. endif
  90. menu "Static IPv4 Address"
  91. config RT_LWIP_IPADDR
  92. string "IPv4: IP address"
  93. default 192.168.1.30
  94. config RT_LWIP_GWADDR
  95. string "IPv4: Gateway address"
  96. default 192.168.1.1
  97. config RT_LWIP_MSKADDR
  98. string "IPv4: Mask address"
  99. default 255.255.255.0
  100. endmenu
  101. config RT_LWIP_UDP
  102. bool "UDP protocol"
  103. default y
  104. config RT_LWIP_TCP
  105. bool "TCP protocol"
  106. default y
  107. config RT_LWIP_RAW
  108. bool "RAW protocol"
  109. default n
  110. config RT_LWIP_PPP
  111. bool "PPP protocol"
  112. default n
  113. if RT_LWIP_PPP
  114. config RT_LWIP_PPPOE
  115. bool "PPPoE protocol"
  116. default n
  117. config RT_LWIP_PPPOS
  118. bool "PPPoS protocol"
  119. default n
  120. endif
  121. config RT_MEMP_NUM_NETCONN
  122. int "the number of struct netconns"
  123. default 8
  124. config RT_LWIP_PBUF_NUM
  125. int "the number of PBUF"
  126. default 16
  127. config RT_LWIP_RAW_PCB_NUM
  128. int "the number of raw connection"
  129. default 4
  130. config RT_LWIP_UDP_PCB_NUM
  131. int "the number of UDP socket"
  132. default 8 if RT_USING_DFS_NFS
  133. default 4
  134. if RT_LWIP_TCP
  135. config RT_LWIP_TCP_PCB_NUM
  136. int "the number of TCP socket"
  137. default 4
  138. config RT_LWIP_TCP_SEG_NUM
  139. int "the number of TCP segment"
  140. default 40
  141. config RT_LWIP_TCP_SND_BUF
  142. int "the size of send buffer"
  143. default 8196
  144. config RT_LWIP_TCP_WND
  145. int "the size of TCP send window"
  146. default 8196
  147. endif
  148. config RT_LWIP_TCPTHREAD_PRIORITY
  149. int "the priority level value of lwIP thread"
  150. default 10
  151. config RT_LWIP_TCPTHREAD_MBOX_SIZE
  152. int "the number of mail in the lwIP thread mailbox"
  153. default 8
  154. config RT_LWIP_TCPTHREAD_STACKSIZE
  155. int "the stack size of lwIP thread"
  156. default 1024
  157. config LWIP_NO_RX_THREAD
  158. bool "Not use Rx thread"
  159. default n
  160. config LWIP_NO_TX_THREAD
  161. bool "Not use Tx thread"
  162. default n
  163. config RT_LWIP_ETHTHREAD_PRIORITY
  164. int "the priority level value of ethernet thread"
  165. default 12
  166. config RT_LWIP_ETHTHREAD_STACKSIZE
  167. int "the stack size of ethernet thread"
  168. default 1024
  169. config RT_LWIP_ETHTHREAD_MBOX_SIZE
  170. int "the number of mail in the ethernet thread mailbox"
  171. default 8
  172. config RT_LWIP_REASSEMBLY_FRAG
  173. bool "Enable IP reassembly and frag"
  174. default n
  175. config LWIP_NETIF_STATUS_CALLBACK
  176. int "netif status callback"
  177. default 1
  178. config SO_REUSE
  179. int "Enable SO_REUSEADDR option"
  180. default 1
  181. config LWIP_SO_RCVTIMEO
  182. int "Enable receive timeout for sockets/netconns and SO_RCVTIMEO processing."
  183. default 1
  184. config LWIP_SO_SNDTIMEO
  185. int "Enable send timeout for sockets/netconns and SO_SNDTIMEO processing."
  186. default 1
  187. config LWIP_SO_RCVBUF
  188. int "Enable SO_RCVBUF processing"
  189. default 1
  190. config RT_LWIP_NETIF_LOOPBACK
  191. bool "Enable netif loopback"
  192. default n
  193. config LWIP_NETIF_LOOPBACK
  194. int
  195. default 1 if RT_LWIP_NETIF_LOOPBACK
  196. default 0 if !RT_LWIP_NETIF_LOOPBACK
  197. config RT_LWIP_STATS
  198. bool "Enable lwIP statistics"
  199. default n
  200. config RT_LWIP_USING_HW_CHECKSUM
  201. bool "Enable hardware checksum"
  202. default n
  203. menuconfig RT_LWIP_DEBUG
  204. bool "Enable lwIP Debugging Options"
  205. default n
  206. if RT_LWIP_DEBUG
  207. config RT_LWIP_SYS_DEBUG
  208. bool "Enable Debugging of sys.c"
  209. default n
  210. config RT_LWIP_ETHARP_DEBUG
  211. bool "Enable Debugging of etharp.c"
  212. default n
  213. config RT_LWIP_PPP_DEBUG
  214. bool "Enable Debugging of PPP"
  215. default n
  216. config RT_LWIP_MEM_DEBUG
  217. bool "Enable Debugging of mem.c"
  218. default n
  219. config RT_LWIP_MEMP_DEBUG
  220. bool "Enable Debugging of memp.c"
  221. default n
  222. config RT_LWIP_PBUF_DEBUG
  223. bool "Enable Debugging of pbuf.c"
  224. default n
  225. config RT_LWIP_API_LIB_DEBUG
  226. bool "Enable Debugging of api_lib.c"
  227. default n
  228. config RT_LWIP_API_MSG_DEBUG
  229. bool "Enable Debugging of api_msg.c"
  230. default n
  231. config RT_LWIP_TCPIP_DEBUG
  232. bool "Enable Debugging of tcpip.c"
  233. default n
  234. config RT_LWIP_NETIF_DEBUG
  235. bool "Enable Debugging of netif.c"
  236. default n
  237. config RT_LWIP_SOCKETS_DEBUG
  238. bool "Enable Debugging of sockets.c"
  239. default n
  240. config RT_LWIP_DNS_DEBUG
  241. bool "Enable Debugging of DNS"
  242. default n
  243. config RT_LWIP_AUTOIP_DEBUG
  244. bool "Enable Debugging of autoip.c"
  245. default n
  246. config RT_LWIP_DHCP_DEBUG
  247. bool "Enable Debugging of dhcp.c"
  248. default n
  249. config RT_LWIP_IP_DEBUG
  250. bool "Enable Debugging of IP"
  251. default n
  252. config RT_LWIP_IP_REASS_DEBUG
  253. bool "Enable debugging in ip_frag.c for both frag & reass"
  254. default n
  255. config RT_LWIP_ICMP_DEBUG
  256. bool "Enable Debugging of icmp.c"
  257. default n
  258. config RT_LWIP_IGMP_DEBUG
  259. bool "Enable Debugging of igmp.c"
  260. default n
  261. config RT_LWIP_UDP_DEBUG
  262. bool "Enable Debugging of UDP"
  263. default n
  264. config RT_LWIP_TCP_DEBUG
  265. bool "Enable Debugging of TCP"
  266. default n
  267. config RT_LWIP_TCP_INPUT_DEBUG
  268. bool "Enable Debugging of tcp_in.c"
  269. default n
  270. config RT_LWIP_TCP_OUTPUT_DEBUG
  271. bool "Enable Debugging of tcp_out.c"
  272. default n
  273. config RT_LWIP_TCP_RTO_DEBUG
  274. bool "Enable debugging in TCP for retransmit"
  275. default n
  276. config RT_LWIP_TCP_CWND_DEBUG
  277. bool "Enable debugging for TCP congestion window"
  278. default n
  279. config RT_LWIP_TCP_WND_DEBUG
  280. bool "Enable debugging in tcp_in.c for window updating"
  281. default n
  282. config RT_LWIP_TCP_FR_DEBUG
  283. bool "Enable debugging in tcp_in.c for fast retransmit"
  284. default n
  285. config RT_LWIP_TCP_QLEN_DEBUG
  286. bool "Enable debugging for TCP queue lengths"
  287. default n
  288. config RT_LWIP_TCP_RST_DEBUG
  289. bool "Enable debugging for TCP with the RST message"
  290. default n
  291. endif
  292. endif
  293. endmenu
  294. source "$RTT_DIR/components/net/freemodbus/Kconfig"
  295. source "$RTT_DIR/components/net/at/Kconfig"
  296. if RT_USING_LWIP
  297. config LWIP_USING_DHCPD
  298. bool "Enable DHCP server"
  299. default n
  300. if LWIP_USING_DHCPD
  301. config DHCPD_SERVER_IP
  302. string "DHCPD SERVER IP address"
  303. default 192.168.169.1
  304. config DHCPD_USING_ROUTER
  305. bool "alloc gateway ip for router"
  306. default y
  307. config LWIP_USING_CUSTOMER_DNS_SERVER
  308. bool "Enable customer DNS server config"
  309. default n
  310. if LWIP_USING_CUSTOMER_DNS_SERVER
  311. config DHCP_DNS_SERVER_IP
  312. string "Custom DNS server IP address"
  313. default 1.1.1.1
  314. endif
  315. endif
  316. endif
  317. endmenu