Kconfig 12 KB

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