2014-06-19 01:45:55 +08:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
2015-06-28 22:08:57 +08:00
|
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
2014-06-19 01:45:55 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
menu "Raw Socket Support"
|
|
|
|
|
|
|
|
config NET_PKT
|
|
|
|
bool "Socket packet socket support"
|
|
|
|
default n
|
2018-06-26 02:08:10 +08:00
|
|
|
select NETDEV_IFINDEX
|
2014-06-19 01:45:55 +08:00
|
|
|
---help---
|
|
|
|
Enable or disable support for packet sockets.
|
|
|
|
|
|
|
|
Packet sockets allow receiving and transmitting frames without
|
|
|
|
a transport protocol in between. Frames received are copied into
|
2016-05-30 23:31:44 +08:00
|
|
|
a packet socket tap before they enter the network. Data written into
|
|
|
|
a packet socket will bypass the network altogether and be placed in
|
|
|
|
the transmission buffer of the network interface driver.
|
2014-06-19 01:45:55 +08:00
|
|
|
|
2017-07-15 03:42:31 +08:00
|
|
|
REVISIT: Currently only implemented for Ethernet.
|
|
|
|
|
2014-06-19 01:45:55 +08:00
|
|
|
if NET_PKT
|
|
|
|
|
2023-02-13 21:05:40 +08:00
|
|
|
config NET_PKT_PREALLOC_CONNS
|
|
|
|
int "Preallocated packet sockets"
|
2014-06-19 01:45:55 +08:00
|
|
|
default 1
|
2023-02-13 21:05:40 +08:00
|
|
|
---help---
|
|
|
|
Number of packet connections (all tasks).
|
2023-02-26 02:14:11 +08:00
|
|
|
|
2023-02-13 21:05:40 +08:00
|
|
|
This number of connections will be pre-allocated during system boot.
|
|
|
|
If dynamic connections allocation is enabled, more connections may
|
|
|
|
be allocated at a later time, as the system needs them. Else this
|
|
|
|
will be the maximum number of connections available to the system
|
|
|
|
at all times.
|
|
|
|
|
|
|
|
Set to 0 to disable (and rely only on dynamic allocations).
|
|
|
|
|
|
|
|
config NET_PKT_ALLOC_CONNS
|
|
|
|
int "Dynamic packet connections allocation"
|
|
|
|
default 0
|
|
|
|
---help---
|
|
|
|
Dynamic memory allocations for packet sockets.
|
|
|
|
|
|
|
|
When set to 0 all dynamic allocations are disabled.
|
|
|
|
|
|
|
|
When set to 1 a new connection will be allocated every time,
|
|
|
|
and it will be free'd when no longer needed.
|
|
|
|
|
|
|
|
Setting this to 2 or more will allocate the connections in
|
|
|
|
batches (with batch size equal to this config). When a
|
|
|
|
connection is no longer needed, it will be returned to the
|
|
|
|
free connections pool, and it will never be deallocated!
|
|
|
|
|
|
|
|
config NET_PKT_MAX_CONNS
|
|
|
|
int "Maximum number of packet connections"
|
|
|
|
default 0
|
|
|
|
depends on NET_PKT_ALLOC_CONNS > 0
|
|
|
|
---help---
|
|
|
|
If dynamic connections allocation is selected (NET_PKT_ALLOC_CONNS > 0)
|
|
|
|
this will limit the number of connections that can be allocated.
|
2023-02-26 02:14:11 +08:00
|
|
|
|
2023-02-13 21:05:40 +08:00
|
|
|
This is useful in case the system is under very heavy load (or
|
|
|
|
under attack), ensuring that the heap will not be exhausted.
|
2014-06-19 01:45:55 +08:00
|
|
|
|
|
|
|
endif # NET_PKT
|
2014-06-26 01:01:08 +08:00
|
|
|
endmenu # Raw Socket Support
|