summaryrefslogtreecommitdiff
path: root/nuttx/net/Kconfig
blob: 1bf791413421f230bb7cc6c93d61caa3deb2a6fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
#
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#

config ARCH_HAVE_NET
	bool
	default n

config ARCH_HAVE_PHY
	bool
	default n

config NET
	bool "Networking support"
	default n
	select ARCH_HAVE_NET
	---help---
		Enable or disable all network features

if NET

config NET_NOINTS
	bool "Not interrupt driven"
	default n
	---help---
		NET_NOINT indicates that uIP is not called from the interrupt level.
		If NET_NOINTS is defined, critical sections will be managed with semaphores;
		Otherwise, it assumed that uIP will be called from interrupt level handling
		and critical sections will be managed by enabling and disabling interrupts.

config NET_MULTIBUFFER
	bool "Use multiple device-side I/O buffers"
	default n
	---help---
		Traditionally, uIP has used a single buffer for all incoming and
		outgoing traffic.  If this configuration is selected, then the
		driver can manage multiple I/O buffers and can, for example,
		be filling one input buffer while sending another output buffer.
		Or, as another example, the driver may support queuing of concurrent
		input/ouput and output transfers for better performance.

config NET_PROMISCUOUS
	bool "Promiscuous mode"
	default n
	---help---
		Force the Ethernet driver to operate in promiscuous mode (if supported
		by the Ethernet driver).

config NET_IPv6
	bool "IPv6"
	default n
	---help---
		Build in support for IPv6.  Not fully implemented.

config NSOCKET_DESCRIPTORS
	int "Number of socket descriptor"
	default 8
	---help---
		Maximum number of socket descriptors per task/thread.

config NET_NACTIVESOCKETS
	int "Max socket operations"
	default 16
	---help---
		Maximum number of concurrent socket operations (recv, send, etc.).
		Default: 16

config NET_SOCKOPTS
	bool "Socket options"
	default n
	---help---
		Enable or disable support for socket options

if NET_SOCKOPTS

config NET_SOLINGER
	bool "SO_LINGER socket option"
	default n
	---help---
		Enable or disable support for the SO_LINGER socket option.

endif # NET_SOCKOPTS

config NET_BUFSIZE
	int "Network packet size"
	default 1294 if !NET_SLIP && NET_IPv6
	default 590 if !NET_SLIP && !NET_IPv6
	default 296 if NET_SLIP && !NET_IPv6
	---help---
		uIP buffer size.  This size includes the size of TCP/UDP header,
		the IP header, and the Ethernet header (assuming that the Ethernet
		transport is used.

		IPv4 hosts are required to be able to handle an MSS of at least
		536 octets, resulting in a minimum buffer size of 536+20+20+14 =
		590 (For SLIP 256+20+20 = 296).

		IPv6 hosts are required to be able to handle an MSS of 1220 octets,
		resulting in a minimum buffer size of of 1220+20+40+14 = 1294

config NET_TCPURGDATA
	bool "Urgent data"
	default n
	---help---
		Determines if support for TCP urgent data notification should be
		compiled in. Urgent data (out-of-band data) is a rarely used TCP feature
		that is very seldom would be required.

menu "TCP/IP Networking"

config NET_TCP
	bool "TCP/IP Networking"
	default n
	---help---
		TCP support on or off

if NET_TCP

config NET_TCP_CONNS
	int "Number of TCP/IP connections"
	default 8
	---help---
		Maximum number of TCP/IP connections (all tasks)

config NET_MAX_LISTENPORTS
	int "Number of listening ports"
	default 20
	---help---
		Maximum number of listening TCP/IP ports (all tasks).  Default: 20

config NET_TCP_READAHEAD
	bool "Enabled TCP/IP read-ahead buffering"
	default y
	---help---
		Read-ahead buffers allows buffering of TCP/IP packets when there is no
		receive in place to catch the TCP packet.  In that case, the packet
		will be retained in the NuttX read-ahead buffers.

		You might want to disable TCP/IP read-ahead buffering on a highly
		memory constrained system that does not have any TCP/IP packet rate
		issues.

if NET_TCP_READAHEAD

config NET_TCP_READAHEAD_BUFSIZE
	int "TCP/IP read-ahead buffer size"
	default 1220 if !NET_SLIP && NET_IPv6
	default 536 if !NET_SLIP && !NET_IPv6
	default 256 if NET_SLIP && !NET_IPv6
	---help---
		Read-ahead buffers allows buffering of TCP/IP packets when there is no
		receive in place to catch the TCP packet.  In that case, the packet
		will be retained in the NuttX read-ahead buffers.

		This setting specifies the size of one TCP/IP read-ahead buffer.
		This should best be a equal to the maximum packet payload size (MSS).

		Optimally, the size of the read-ahead buffer will should the maximum
		size of an incoming TCP packet payload (MSS).  This MSS value is
		determined by NET_BUFSIZE minus the size of TCP, IP, and Ethernet
		headers (assuming you are using the Ethernet transport).  IPv4 hosts
		are required to be able to handle an MSS of 536 octets and IPv6 hosts
		are required to be able to handle an MSS of 1220 octets.

config NET_NTCP_READAHEAD_BUFFERS
	int "Number of TCP/IP read-ahead buffers"
	default 8
	---help---
		Read-ahead buffers allows buffering of TCP/IP packets when there is no
		receive in place to catch the TCP packet.  In that case, the packet
		will be retained in the NuttX read-ahead buffers.

		This setting specifies the number of TCP/IP read-ahead buffers.

endif # NET_TCP_READAHEAD

config NET_TCP_WRITE_BUFFERS
	bool "Enabled TCP/IP write buffering"
	default n
	---help---
		Write buffers allows buffering of ongoing TCP/IP packets, providing
		for higher performance, streamed output.

		You might want to disable TCP/IP write buffering on a highly memory
		memory constrained system where there are no performance issues.

if NET_TCP_WRITE_BUFFERS

config NET_TCP_WRITE_BUFSIZE
	int "TCP/IP write buffer size"
	default 1220 if !NET_SLIP && NET_IPv6
	default 536 if !NET_SLIP && !NET_IPv6
	default 256 if NET_SLIP && !NET_IPv6
	---help---
		Write buffers allows buffering of ongoing TCP/IP packets, providing
		for higher performance, streamed output.

		The size of the write buffer will determine the maximum size of an
		outgoing TCP packet payload (MSS).  This value should NOT exceed the
		maximum MSS which is determined by NET_BUFSIZE minus the size of
		TCP, IP, and Ethernet headers (assuming you are using the Ethernet
		transport).   IPv4 hosts are required to be able to handle an MSS
		of 536 octets and IPv6 hosts are required to be able to handle an
		MSS of 1220 octets.

		This setting specifies the size of one TCP/IP write buffer. This
		should best be a equal to the maximum packet size (NET_BUFSIZE).

config NET_NTCP_WRITE_BUFFERS
	int "Number of TCP/IP write buffers"
	default 8
	---help---
		Write buffers allows buffering of ongoing TCP/IP packets, providing
		for higher performance, streamed output.

		This setting specifies the number of TCP/IP write buffers.

endif # NET_TCP_WRITE_BUFFERS

config NET_TCP_RECVDELAY
	int "TCP Rx delay"
	default 0
	---help---
		If NET_TCP_READAHEAD_BUFFERS is undefined, then there will be no buffering
		of TCP/IP packets:  Any TCP/IP packet received will be ACKed, but its contents
		will be dropped in the bit-bucket.

		One low-performance option is delay for a short period of time after a
		TCP/IP packet is received to see if another comes right behind it. Then
		the packet data from both can be combined.  This option only makes since
		if performance is not an issue and you need to handle short bursts of
		small, back-to-back packets.  The delay is in units of deciseconds.

config NET_TCPBACKLOG
	bool "TCP/IP backlog support"
	default n
	---help---
		Incoming connections pend in a backlog until accept() is called.
		The size of the backlog is selected when listen() is called.

config NET_TCP_SPLIT
	bool "Enable packet splitting"
	default n
	depends on !NET_TCP_WRITE_BUFFERS
	---help---
		send() will not return until the transfer has been ACKed by the
		recipient.  But under RFC 1122, the host need not ACK each packet
		immediately; the host may wait for 500 MS before ACKing.  This
		combination can cause very slow performance with small transfers are
		made to an RFC 1122 client.  However, the RFC 1122 must ACK at least
		every second (odd) packet.

		This option enables logic to trick the RFC 1122 host be exploiting
		this last RFC 1122 requirement:  If an odd number of packets were to
		be sent, then send() will split the last even packet to guarantee
		that an even number of packets will be sent and the RFC 1122 host
		will ACK the final packet immediately.

if NET_TCP_SPLIT

config NET_TCP_SPLIT_SIZE
	int "Split size threshold"
	default 40
	---help---
		Packets of this size or smaller than this will not be split.

endif # NET_TCP_SPLIT

config NET_SENDFILE
	bool "Optimized network sendfile()"
	default n
	---help---
		Support larger, higher performance sendfile() for transferring
		files out a TCP connection.

endif # NET_TCP
endmenu # TCP/IP Networking

menu "UDP Networking"

config NET_UDP
	bool "UDP Networking"
	default n
	depends on NET
	---help---
		Enable or disable UDP networking support.

if NET_UDP

config NET_UDP_CHECKSUMS
	bool "UDP checksums"
	default n
	---help---
		Enable/disable UDP checksum support

config NET_UDP_CONNS
	int "Number of UDP sockets"
	default 8
	---help---
		The maximum amount of open concurrent UDP sockets

config NET_BROADCAST
	bool "UDP broadcast Rx support"
	default n
	---help---
		Incoming UDP broadcast support

config NET_RXAVAIL
	bool "Driver-based UDP backlog"
	default n
	---help---
		One problem with UDP communications is that, unlike TCP/IP, there is
		no backlog of UDP packets.  So if you are listening at the precise
		moment that the UDP packet is sent, it will not be received.  This
		is not incompatible with the properties of UDP, but can result in
		bad performance if packets are missed, time out, and are resent.

		Some Ethernet controllers have built-in RAM and the drivers can
		support retention of UDP packets in that RAM.  If the drivers
		supports such a capability, this option may be enabled to use it.
		NOTE:  If this option is enabled, the driver must support the
		rxavail() method in the uip_driver_s structure.

endif # NET_UDP
endmenu

config NET_ICMP
	bool "ICMP networking support"
	default n
	depends on NET
	---help---
		Enable minimal ICMP support. Includes built-in support
		for sending replies to received ECHO (ping) requests.

if NET_ICMP

config NET_ICMP_PING
	bool "ICMP ping interfaces"
	default n
	---help---
		Provide interfaces to support application level support for
		for sending ECHO (ping) requests and associating ECHO replies.

config NET_PINGADDRCONF
	bool "Ping address configuration"
	default n
	---help---
		Use "ping" packet for setting IP address

endif # NET_ICMP

config NET_IGMP
	bool "IGMPv2 clientsupport"
	default n
	depends on NET
	---help---
		Enable IGMPv2 client support.

if NET_IGMP

config PREALLOC_IGMPGROUPS
	int "Number of pre-allocated IGMP groups"
	default 4
	---help---
		Pre-allocated IGMP groups are used only if needed from interrupt
		level group created (by the IGMP server). Default: 4.

endif # NET_IGMP

config NET_STATISTICS
	bool "Collect network statistics"
	default n
	---help---
		uIP statistics on or off

config NET_RECEIVE_WINDOW
	int "Receive window size"
	default 1220 if !NET_SLIP && NET_IPv6
	default 536 if !NET_SLIP && !NET_IPv6
	default 256 if NET_SLIP && !NET_IPv6
	---help---
		The size of the advertised receiver's window.   Should be set low
		(i.e., to the size of the MSS) if the application is slow to process
		incoming data, or high (32768 bytes) if the application processes
		data quickly.

config NET_ARPTAB_SIZE
	int "ARP table size"
	default 16
	---help---
		The size of the ARP table (in entries).

config NET_ARP_IPIN
	bool "ARP address harvesting"
	default n
	---help---
		Harvest IP/MAC address mappings from the ARP table
		from incoming IP packets.

config NET_ROUTE
	bool "Routing table suport"
	default n
	---help---
		Build in support for a routing table.  See include/net/route.h

config NET_MAXROUTES
	int "Routing table size"
	default 4
	depends on NET_ROUTE
	---help---
		The size of the routing table (in entries).

config NET_MULTICAST
	bool "Multi-cast Tx support"
	default n
	---help---
		Outgoing multi-cast address support

config NET_SLIP
	bool "SLIP support"
	default n
	---help---
		Enables building of the SLIP driver. SLIP requires
		at least one IP protocol selected and the following additional
		network settings: NET_NOINTS and NET_MULTIBUFFER.

		NET_BUFSIZE *must* be set to 296.  Other optional configuration
		settings that affect the SLIP driver: NET_STATISTICS.
		Default: Ethernet

		SLIP supports point-to-point IP communications over a serial port.
		The default data link layer for uIP is Ethernet. If NET_SLIP is
		defined in the NuttX configuration file, then SLIP will be supported.
		The basic differences between the SLIP and Ethernet configurations is
		that when SLIP is selected:

			* The link level header (that comes before the IP header) is omitted.
			* All MAC address processing is suppressed.
			* ARP is disabled.

		If NET_SLIP is not selected, then Ethernet will be used (there is
		no need to define anything special in the configuration file to use
		Ethernet -- it is the default).

if NET_SLIP

config SLIP_NINTERFACES
	int "Number of SLIP interfaces"
	default 1
	---help---
		Selects the number of physical SLIP
		interfaces to support.
		Default: 1

config SLIP_STACKSIZE
	int "SLIP stack size"
	default 2048
	---help---
		Select the stack size of the SLIP RX and TX tasks.  Default: 2048

config SLIP_DEFPRIO
	int "SLIP priority"
	default 128
	---help---
		The priority of the SLIP RX and TX tasks. Default: 128

endif # NET_SLIP
endif # NET