nuttx/net
Xiang Xiao 906cb8b0f4 net/tcp: tcp_sendfile need restore the file location at the end
quote from https://man7.org/linux/man-pages/man2/sendfile.2.html:
If offset is not NULL, then it points to a variable holding the
file offset from which sendfile() will start reading data from
in_fd.  When sendfile() returns, this variable will be set to the
offset of the byte following the last byte that was read.  If
offset is not NULL, then sendfile() does not modify the file
offset of in_fd; otherwise the file offset is adjusted to reflect
the number of bytes read from in_fd.
If offset is NULL, then data will be read from in_fd starting at
the file offset, and the file offset will be updated by the call.

The change also align with the implementation at:
libs/libc/misc/lib_sendfile.c

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I607944f40b04f76731af7b205dcd319b0637fa04
2021-07-12 05:20:45 -07:00
..
arp net: arp: Fix a potential bug in arp_notify() 2021-03-31 12:23:35 -05:00
bluetooth libc/assert: Reference the expression in all case 2021-04-03 21:00:41 +01:00
can sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
devif devif_poll_tcp_connections: Fix a comment typo 2021-05-31 01:37:51 -05:00
icmp Include assert.h in necessary place 2021-06-08 13:06:08 -07:00
icmpv6 Include assert.h in necessary place 2021-06-08 13:06:08 -07:00
ieee802154 libc/assert: Reference the expression in all case 2021-04-03 21:00:41 +01:00
igmp Don't include assert.h from public header file 2021-06-03 08:36:03 -07:00
inet net/socketpair: move socketpair implement into socket internal 2021-07-08 03:05:43 -05:00
ipforward Include assert.h in necessary place 2021-06-08 13:06:08 -07:00
local net/local: add AF_[UNIX|LOCAL] socketpair support 2021-07-08 03:05:43 -05:00
mld Don't include assert.h from public header file 2021-06-03 08:36:03 -07:00
neighbor Don't include assert.h from public header file 2021-06-03 08:36:03 -07:00
netdev net/inet: add support of FIONREAD 2021-07-05 06:20:52 -05:00
netlink netlink: fix compile error when enable netlink 2021-07-01 06:55:57 -05:00
pkt sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
procfs Don't include assert.h from public header file 2021-06-03 08:36:03 -07:00
route Fix typos (and nxstyle errors) 2021-03-21 21:51:14 +01:00
rpmsg rpmsg_socket: fix rpmsg_socket_device_destroy() multi-access 2021-07-04 06:23:07 -05:00
sixlowpan net/tcp: change all window relative value type to uint32_t 2021-07-07 03:55:41 -05:00
socket net/socketpair: move socketpair implement into socket internal 2021-07-08 03:05:43 -05:00
tcp net/tcp: tcp_sendfile need restore the file location at the end 2021-07-12 05:20:45 -07:00
udp net/socket: add SO_RCVBUF support 2021-07-06 01:44:55 -05:00
usrsock usrsock/recv: guarantee all data is received before close 2021-07-07 08:40:55 +09:00
utils NuttX: Gregory Nutt: update licenses to Apache 2021-04-03 04:20:31 -07:00
Kconfig net/socket: add SO_RCVBUF support 2021-07-06 01:44:55 -05:00
Makefile net/socket_rpmsg: add net socket rpmsg support 2021-03-07 01:45:51 -08:00
net_initialize.c Remove the empty xxx_initialize functions 2021-03-03 08:21:04 +00:00
README.txt

README
======

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

  nuttx/
   |
   `- net/
       |
       +- arp        - Address resolution protocol (IPv4)
       +- bluetooth  - PF_BLUETOOTH socket interface
       +- devif      - Stack/device interface layer
       +- 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   |
    +----------------------------------------------------------------+ +--------------------------+