Kconfig 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. menu "Network"
  2. menu "Socket abstraction layer"
  3. config RT_USING_SAL
  4. bool "Enable socket abstraction layer"
  5. default n
  6. select RT_USING_DFS
  7. if RT_USING_SAL
  8. menu "protocol stack implement"
  9. config SAL_USING_LWIP
  10. bool "Support lwIP stack"
  11. default y if RT_USING_LWIP
  12. default n
  13. depends on RT_USING_LWIP
  14. config SAL_USING_AT
  15. bool "Support AT Commands stack"
  16. default y if RT_USING_AT_SOCKET
  17. default n
  18. depends on RT_USING_AT_SOCKET
  19. endmenu
  20. config SAL_USING_POSIX
  21. bool "Enable BSD socket operated by file system API"
  22. select RT_USING_LIBC
  23. select RT_USING_POSIX
  24. default n
  25. help
  26. Let BSD socket operated by file system API, such as read/write and involveed in select/poll POSIX APIs.
  27. config SAL_PROTO_FAMILIES_NUM
  28. int "the number of protocol family"
  29. default 4
  30. endif
  31. endmenu
  32. menu "light weight TCP/IP stack"
  33. config RT_USING_LWIP
  34. bool "Enable lwIP stack"
  35. select RT_USING_DEVICE
  36. default n
  37. if RT_USING_LWIP
  38. choice
  39. prompt "lwIP version"
  40. default RT_USING_LWIP202
  41. help
  42. Select the lwIP version
  43. config RT_USING_LWIP141
  44. bool "lwIP v1.4.1"
  45. config RT_USING_LWIP202
  46. bool "lwIP v2.0.2"
  47. endchoice
  48. if RT_USING_LWIP202
  49. config RT_USING_LWIP_IPV6
  50. bool "IPV6 protocol"
  51. default n
  52. endif
  53. config RT_LWIP_IGMP
  54. bool "IGMP protocol"
  55. default y
  56. config RT_LWIP_ICMP
  57. bool "ICMP protocol"
  58. default y
  59. config RT_LWIP_SNMP
  60. bool "SNMP protocol"
  61. default n
  62. config RT_LWIP_DNS
  63. bool "Enble DNS for name resolution"
  64. select RT_LWIP_UDP
  65. default y
  66. config RT_LWIP_DHCP
  67. bool "Enable alloc ip address through DHCP"
  68. select RT_LWIP_UDP
  69. default y
  70. if RT_LWIP_DHCP
  71. config IP_SOF_BROADCAST
  72. int "SOF broadcast"
  73. default 1
  74. config IP_SOF_BROADCAST_RECV
  75. int "SOF broadcast recv"
  76. default 1
  77. endif
  78. menu "Static IPv4 Address"
  79. config RT_LWIP_IPADDR
  80. string "IPv4: IP address"
  81. default 192.168.1.30
  82. config RT_LWIP_GWADDR
  83. string "IPv4: Gateway address"
  84. default 192.168.1.1
  85. config RT_LWIP_MSKADDR
  86. string "IPv4: Mask address"
  87. default 255.255.255.0
  88. endmenu
  89. config RT_LWIP_UDP
  90. bool "UDP protocol"
  91. default y
  92. config RT_LWIP_TCP
  93. bool "TCP protocol"
  94. default y
  95. config RT_LWIP_RAW
  96. bool "RAW protocol"
  97. default n
  98. config RT_LWIP_PPP
  99. bool "PPP protocol"
  100. default n
  101. if RT_LWIP_PPP
  102. config RT_LWIP_PPPOE
  103. bool "PPPoE protocol"
  104. default n
  105. config RT_LWIP_PPPOS
  106. bool "PPPoS protocol"
  107. default n
  108. endif
  109. config RT_MEMP_NUM_NETCONN
  110. int "the number of struct netconns"
  111. default 8
  112. config RT_LWIP_PBUF_NUM
  113. int "the number of PBUF"
  114. default 16
  115. config RT_LWIP_RAW_PCB_NUM
  116. int "the number of raw connection"
  117. default 4
  118. config RT_LWIP_UDP_PCB_NUM
  119. int "the number of UDP socket"
  120. default 8 if RT_USING_DFS_NFS
  121. default 4
  122. if RT_LWIP_TCP
  123. config RT_LWIP_TCP_PCB_NUM
  124. int "the number of TCP socket"
  125. default 4
  126. config RT_LWIP_TCP_SEG_NUM
  127. int "the number of TCP segment"
  128. default 40
  129. config RT_LWIP_TCP_SND_BUF
  130. int "the size of send buffer"
  131. default 8196
  132. config RT_LWIP_TCP_WND
  133. int "the size of TCP send window"
  134. default 8196
  135. endif
  136. config RT_LWIP_TCPTHREAD_PRIORITY
  137. int "the priority level value of lwIP thread"
  138. default 10
  139. config RT_LWIP_TCPTHREAD_MBOX_SIZE
  140. int "the number of mail in the lwIP thread mailbox"
  141. default 8
  142. config RT_LWIP_TCPTHREAD_STACKSIZE
  143. int "the stack size of lwIP thread"
  144. default 1024
  145. config LWIP_NO_RX_THREAD
  146. bool "Not use Rx thread"
  147. default n
  148. config LWIP_NO_TX_THREAD
  149. bool "Not use Tx thread"
  150. default n
  151. config RT_LWIP_ETHTHREAD_PRIORITY
  152. int "the priority level value of ethernet thread"
  153. default 12
  154. config RT_LWIP_ETHTHREAD_STACKSIZE
  155. int "the stack size of ethernet thread"
  156. default 1024
  157. config RT_LWIP_ETHTHREAD_MBOX_SIZE
  158. int "the number of mail in the ethernet thread mailbox"
  159. default 8
  160. config RT_LWIP_REASSEMBLY_FRAG
  161. bool "Enable IP reassembly and frag"
  162. default n
  163. config LWIP_NETIF_STATUS_CALLBACK
  164. int "netif status callback"
  165. default 1
  166. config SO_REUSE
  167. int "Enable SO_REUSEADDR option"
  168. default 1
  169. config LWIP_SO_RCVTIMEO
  170. int "Enable receive timeout for sockets/netconns and SO_RCVTIMEO processing."
  171. default 1
  172. config LWIP_SO_SNDTIMEO
  173. int "Enable send timeout for sockets/netconns and SO_SNDTIMEO processing."
  174. default 1
  175. config LWIP_SO_RCVBUF
  176. int "Enable SO_RCVBUF processing"
  177. default 1
  178. config RT_LWIP_NETIF_LOOPBACK
  179. bool "Enable netif loopback"
  180. default n
  181. config LWIP_NETIF_LOOPBACK
  182. int
  183. default 1 if RT_LWIP_NETIF_LOOPBACK
  184. default 0 if !RT_LWIP_NETIF_LOOPBACK
  185. endif
  186. endmenu
  187. source "$RTT_DIR/components/net/freemodbus/Kconfig"
  188. if RT_USING_LWIP
  189. config LWIP_USING_DHCPD
  190. bool "Enable DHCP server"
  191. default n
  192. if LWIP_USING_DHCPD
  193. config DHCPD_SERVER_IP
  194. string "DHCPD SERVER IP address"
  195. default 192.168.169.1
  196. config DHCPD_USING_ROUTER
  197. bool "alloc gateway ip for router"
  198. default y
  199. config LWIP_USING_CUSTOMER_DNS_SERVER
  200. bool "Enable customer DNS server config"
  201. default n
  202. if LWIP_USING_CUSTOMER_DNS_SERVER
  203. config DHCP_DNS_SERVER_IP
  204. string "Custom DNS server IP address"
  205. default 1.1.1.1
  206. endif
  207. endif
  208. endif
  209. endmenu