Kconfig 13 KB

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