Kconfig 11 KB

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