Kconfig 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  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_MEMP_NUM_TCPIP_MSG_API
  163. int "the number of struct tcpip_msg ,which are used for callback/timeout API communication"
  164. default 16
  165. config RT_MEMP_NUM_TCPIP_MSG_INPKT
  166. int "the number of struct tcpip_msg ,which are used for incoming packets"
  167. default 16
  168. config RT_LWIP_PBUF_NUM
  169. int "the number of PBUF"
  170. default 16
  171. config RT_LWIP_PBUF_STRUCT_NUM
  172. int "the number of pbuf struct"
  173. default 16
  174. config RT_LWIP_NETBUF_NUM
  175. int "the number of netbuf struct"
  176. default 16
  177. config RT_LWIP_RAW_PCB_NUM
  178. int "the number of raw connection"
  179. default 4
  180. config RT_LWIP_UDP_PCB_NUM
  181. int "the number of UDP socket"
  182. default 8 if RT_USING_DFS_NFS
  183. default 4
  184. config RT_UDP_RECVMBOX_SIZE
  185. int "the number of udp recv mbox num"
  186. default 16
  187. config RT_RECV_BUFSIZE_DEFAULT
  188. int "this is the default value for recv_bufsize, the unit is KB"
  189. default 64
  190. if RT_LWIP_TCP
  191. config RT_LWIP_TCP_PCB_NUM
  192. int "the number of TCP socket"
  193. default 4
  194. config RT_LWIP_TCP_SEG_NUM
  195. int "the number of TCP segment"
  196. default 40
  197. config RT_LWIP_TCP_SND_BUF
  198. int "the size of send buffer"
  199. default 8196
  200. config RT_LWIP_TCP_WND
  201. int "the size of TCP send window"
  202. default 8196
  203. config RT_TCP_RECVMBOX_SIZE
  204. int "the number of tcp recv mbox num"
  205. default 16
  206. endif
  207. config RT_LWIP_TCPTHREAD_PRIORITY
  208. int "the priority level value of lwIP thread"
  209. default 10
  210. config RT_LWIP_TCPTHREAD_MBOX_SIZE
  211. int "the number of mail in the lwIP thread mailbox"
  212. default 8
  213. config RT_LWIP_TCPTHREAD_STACKSIZE
  214. int "the stack size of lwIP thread"
  215. default 1024
  216. config LWIP_NO_RX_THREAD
  217. bool "Not use Rx thread"
  218. default n
  219. config LWIP_NO_TX_THREAD
  220. bool "Not use Tx thread"
  221. default n
  222. config RT_LWIP_ETHTHREAD_PRIORITY
  223. int "the priority level value of ethernet thread"
  224. default 12
  225. config RT_LWIP_ETHTHREAD_STACKSIZE
  226. int "the stack size of ethernet thread"
  227. default 1024
  228. config RT_LWIP_ETHTHREAD_MBOX_SIZE
  229. int "the number of mail in the ethernet thread mailbox"
  230. default 8
  231. config RT_LWIP_REASSEMBLY_FRAG
  232. bool "Enable IP reassembly and frag"
  233. default n
  234. config LWIP_NETIF_STATUS_CALLBACK
  235. int "Enable netif status callback"
  236. default 1
  237. config LWIP_NETIF_LINK_CALLBACK
  238. int "Enable netif link status callback"
  239. default 1
  240. config SO_REUSE
  241. int "Enable SO_REUSEADDR option"
  242. default 1
  243. config LWIP_SO_RCVTIMEO
  244. int "Enable receive timeout for sockets/netconns and SO_RCVTIMEO processing."
  245. default 1
  246. config LWIP_SO_SNDTIMEO
  247. int "Enable send timeout for sockets/netconns and SO_SNDTIMEO processing."
  248. default 1
  249. config LWIP_SO_RCVBUF
  250. int "Enable SO_RCVBUF processing"
  251. default 1
  252. config LWIP_SO_LINGER
  253. int "Enable SO_LINGER processing"
  254. default 0
  255. config RT_LWIP_NETIF_LOOPBACK
  256. bool "Enable netif loopback"
  257. default n
  258. config LWIP_NETIF_LOOPBACK
  259. int
  260. default 1 if RT_LWIP_NETIF_LOOPBACK
  261. default 0 if !RT_LWIP_NETIF_LOOPBACK
  262. config RT_LWIP_STATS
  263. bool "Enable lwIP statistics"
  264. default n
  265. config RT_LWIP_USING_HW_CHECKSUM
  266. bool "Enable hardware checksum"
  267. default n
  268. config RT_LWIP_USING_PING
  269. bool "Enable ping features"
  270. default y
  271. select NETDEV_USING_PING
  272. select RT_LWIP_ICMP
  273. select RT_LWIP_RAW
  274. menuconfig RT_LWIP_DEBUG
  275. bool "Enable lwIP Debugging Options"
  276. default n
  277. if RT_LWIP_DEBUG
  278. config RT_LWIP_SYS_DEBUG
  279. bool "Enable Debugging of sys.c"
  280. default n
  281. config RT_LWIP_ETHARP_DEBUG
  282. bool "Enable Debugging of etharp.c"
  283. default n
  284. config RT_LWIP_PPP_DEBUG
  285. bool "Enable Debugging of PPP"
  286. default n
  287. config RT_LWIP_MEM_DEBUG
  288. bool "Enable Debugging of mem.c"
  289. default n
  290. config RT_LWIP_MEMP_DEBUG
  291. bool "Enable Debugging of memp.c"
  292. default n
  293. config RT_LWIP_PBUF_DEBUG
  294. bool "Enable Debugging of pbuf.c"
  295. default n
  296. config RT_LWIP_API_LIB_DEBUG
  297. bool "Enable Debugging of api_lib.c"
  298. default n
  299. config RT_LWIP_API_MSG_DEBUG
  300. bool "Enable Debugging of api_msg.c"
  301. default n
  302. config RT_LWIP_TCPIP_DEBUG
  303. bool "Enable Debugging of tcpip.c"
  304. default n
  305. config RT_LWIP_NETIF_DEBUG
  306. bool "Enable Debugging of netif.c"
  307. default n
  308. config RT_LWIP_SOCKETS_DEBUG
  309. bool "Enable Debugging of sockets.c"
  310. default n
  311. config RT_LWIP_DNS_DEBUG
  312. bool "Enable Debugging of DNS"
  313. default n
  314. config RT_LWIP_AUTOIP_DEBUG
  315. bool "Enable Debugging of autoip.c"
  316. default n
  317. config RT_LWIP_DHCP_DEBUG
  318. bool "Enable Debugging of dhcp.c"
  319. default n
  320. config RT_LWIP_IP_DEBUG
  321. bool "Enable Debugging of IP"
  322. default n
  323. config RT_LWIP_IP_REASS_DEBUG
  324. bool "Enable debugging in ip_frag.c for both frag & reass"
  325. default n
  326. config RT_LWIP_ICMP_DEBUG
  327. bool "Enable Debugging of icmp.c"
  328. default n
  329. config RT_LWIP_IGMP_DEBUG
  330. bool "Enable Debugging of igmp.c"
  331. default n
  332. config RT_LWIP_UDP_DEBUG
  333. bool "Enable Debugging of UDP"
  334. default n
  335. config RT_LWIP_TCP_DEBUG
  336. bool "Enable Debugging of TCP"
  337. default n
  338. config RT_LWIP_TCP_INPUT_DEBUG
  339. bool "Enable Debugging of tcp_in.c"
  340. default n
  341. config RT_LWIP_TCP_OUTPUT_DEBUG
  342. bool "Enable Debugging of tcp_out.c"
  343. default n
  344. config RT_LWIP_TCP_RTO_DEBUG
  345. bool "Enable debugging in TCP for retransmit"
  346. default n
  347. config RT_LWIP_TCP_CWND_DEBUG
  348. bool "Enable debugging for TCP congestion window"
  349. default n
  350. config RT_LWIP_TCP_WND_DEBUG
  351. bool "Enable debugging in tcp_in.c for window updating"
  352. default n
  353. config RT_LWIP_TCP_FR_DEBUG
  354. bool "Enable debugging in tcp_in.c for fast retransmit"
  355. default n
  356. config RT_LWIP_TCP_QLEN_DEBUG
  357. bool "Enable debugging for TCP queue lengths"
  358. default n
  359. config RT_LWIP_TCP_RST_DEBUG
  360. bool "Enable debugging for TCP with the RST message"
  361. default n
  362. endif
  363. endif
  364. endmenu
  365. source "$RTT_DIR/components/net/at/Kconfig"
  366. if RT_USING_LWIP
  367. config LWIP_USING_DHCPD
  368. bool "Enable DHCP server"
  369. default n
  370. if LWIP_USING_DHCPD
  371. config DHCPD_SERVER_IP
  372. string "DHCPD SERVER IP address"
  373. default 192.168.169.1
  374. config DHCPD_USING_ROUTER
  375. bool "alloc gateway ip for router"
  376. default y
  377. config LWIP_USING_CUSTOMER_DNS_SERVER
  378. bool "Enable customer DNS server config"
  379. default n
  380. if LWIP_USING_CUSTOMER_DNS_SERVER
  381. config DHCP_DNS_SERVER_IP
  382. string "Custom DNS server IP address"
  383. default 1.1.1.1
  384. endif
  385. endif
  386. endif
  387. endmenu