Kconfig 12 KB

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