Kconfig 11 KB

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