Kconfig 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. menu "Network"
  2. menu "Socket abstraction layer"
  3. config RT_USING_SAL
  4. bool "Enable socket abstraction layer"
  5. default n
  6. if RT_USING_SAL
  7. if RT_USING_LWIP || AT_USING_SOCKET
  8. menu "protocol stack implement"
  9. config SAL_USING_LWIP
  10. bool "Support lwIP stack"
  11. default y
  12. depends on RT_USING_LWIP
  13. config SAL_USING_AT
  14. bool "Support AT Commands stack"
  15. default y
  16. depends on AT_USING_SOCKET
  17. endmenu
  18. endif
  19. config SAL_USING_POSIX
  20. bool "Enable BSD socket operated by file system API"
  21. default n
  22. select RT_USING_DFS
  23. select RT_USING_LIBC
  24. select RT_USING_POSIX
  25. help
  26. Let BSD socket operated by file system API, such as read/write and involveed in select/poll POSIX APIs.
  27. if !SAL_USING_POSIX
  28. config SAL_SOCKETS_NUM
  29. int "the maximum number of sockets"
  30. default 16
  31. endif
  32. config SAL_PROTO_FAMILIES_NUM
  33. int "the maximum number of protocol families"
  34. default 4
  35. endif
  36. endmenu
  37. menu "light weight TCP/IP stack"
  38. config RT_USING_LWIP
  39. bool "Enable lwIP stack"
  40. select RT_USING_DEVICE
  41. default n
  42. if RT_USING_LWIP
  43. choice
  44. prompt "lwIP version"
  45. default RT_USING_LWIP202
  46. help
  47. Select the lwIP version
  48. config RT_USING_LWIP141
  49. bool "lwIP v1.4.1"
  50. config RT_USING_LWIP202
  51. bool "lwIP v2.0.2"
  52. endchoice
  53. if RT_USING_LWIP202
  54. config RT_USING_LWIP_IPV6
  55. bool "IPV6 protocol"
  56. default n
  57. endif
  58. config RT_LWIP_IGMP
  59. bool "IGMP protocol"
  60. default y
  61. config RT_LWIP_ICMP
  62. bool "ICMP protocol"
  63. default y
  64. config RT_LWIP_SNMP
  65. bool "SNMP protocol"
  66. select RT_LWIP_STATS
  67. default n
  68. config RT_LWIP_DNS
  69. bool "Enble DNS for name resolution"
  70. select RT_LWIP_UDP
  71. default y
  72. config RT_LWIP_DHCP
  73. bool "Enable alloc ip address through DHCP"
  74. select RT_LWIP_UDP
  75. default y
  76. if RT_LWIP_DHCP
  77. config IP_SOF_BROADCAST
  78. int "SOF broadcast"
  79. default 1
  80. config IP_SOF_BROADCAST_RECV
  81. int "SOF broadcast recv"
  82. default 1
  83. endif
  84. menu "Static IPv4 Address"
  85. config RT_LWIP_IPADDR
  86. string "IPv4: IP address"
  87. default 192.168.1.30
  88. config RT_LWIP_GWADDR
  89. string "IPv4: Gateway address"
  90. default 192.168.1.1
  91. config RT_LWIP_MSKADDR
  92. string "IPv4: Mask address"
  93. default 255.255.255.0
  94. endmenu
  95. config RT_LWIP_UDP
  96. bool "UDP protocol"
  97. default y
  98. config RT_LWIP_TCP
  99. bool "TCP protocol"
  100. default y
  101. config RT_LWIP_RAW
  102. bool "RAW protocol"
  103. default n
  104. config RT_LWIP_PPP
  105. bool "PPP protocol"
  106. default n
  107. if RT_LWIP_PPP
  108. config RT_LWIP_PPPOE
  109. bool "PPPoE protocol"
  110. default n
  111. config RT_LWIP_PPPOS
  112. bool "PPPoS protocol"
  113. default n
  114. endif
  115. config RT_MEMP_NUM_NETCONN
  116. int "the number of struct netconns"
  117. default 8
  118. config RT_LWIP_PBUF_NUM
  119. int "the number of PBUF"
  120. default 16
  121. config RT_LWIP_RAW_PCB_NUM
  122. int "the number of raw connection"
  123. default 4
  124. config RT_LWIP_UDP_PCB_NUM
  125. int "the number of UDP socket"
  126. default 8 if RT_USING_DFS_NFS
  127. default 4
  128. if RT_LWIP_TCP
  129. config RT_LWIP_TCP_PCB_NUM
  130. int "the number of TCP socket"
  131. default 4
  132. config RT_LWIP_TCP_SEG_NUM
  133. int "the number of TCP segment"
  134. default 40
  135. config RT_LWIP_TCP_SND_BUF
  136. int "the size of send buffer"
  137. default 8196
  138. config RT_LWIP_TCP_WND
  139. int "the size of TCP send window"
  140. default 8196
  141. endif
  142. config RT_LWIP_TCPTHREAD_PRIORITY
  143. int "the priority level value of lwIP thread"
  144. default 10
  145. config RT_LWIP_TCPTHREAD_MBOX_SIZE
  146. int "the number of mail in the lwIP thread mailbox"
  147. default 8
  148. config RT_LWIP_TCPTHREAD_STACKSIZE
  149. int "the stack size of lwIP thread"
  150. default 1024
  151. config LWIP_NO_RX_THREAD
  152. bool "Not use Rx thread"
  153. default n
  154. config LWIP_NO_TX_THREAD
  155. bool "Not use Tx thread"
  156. default n
  157. config RT_LWIP_ETHTHREAD_PRIORITY
  158. int "the priority level value of ethernet thread"
  159. default 12
  160. config RT_LWIP_ETHTHREAD_STACKSIZE
  161. int "the stack size of ethernet thread"
  162. default 1024
  163. config RT_LWIP_ETHTHREAD_MBOX_SIZE
  164. int "the number of mail in the ethernet thread mailbox"
  165. default 8
  166. config RT_LWIP_REASSEMBLY_FRAG
  167. bool "Enable IP reassembly and frag"
  168. default n
  169. config LWIP_NETIF_STATUS_CALLBACK
  170. int "netif status callback"
  171. default 1
  172. config SO_REUSE
  173. int "Enable SO_REUSEADDR option"
  174. default 1
  175. config LWIP_SO_RCVTIMEO
  176. int "Enable receive timeout for sockets/netconns and SO_RCVTIMEO processing."
  177. default 1
  178. config LWIP_SO_SNDTIMEO
  179. int "Enable send timeout for sockets/netconns and SO_SNDTIMEO processing."
  180. default 1
  181. config LWIP_SO_RCVBUF
  182. int "Enable SO_RCVBUF processing"
  183. default 1
  184. config RT_LWIP_NETIF_LOOPBACK
  185. bool "Enable netif loopback"
  186. default n
  187. config LWIP_NETIF_LOOPBACK
  188. int
  189. default 1 if RT_LWIP_NETIF_LOOPBACK
  190. default 0 if !RT_LWIP_NETIF_LOOPBACK
  191. config RT_LWIP_STATS
  192. bool "Enable lwIP statistics"
  193. default n
  194. menuconfig RT_LWIP_DEBUG
  195. bool "Enable lwIP Debugging Options"
  196. default n
  197. if RT_LWIP_DEBUG
  198. config RT_LWIP_SYS_DEBUG
  199. bool "Enable Debugging of sys.c"
  200. default n
  201. config RT_LWIP_ETHARP_DEBUG
  202. bool "Enable Debugging of etharp.c"
  203. default n
  204. config RT_LWIP_PPP_DEBUG
  205. bool "Enable Debugging of PPP"
  206. default n
  207. config RT_LWIP_MEM_DEBUG
  208. bool "Enable Debugging of mem.c"
  209. default n
  210. config RT_LWIP_MEMP_DEBUG
  211. bool "Enable Debugging of memp.c"
  212. default n
  213. config RT_LWIP_PBUF_DEBUG
  214. bool "Enable Debugging of pbuf.c"
  215. default n
  216. config RT_LWIP_API_LIB_DEBUG
  217. bool "Enable Debugging of api_lib.c"
  218. default n
  219. config RT_LWIP_API_MSG_DEBUG
  220. bool "Enable Debugging of api_msg.c"
  221. default n
  222. config RT_LWIP_TCPIP_DEBUG
  223. bool "Enable Debugging of tcpip.c"
  224. default n
  225. config RT_LWIP_NETIF_DEBUG
  226. bool "Enable Debugging of netif.c"
  227. default n
  228. config RT_LWIP_SOCKETS_DEBUG
  229. bool "Enable Debugging of sockets.c"
  230. default n
  231. config RT_LWIP_DNS_DEBUG
  232. bool "Enable Debugging of DNS"
  233. default n
  234. config RT_LWIP_AUTOIP_DEBUG
  235. bool "Enable Debugging of autoip.c"
  236. default n
  237. config RT_LWIP_DHCP_DEBUG
  238. bool "Enable Debugging of dhcp.c"
  239. default n
  240. config RT_LWIP_IP_DEBUG
  241. bool "Enable Debugging of IP"
  242. default n
  243. config RT_LWIP_IP_REASS_DEBUG
  244. bool "Enable debugging in ip_frag.c for both frag & reass"
  245. default n
  246. config RT_LWIP_ICMP_DEBUG
  247. bool "Enable Debugging of icmp.c"
  248. default n
  249. config RT_LWIP_IGMP_DEBUG
  250. bool "Enable Debugging of igmp.c"
  251. default n
  252. config RT_LWIP_UDP_DEBUG
  253. bool "Enable Debugging of UDP"
  254. default n
  255. config RT_LWIP_TCP_DEBUG
  256. bool "Enable Debugging of TCP"
  257. default n
  258. config RT_LWIP_TCP_INPUT_DEBUG
  259. bool "Enable Debugging of tcp_in.c"
  260. default n
  261. config RT_LWIP_TCP_OUTPUT_DEBUG
  262. bool "Enable Debugging of tcp_out.c"
  263. default n
  264. config RT_LWIP_TCP_RTO_DEBUG
  265. bool "Enable debugging in TCP for retransmit"
  266. default n
  267. config RT_LWIP_TCP_CWND_DEBUG
  268. bool "Enable debugging for TCP congestion window"
  269. default n
  270. config RT_LWIP_TCP_WND_DEBUG
  271. bool "Enable debugging in tcp_in.c for window updating"
  272. default n
  273. config RT_LWIP_TCP_FR_DEBUG
  274. bool "Enable debugging in tcp_in.c for fast retransmit"
  275. default n
  276. config RT_LWIP_TCP_QLEN_DEBUG
  277. bool "Enable debugging for TCP queue lengths"
  278. default n
  279. config RT_LWIP_TCP_RST_DEBUG
  280. bool "Enable debugging for TCP with the RST message"
  281. default n
  282. endif
  283. endif
  284. endmenu
  285. source "$RTT_DIR/components/net/freemodbus/Kconfig"
  286. source "$RTT_DIR/components/net/at/Kconfig"
  287. if RT_USING_LWIP
  288. config LWIP_USING_DHCPD
  289. bool "Enable DHCP server"
  290. default n
  291. if LWIP_USING_DHCPD
  292. config DHCPD_SERVER_IP
  293. string "DHCPD SERVER IP address"
  294. default 192.168.169.1
  295. config DHCPD_USING_ROUTER
  296. bool "alloc gateway ip for router"
  297. default y
  298. config LWIP_USING_CUSTOMER_DNS_SERVER
  299. bool "Enable customer DNS server config"
  300. default n
  301. if LWIP_USING_CUSTOMER_DNS_SERVER
  302. config DHCP_DNS_SERVER_IP
  303. string "Custom DNS server IP address"
  304. default 1.1.1.1
  305. endif
  306. endif
  307. endif
  308. endmenu