Kconfig 12 KB

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