Author: Gregory Nutt <gnutt@nuttx.org>
Run all .h and .c files modified in last PR through nxstyle.
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Net cleanup (#17)
* Fix the semaphore usage issue found in tcp/udp
1. The count semaphore need disable priority inheritance
2. Loop again if net_lockedwait return -EINTR
3. Call nxsem_trywait to avoid the race condition
4. Call nxsem_post instead of sem_post
* Put the work notifier into free list to avoid the heap fragment in the long run. Since the allocation strategy is encapsulated internally, we can even refine the implementation later.
* Network stack shouldn't allocate memory in the poll implementation to avoid the heap fragment in the long run, other modification include:
1. Select MM_IOB automatically since ICMP[v6] socket can't work without the read ahead buffer
2. Remove the net lock since xxx_callback_free already do the same thing
3. TCP/UDP poll should work even the read ahead buffer isn't enabled at all
* Add NET_ prefix for UDP_NOTIFIER and TCP_NOTIFIER option to align with other UDP/TCP option convention
* Remove the unused _SF_[IDLE|ACCEPT|SEND|RECV|MASK] flags since there are code to set/clear these flags, but nobody check them.
47 lines
1.1 KiB
Text
47 lines
1.1 KiB
Text
#
|
|
# For a description of the syntax of this configuration file,
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
#
|
|
|
|
if NET_IPv4
|
|
menu "ICMP Networking Support"
|
|
|
|
config NET_ICMP
|
|
bool "Enable ICMP networking"
|
|
default n
|
|
---help---
|
|
Enable minimal ICMP support. Includes built-in support
|
|
for sending replies to received ECHO (ping) requests.
|
|
|
|
config NET_ICMP_NO_STACK
|
|
bool "Disable ICMP stack"
|
|
default n
|
|
select NET_ICMP
|
|
---help---
|
|
Build without ICMP stack even if ICMP networking support enabled.
|
|
|
|
if NET_ICMP && !NET_ICMP_NO_STACK
|
|
|
|
config NET_ICMP_SOCKET
|
|
bool "IPPROTO_ICMP socket support"
|
|
default n
|
|
select MM_IOB
|
|
---help---
|
|
Enable support for IPPROTO_ICMP sockets. These sockets are needed
|
|
for application level support for sending ECHO (ping) requests and
|
|
receiving associated ECHO replies.
|
|
|
|
if NET_ICMP_SOCKET
|
|
|
|
config NET_ICMP_NCONNS
|
|
int "Max ICMP packet sockets"
|
|
default 4
|
|
|
|
config NET_ICMP_NPOLLWAITERS
|
|
int "Number of ICMP poll waiters"
|
|
default 1
|
|
|
|
endif # NET_ICMP_SOCKET
|
|
endif # NET_ICMP && !NET_ICMP_NO_STACK
|
|
endmenu # ICMP Networking Support
|
|
endif # NET_IPv4
|