Kconfig 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see the file kconfig-language.txt in the NuttX tools repository.
  4. #
  5. config ARCH_HAVE_NET
  6. bool
  7. default n
  8. config ARCH_HAVE_PHY
  9. bool
  10. default n
  11. config ARCH_PHY_INTERRUPT
  12. bool
  13. default n
  14. config ARCH_PHY_POLLED
  15. bool
  16. default n
  17. config ARCH_HAVE_NETDEV_STATISTICS
  18. bool
  19. default n
  20. config NET_WRITE_BUFFERS
  21. bool
  22. default n
  23. select MM_IOB
  24. config NET_READAHEAD
  25. bool
  26. default n
  27. select MM_IOB
  28. config NET_MCASTGROUP
  29. bool
  30. default n
  31. config NET
  32. bool "Networking support"
  33. default n
  34. select ARCH_HAVE_NET
  35. ---help---
  36. Enable or disable all network features
  37. if NET
  38. config NET_PROMISCUOUS
  39. bool "Promiscuous mode"
  40. default n
  41. ---help---
  42. Force the Ethernet driver to operate in promiscuous mode (if supported
  43. by the Ethernet driver).
  44. menu "Driver buffer configuration"
  45. config NET_ETH_PKTSIZE
  46. int "Ethernet packet buffer size"
  47. default 1294 if NET_IPv6
  48. default 590 if !NET_IPv6
  49. range 1294 1518 if NET_IPv6
  50. range 590 1518 if !NET_IPv6
  51. depends on NET_ETHERNET
  52. ---help---
  53. Packet buffer size. This size includes the TCP/UDP payload plus the
  54. size of TCP/UDP header, the IP header, and the Ethernet header.
  55. This value is related to the MTU (Maximum Transmission Unit), except
  56. that it includes the size of the link layer header; the payload is
  57. the MSS (Maximum Segment Size).
  58. IPv4 hosts are required to be able to handle an MSS of at least
  59. 536 octets, resulting in a minimum buffer size of 536+20+20+14 =
  60. 590.
  61. IPv6 hosts are required to be able to handle an MSS of 1220 octets,
  62. resulting in a minimum buffer size of 1220+20+40+14 = 1294
  63. To get an MTU of 1500, for example, you would need packet buffer of
  64. size 1514.
  65. config NET_SLIP_PKTSIZE
  66. int "SLIP packet buffer size"
  67. default 296
  68. depends on NET_SLIP
  69. range 296 1518
  70. ---help---
  71. Provides the size of the SLIP packet buffers. This size includes
  72. the TCP/UDP payload plus the size of TCP/UDP header and the IP header.
  73. This value is related to the MTU (Maximum Transmission Unit), except
  74. that it includes the size of the link layer header; the payload is
  75. the MSS (Maximum Segment Size). SLIP has no link layer header so for
  76. SLIP the MTU is the same as the PKTSIZE.
  77. SLIP is required to support at least 256+20+20 = 296. Values other than
  78. 296 are not recommended.
  79. The Linux slip module hard-codes its MTU size to 296 (40 bytes for
  80. the IP+TCP headers plus 256 bytes of data). So you might as well
  81. set CONFIG_NET_SLIP_PKTSIZE to 296 as well.
  82. There may be an issue with this setting, however. I see that Linux
  83. uses a MTU of 296 and window of 256, but actually only sends 168
  84. bytes of data: 40 + 128. I believe that is to allow for the 2x
  85. worst cast packet expansion. Ideally we would like to advertise the
  86. 256 MSS, but restrict transfers to 128 bytes (possibly by modifying
  87. the MSS value in the TCP connection structure).
  88. config NET_GUARDSIZE
  89. int "Driver I/O guard size"
  90. default 2
  91. ---help---
  92. Network drivers often receive packets with garbage at the end and
  93. are longer than the size of packet in the TCP header. The following
  94. "fudge" factor increases the size of the I/O buffering by a small
  95. amount to allocate slightly oversize packets. After receipt, the
  96. packet size will be chopped down to the size indicated in the TCP
  97. header.
  98. endmenu # Driver buffer configuration
  99. menu "Link layer support"
  100. config NET_ETHERNET
  101. bool "Ethernet support"
  102. default y
  103. ---help---
  104. If NET_SLIP is not selected, then Ethernet will be used (there is
  105. no need to define anything special in the configuration file to use
  106. Ethernet -- it is the default).
  107. config NET_LOOPBACK
  108. bool "Local loopback"
  109. select ARCH_HAVE_NETDEV_STATISTICS
  110. default n
  111. ---help---
  112. Add support for the local network loopback device, lo.
  113. config NET_LOOPBACK_PKTSIZE
  114. int "Loopback packet buffer size"
  115. default 0
  116. depends on NET_LOOPBACK
  117. range 0 65535
  118. ---help---
  119. The loopback driver packet buffer should be quite large. The larger
  120. the loopback packet buffer, the better will be TCP performance of
  121. the loopback transfers. The Linux loopback device historically used
  122. packet buffers of size 16Kb, but that was increased in recent Linux
  123. versions to 64Kb. Those sizes may be excessive for resource
  124. constrained MCUs, however.
  125. The network enforces a lower limit that is the maximum packet size
  126. of all enabled link layer protocols. The default value of
  127. CONFIG_NET_LOOPBACK_PKTSIZE is zero, meaning that this maximum
  128. packet size will be used by loopback driver.
  129. menuconfig NET_MBIM
  130. bool "MBIM modem support"
  131. depends on USBHOST_CDCMBIM
  132. default n
  133. menuconfig NET_SLIP
  134. bool "SLIP support"
  135. select ARCH_HAVE_NETDEV_STATISTICS
  136. default n
  137. ---help---
  138. Enables building of the SLIP driver. SLIP requires
  139. at least one IP protocol selected.
  140. SLIP supports point-to-point IP communications over a serial port.
  141. The default link layer for network layer is Ethernet. If NET_SLIP
  142. is defined in the NuttX configuration file, then SLIP will be
  143. supported. The basic differences between the SLIP and Ethernet
  144. configurations is that when SLIP is selected:
  145. * The link level header (that comes before the IP header) is omitted.
  146. * All MAC address processing is suppressed.
  147. * ARP is disabled.
  148. If NET_SLIP is not selected, then Ethernet will be used (there is
  149. no need to define anything special in the configuration file to use
  150. Ethernet -- it is the default).
  151. if NET_SLIP
  152. config SLIP_NINTERFACES
  153. int "Number of SLIP interfaces"
  154. default 1
  155. ---help---
  156. Selects the number of physical SLIP
  157. interfaces to support.
  158. Default: 1
  159. config SLIP_STACKSIZE
  160. int "SLIP stack size"
  161. default DEFAULT_TASK_STACKSIZE
  162. ---help---
  163. Select the stack size of the SLIP RX and TX tasks.
  164. config SLIP_DEFPRIO
  165. int "SLIP priority"
  166. default 128
  167. ---help---
  168. The priority of the SLIP RX and TX tasks. Default: 128
  169. endif # NET_SLIP
  170. menuconfig NET_TUN
  171. bool "TUN Virtual Network Device support"
  172. default n
  173. select ARCH_HAVE_NETDEV_STATISTICS
  174. if NET_TUN
  175. config TUN_NINTERFACES
  176. int "Number of TUN interfaces"
  177. default 1
  178. range 1 8
  179. ---help---
  180. Selects the number of TUN
  181. interfaces to support.
  182. Default: 1
  183. config NET_TUN_PKTSIZE
  184. int "TUN packet buffer size"
  185. default 296
  186. range 296 1518
  187. ---help---
  188. Provides the size of the TUN packet buffers. This size includes
  189. the TCP/UDP payload plus the size of TCP/UDP header and the IP header.
  190. This value is related to the MTU (Maximum Transmission Unit), except
  191. that it includes the size of the link layer header; the payload is
  192. the MSS (Maximum Segment Size). TUN has no link layer header so for
  193. TUN the MTU is the same as the PKTSIZE.
  194. endif # NET_TUN
  195. config NETDEV_LATEINIT
  196. bool "Late driver initialization"
  197. default n
  198. ---help---
  199. Normally, networking initialization occur in the later phase of the
  200. boot process in the function up_initialize() when it calls the
  201. driver initialization function, up_netinitialize(). This
  202. initialization occurs after a sufficient about of the OS has been
  203. initialized so that driver registration can be performed, but
  204. before the completion of OS initialization and before the first
  205. application is started.
  206. In a few situations, however, you may want to suppress this early
  207. network driver initialization. As examples:
  208. - If you are using SLIP or PPPD, then there will be no network
  209. driver to be initialized,
  210. - Certain multi-network configurations where a simple call to
  211. up_netinitialize() may be insufficient, and
  212. - Situations where there are other board-level hardware
  213. dependencies so that the hardware is not in an appropriate
  214. state for up_netinitialize() to be called.
  215. Examples of this latter situation includes such things as network
  216. drivers that required some setup via an I2C I/O expander, or network
  217. drivers that depend on USB, SPI, I2C, PCI, serial, or other
  218. interfaces that may not be ready when up_netinitialize() is normally
  219. called.
  220. endmenu # Link layer support
  221. source "net/netdev/Kconfig"
  222. menu "Internet Protocol Selection"
  223. config NET_IPv4
  224. bool "IPv4"
  225. default y
  226. ---help---
  227. Build in support for IPv4.
  228. config NET_IPv6
  229. bool "IPv6"
  230. default n
  231. ---help---
  232. Build in support for IPv6.
  233. source "net/neighbor/Kconfig"
  234. menuconfig NET_6LOWPAN
  235. bool "6LoWPAN support"
  236. default n
  237. select NETDEV_IOCTL
  238. select NET_HAVE_STAR
  239. depends on NET_IPv6
  240. ---help---
  241. Enable support for Low power Wireless Personal Area Networking (6LoWPAN)
  242. for IEEE 802.15.4 or other packet radios.
  243. source "net/sixlowpan/Kconfig"
  244. source "net/ipforward/Kconfig"
  245. endmenu # Internet Protocol Selection
  246. source "net/socket/Kconfig"
  247. source "net/inet/Kconfig"
  248. source "net/pkt/Kconfig"
  249. source "net/local/Kconfig"
  250. source "net/rpmsg/Kconfig"
  251. source "net/can/Kconfig"
  252. source "net/netlink/Kconfig"
  253. source "net/tcp/Kconfig"
  254. source "net/udp/Kconfig"
  255. source "net/bluetooth/Kconfig"
  256. source "net/ieee802154/Kconfig"
  257. source "net/icmp/Kconfig"
  258. source "net/icmpv6/Kconfig"
  259. source "net/mld/Kconfig"
  260. source "net/igmp/Kconfig"
  261. source "net/arp/Kconfig"
  262. source "net/procfs/Kconfig"
  263. source "net/usrsock/Kconfig"
  264. source "net/utils/Kconfig"
  265. config NET_STATISTICS
  266. bool "Collect network statistics"
  267. default n
  268. ---help---
  269. Network layer statistics on or off
  270. config NET_HAVE_STAR
  271. bool
  272. default n
  273. ---help---
  274. Automatically enabled if at least one selected L2 protocol supports
  275. a STAR topology. In order to support the star topology, the L2
  276. protocol must support relaying all packets to a well-known hub node.
  277. menu "Network Topologies"
  278. config NET_STAR
  279. bool "Enable star topology"
  280. default n
  281. depends on NET_HAVE_STAR && NET_IPv6
  282. ---help---
  283. Enable support for a star network topology.
  284. NOTE: Currently only supported by 6LoWPAN.
  285. NOTE: L2 forwarding only supported for IPv6.
  286. choice
  287. prompt "Node role"
  288. depends on NET_STAR
  289. default NET_STARPOINT
  290. ---help---
  291. Specifies the role of this not in the star configuration.
  292. config NET_STARPOINT
  293. bool "Point node in star"
  294. ---help---
  295. The node is a "point" in the star configuration and must send all
  296. packets to the star hub node.
  297. config NET_STARHUB
  298. bool "Hub node of star"
  299. select NET_IPFORWARD
  300. ---help---
  301. This is the "hub" node in the star configurations. It will receive
  302. packets packets from all "point" nodes and perform L2 forwarding of
  303. the packets that are not destined for this node.
  304. endchoice # Node role
  305. endmenu # Network Topologies
  306. source "net/route/Kconfig"
  307. endif # NET