Kconfig 11 KB

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