nuttx/net
liangchaozhong fbe641a916 socket:return -EAGAIN if timeout happends in psock_tcp_send
psock_tcp_send will enter busyloop state when no IOB keeps at unavailable state
when the socket is blocking socket and this will cause WDT.
According to socket's manpage, -1 should be returned while errno set to EAGAIN
if send/recv timeout was set.

Here's the description:
SO_RCVTIMEO and SO_SNDTIMEO
Specify the receiving or sending timeouts until reporting an error. The argument is a struct timeval. If an input or output function blocks for this period of time, and data has been sent or received, the return value of that function will be the amount of data transferred; if no data has been transferred and the timeout has been reached then -1 is returned with errno set to EAGAIN or EWOULDBLOCK, or EINPROGRESS (for connect(2)) just as if the socket was specified to be nonblocking. If the timeout is set to zero (the default) then the operation will never timeout. Timeouts only have effect for system calls that perform socket I/O (e.g., read(2), recvmsg(2), send(2), sendmsg(2)); timeouts have no effect for select(2), poll(2), epoll_wait(2), and so on.

Signed-off-by: liangchaozhong <liangchaozhong@xiaomi.com>
2023-01-28 08:06:57 +02:00
..
arp net/netdev: Avoid hardcoded guardsize when using d_iob 2023-01-18 14:41:07 +08:00
bluetooth net: consistent the net sem wait naming conversion 2023-01-15 12:31:30 -03:00
can Bugfixed the SocketCAN send via setting the dev->d_len to dev->d_sndlen. The dev->d_len wouldn't be assigned otherwise. 2023-01-27 23:08:05 +08:00
devif net/netdev: Avoid hardcoded guardsize when using d_iob 2023-01-18 14:41:07 +08:00
icmp Support fragmentation and reassembly 2023-01-17 14:01:37 +08:00
icmpv6 Support fragmentation and reassembly 2023-01-17 14:01:37 +08:00
ieee802154 net: consistent the net sem wait naming conversion 2023-01-15 12:31:30 -03:00
igmp net: consistent the net sem wait naming conversion 2023-01-15 12:31:30 -03:00
inet net_socket: add accept4 function 2023-01-11 23:28:08 +08:00
ipforward net/netdev: Avoid hardcoded guardsize when using d_iob 2023-01-18 14:41:07 +08:00
ipfrag Support fragmentation and reassembly 2023-01-17 14:01:37 +08:00
local fs/fs_fsync:Fix the expected error of socket,fifo and pipe returning error in fsync case 2023-01-17 01:56:40 +08:00
mld net: consistent the net sem wait naming conversion 2023-01-15 12:31:30 -03:00
nat net/nat: Clear entries when NAT will be disabled 2022-12-24 12:05:20 +08:00
neighbor net/arp: Move arp_ipin and arp_out to private header file 2022-12-04 20:39:21 +08:00
netdev net/netdev: Avoid hardcoded guardsize when using d_iob 2023-01-18 14:41:07 +08:00
netfilter net: Add set/getsockopt options compatible with iptables. 2022-12-28 22:40:53 +08:00
netlink net/arp: Remove nuttx/net/arp.h 2022-12-16 22:10:59 +02:00
pkt net/netdev: Avoid hardcoded guardsize when using d_iob 2023-01-18 14:41:07 +08:00
procfs compiler.h: Add _ between format|printf|syslog|scanf|strftime and like 2022-12-21 01:05:19 +02:00
route include/endian.h: Fix format specifies type 'unsigned long' but the argument has type 'unsigned int' 2022-10-30 16:03:35 +01:00
rpmsg rpmsg_socket: destroy_ept only at close 2023-01-18 02:11:16 +08:00
sixlowpan net: consistent the net sem wait naming conversion 2023-01-15 12:31:30 -03:00
socket net/tcp: correct behavior of SO_LINGER 2023-01-18 02:47:12 +08:00
tcp socket:return -EAGAIN if timeout happends in psock_tcp_send 2023-01-28 08:06:57 +02:00
udp net/udp: correct linger timeout 2023-01-18 02:47:12 +08:00
usrsock Revert "add holder for mutex" 2023-01-19 06:04:48 +09:00
utils Revert "add holder for mutex" 2023-01-19 06:04:48 +09:00
Kconfig Support fragmentation and reassembly 2023-01-17 14:01:37 +08:00
Makefile Support fragmentation and reassembly 2023-01-17 14:01:37 +08:00
net_initialize.c net: Reoder the initialize sequence(mac->ip->tcp/udp) 2022-03-12 19:24:17 +02:00
README.txt Support fragmentation and reassembly 2023-01-17 14:01:37 +08:00

README
======

Directory Structure
===================

  nuttx/
   |
   `- net/
       |
       +- arp        - Address resolution protocol (IPv4)
       +- bluetooth  - PF_BLUETOOTH socket interface
       +- devif      - Stack/device interface layer
       +- ipfrag     - Fragmentation and reassembly
       +- icmp       - Internet Control Message Protocol (IPv4)
       +- icmpv6     - Internet Control Message Protocol (IPv6)
       +- ieee802154 - PF_IEEE802154 socket interface
       +- inet       - PF_INET/PF_INET6 socket interface
       +- ipforward  - IP forwarding logic
       +- local      - Unix domain (local) sockets
       +- mld        - Multicast Listener Discovery (MLD)
       +- neighbor   - Neighbor Discovery Protocol (IPv6)
       +- netdev     - Socket network device interface
       +- netlink    - Netlink IPC socket interface
       +- pkt        - "Raw" packet socket support
       +- sixlowpan  - 6LoWPAN implementation
       +- socket     - BSD socket interface
       +- route      - Routing table support
       +- tcp        - Transmission Control Protocol
       +- udp        - User Datagram Protocol
       +- usrsock    - User socket API for user-space networking stack
       `- utils      - Miscellaneous utility functions

    +-------------------------------------------------------------------++------------------------+
    |                     Application layer                             || usrsock daemon         |
    +-------------------------------------------------------------------++------------------------+
    +-------------------------------------------------------------------++----------------+ +-----+
    |                   Socket layer (socket/)                          || /dev/usrsock   | |     |
    +-------------------------------------------------------------------++----------------+ |     |
    +------------++--------------------------------------------------++-------------------+ |     |
    |  Network   || Protocol stacks (arp, ipv6, icmp, pkt, tcp, udp) || usrsock/          | |     |
    |   Device   |+--------------------------------------------------++-------------------+ |     |
    | Interface  |+------------------------------------++---------------------------------+ |     |
    | (netdev/)  ||  Network Device Interface (devif/) || Utilities                       | |     |
    +------------++------------------------------------++---------------------------------+ |     |
    +----------------------------------------------------------------+                      |     |
    |                    Network Device Drivers                      |                      | HAL |
    +----------------------------------------------------------------+                      +-----+
    +----------------------------------------------------------------+ +--------------------------+
    |                    Networking Hardware                         | |  Hardware TCP/IP Stack   |
    +----------------------------------------------------------------+ +--------------------------+