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_LWIP202
  92. bool "lwIP v2.0.2"
  93. config RT_USING_LWIP203
  94. bool "lwIP v2.0.3"
  95. config RT_USING_LWIP212
  96. bool "lwIP v2.1.2"
  97. endchoice
  98. if (RT_USING_LWIP202 || RT_USING_LWIP212 || RT_USING_LWIP203)
  99. config RT_USING_LWIP_IPV6
  100. bool "IPV6 protocol"
  101. default n
  102. select NETDEV_USING_IPV6
  103. select NETDEV_IPV6_SCOPES if RT_USING_LWIP212
  104. endif
  105. config RT_LWIP_MEM_ALIGNMENT
  106. int "Memory alignment"
  107. default 4
  108. config RT_LWIP_IGMP
  109. bool "IGMP protocol"
  110. default y
  111. config RT_LWIP_ICMP
  112. bool "ICMP protocol"
  113. default y
  114. config RT_LWIP_SNMP
  115. bool "SNMP protocol"
  116. select RT_LWIP_STATS
  117. default n
  118. config RT_LWIP_DNS
  119. bool "Enble DNS for name resolution"
  120. select RT_LWIP_UDP
  121. default y
  122. config RT_LWIP_DHCP
  123. bool "Enable alloc ip address through DHCP"
  124. select RT_LWIP_UDP
  125. default y
  126. if RT_LWIP_DHCP
  127. config IP_SOF_BROADCAST
  128. int "SOF broadcast"
  129. default 1
  130. config IP_SOF_BROADCAST_RECV
  131. int "SOF broadcast recv"
  132. default 1
  133. endif
  134. menu "Static IPv4 Address"
  135. config RT_LWIP_IPADDR
  136. string "IPv4: IP address"
  137. default 192.168.1.30
  138. config RT_LWIP_GWADDR
  139. string "IPv4: Gateway address"
  140. default 192.168.1.1
  141. config RT_LWIP_MSKADDR
  142. string "IPv4: Mask address"
  143. default 255.255.255.0
  144. endmenu
  145. config RT_LWIP_UDP
  146. bool "UDP protocol"
  147. default y
  148. config RT_LWIP_TCP
  149. bool "TCP protocol"
  150. default y
  151. config RT_LWIP_RAW
  152. bool "RAW protocol"
  153. default n
  154. config RT_LWIP_PPP
  155. bool "PPP protocol"
  156. default n
  157. if RT_LWIP_PPP
  158. config RT_LWIP_PPPOE
  159. bool "PPPoE protocol"
  160. default n
  161. config RT_LWIP_PPPOS
  162. bool "PPPoS protocol"
  163. default n
  164. endif
  165. config RT_MEMP_NUM_NETCONN
  166. int "the number of struct netconns"
  167. default 8
  168. config RT_LWIP_PBUF_NUM
  169. int "the number of PBUF"
  170. default 16
  171. config RT_LWIP_RAW_PCB_NUM
  172. int "the number of raw connection"
  173. default 4
  174. config RT_LWIP_UDP_PCB_NUM
  175. int "the number of UDP socket"
  176. default 8 if RT_USING_DFS_NFS
  177. default 4
  178. if RT_LWIP_TCP
  179. config RT_LWIP_TCP_PCB_NUM
  180. int "the number of TCP socket"
  181. default 4
  182. config RT_LWIP_TCP_SEG_NUM
  183. int "the number of TCP segment"
  184. default 40
  185. config RT_LWIP_TCP_SND_BUF
  186. int "the size of send buffer"
  187. default 8196
  188. config RT_LWIP_TCP_WND
  189. int "the size of TCP send window"
  190. default 8196
  191. endif
  192. config RT_LWIP_TCPTHREAD_PRIORITY
  193. int "the priority level value of lwIP thread"
  194. default 10
  195. config RT_LWIP_TCPTHREAD_MBOX_SIZE
  196. int "the number of mail in the lwIP thread mailbox"
  197. default 8
  198. config RT_LWIP_TCPTHREAD_STACKSIZE
  199. int "the stack size of lwIP thread"
  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 1024
  213. config RT_LWIP_ETHTHREAD_MBOX_SIZE
  214. int "the number of mail in the ethernet thread mailbox"
  215. default 8
  216. config RT_LWIP_REASSEMBLY_FRAG
  217. bool "Enable IP reassembly and frag"
  218. default n
  219. config LWIP_NETIF_STATUS_CALLBACK
  220. int "Enable netif status callback"
  221. default 1
  222. config LWIP_NETIF_LINK_CALLBACK
  223. int "Enable netif link status callback"
  224. default 1
  225. config SO_REUSE
  226. int "Enable SO_REUSEADDR option"
  227. default 1
  228. config LWIP_SO_RCVTIMEO
  229. int "Enable receive timeout for sockets/netconns and SO_RCVTIMEO processing."
  230. default 1
  231. config LWIP_SO_SNDTIMEO
  232. int "Enable send timeout for sockets/netconns and SO_SNDTIMEO processing."
  233. default 1
  234. config LWIP_SO_RCVBUF
  235. int "Enable SO_RCVBUF processing"
  236. default 1
  237. config LWIP_SO_LINGER
  238. int "Enable SO_LINGER processing"
  239. default 0
  240. config RT_LWIP_NETIF_LOOPBACK
  241. bool "Enable netif loopback"
  242. default n
  243. config LWIP_NETIF_LOOPBACK
  244. int
  245. default 1 if RT_LWIP_NETIF_LOOPBACK
  246. default 0 if !RT_LWIP_NETIF_LOOPBACK
  247. config RT_LWIP_STATS
  248. bool "Enable lwIP statistics"
  249. default n
  250. config RT_LWIP_USING_HW_CHECKSUM
  251. bool "Enable hardware checksum"
  252. default n
  253. config RT_LWIP_USING_PING
  254. bool "Enable ping features"
  255. default y
  256. select NETDEV_USING_PING
  257. select RT_LWIP_ICMP
  258. select RT_LWIP_RAW
  259. menuconfig RT_LWIP_DEBUG
  260. bool "Enable lwIP Debugging Options"
  261. default n
  262. if RT_LWIP_DEBUG
  263. config RT_LWIP_SYS_DEBUG
  264. bool "Enable Debugging of sys.c"
  265. default n
  266. config RT_LWIP_ETHARP_DEBUG
  267. bool "Enable Debugging of etharp.c"
  268. default n
  269. config RT_LWIP_PPP_DEBUG
  270. bool "Enable Debugging of PPP"
  271. default n
  272. config RT_LWIP_MEM_DEBUG
  273. bool "Enable Debugging of mem.c"
  274. default n
  275. config RT_LWIP_MEMP_DEBUG
  276. bool "Enable Debugging of memp.c"
  277. default n
  278. config RT_LWIP_PBUF_DEBUG
  279. bool "Enable Debugging of pbuf.c"
  280. default n
  281. config RT_LWIP_API_LIB_DEBUG
  282. bool "Enable Debugging of api_lib.c"
  283. default n
  284. config RT_LWIP_API_MSG_DEBUG
  285. bool "Enable Debugging of api_msg.c"
  286. default n
  287. config RT_LWIP_TCPIP_DEBUG
  288. bool "Enable Debugging of tcpip.c"
  289. default n
  290. config RT_LWIP_NETIF_DEBUG
  291. bool "Enable Debugging of netif.c"
  292. default n
  293. config RT_LWIP_SOCKETS_DEBUG
  294. bool "Enable Debugging of sockets.c"
  295. default n
  296. config RT_LWIP_DNS_DEBUG
  297. bool "Enable Debugging of DNS"
  298. default n
  299. config RT_LWIP_AUTOIP_DEBUG
  300. bool "Enable Debugging of autoip.c"
  301. default n
  302. config RT_LWIP_DHCP_DEBUG
  303. bool "Enable Debugging of dhcp.c"
  304. default n
  305. config RT_LWIP_IP_DEBUG
  306. bool "Enable Debugging of IP"
  307. default n
  308. config RT_LWIP_IP_REASS_DEBUG
  309. bool "Enable debugging in ip_frag.c for both frag & reass"
  310. default n
  311. config RT_LWIP_ICMP_DEBUG
  312. bool "Enable Debugging of icmp.c"
  313. default n
  314. config RT_LWIP_IGMP_DEBUG
  315. bool "Enable Debugging of igmp.c"
  316. default n
  317. config RT_LWIP_UDP_DEBUG
  318. bool "Enable Debugging of UDP"
  319. default n
  320. config RT_LWIP_TCP_DEBUG
  321. bool "Enable Debugging of TCP"
  322. default n
  323. config RT_LWIP_TCP_INPUT_DEBUG
  324. bool "Enable Debugging of tcp_in.c"
  325. default n
  326. config RT_LWIP_TCP_OUTPUT_DEBUG
  327. bool "Enable Debugging of tcp_out.c"
  328. default n
  329. config RT_LWIP_TCP_RTO_DEBUG
  330. bool "Enable debugging in TCP for retransmit"
  331. default n
  332. config RT_LWIP_TCP_CWND_DEBUG
  333. bool "Enable debugging for TCP congestion window"
  334. default n
  335. config RT_LWIP_TCP_WND_DEBUG
  336. bool "Enable debugging in tcp_in.c for window updating"
  337. default n
  338. config RT_LWIP_TCP_FR_DEBUG
  339. bool "Enable debugging in tcp_in.c for fast retransmit"
  340. default n
  341. config RT_LWIP_TCP_QLEN_DEBUG
  342. bool "Enable debugging for TCP queue lengths"
  343. default n
  344. config RT_LWIP_TCP_RST_DEBUG
  345. bool "Enable debugging for TCP with the RST message"
  346. default n
  347. endif
  348. endif
  349. endmenu
  350. source "$RTT_DIR/components/net/at/Kconfig"
  351. if RT_USING_LWIP
  352. config LWIP_USING_DHCPD
  353. bool "Enable DHCP server"
  354. default n
  355. if LWIP_USING_DHCPD
  356. config DHCPD_SERVER_IP
  357. string "DHCPD SERVER IP address"
  358. default 192.168.169.1
  359. config DHCPD_USING_ROUTER
  360. bool "alloc gateway ip for router"
  361. default y
  362. config LWIP_USING_CUSTOMER_DNS_SERVER
  363. bool "Enable customer DNS server config"
  364. default n
  365. if LWIP_USING_CUSTOMER_DNS_SERVER
  366. config DHCP_DNS_SERVER_IP
  367. string "Custom DNS server IP address"
  368. default 1.1.1.1
  369. endif
  370. endif
  371. endif
  372. endmenu