Kconfig 14 KB

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