Kconfig 14 KB

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