Kconfig 12 KB

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