nuttx/net/tcp
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
..
Kconfig net/tcp: add window scale support 2021-07-07 03:55:41 -05:00
Make.defs net/inet: add support of FIONREAD 2021-07-05 06:20:52 -05:00
tcp_accept.c net: Author Gregory Nutt: update licenses to Apache 2021-02-20 00:38:18 -08:00
tcp_appsend.c tcp: window update improvements 2021-06-13 21:20:24 -05:00
tcp_backlog.c net: Author Gregory Nutt: update licenses to Apache 2021-02-20 00:38:18 -08:00
tcp_callback.c tcp: simplify readahead 2021-06-30 06:22:14 +09:00
tcp_close.c tcp_close: Fix a race with passive close 2021-07-02 13:54:15 +09:00
tcp_conn.c net/socket: add SO_RCVBUF support 2021-07-06 01:44:55 -05:00
tcp_connect.c net/tcp/handshake: send the SYN immediately. 2020-12-18 14:16:11 +09:00
tcp_devpoll.c
tcp_finddev.c net: Author Gregory Nutt: update licenses to Apache 2021-02-20 00:38:18 -08:00
tcp_getsockopt.c net/tcp: set/get TCP_KEEPINTVL/IDLE value as BSD style 2021-05-22 09:01:18 -05:00
tcp_input.c net/tcp: add window scale support 2021-07-07 03:55:41 -05:00
tcp_ioctl.c net/inet: add support of FIONREAD 2021-07-05 06:20:52 -05:00
tcp_ipselect.c net: Author Gregory Nutt: update licenses to Apache 2021-02-20 00:38:18 -08:00
tcp_listen.c
tcp_monitor.c net: Author Gregory Nutt: update licenses to Apache 2021-02-20 00:38:18 -08:00
tcp_netpoll.c tcp: simplify readahead 2021-06-30 06:22:14 +09:00
tcp_notifier.c tcp: simplify readahead 2021-06-30 06:22:14 +09:00
tcp_recvfrom.c tcp: simplify readahead 2021-06-30 06:22:14 +09:00
tcp_recvwindow.c net/tcp: change all window relative value type to uint32_t 2021-07-07 03:55:41 -05:00
tcp_send_buffered.c tcp: Use the tcp seq macros in some obvious places 2021-06-10 22:47:04 -05:00
tcp_send_unbuffered.c Attempt to fix race condition reported in issue #3647 2021-07-04 08:54:15 -05:00
tcp_send.c net/tcp: change all window relative value type to uint32_t 2021-07-07 03:55:41 -05:00
tcp_sendfile.c net/tcp: tcp_sendfile need restore the file location at the end 2021-07-12 05:20:45 -07:00
tcp_seqno.c
tcp_setsockopt.c net/tcp: set/get TCP_KEEPINTVL/IDLE value as BSD style 2021-05-22 09:01:18 -05:00
tcp_timer.c net/tcp: reset the connection ref count before tcp_free() 2021-03-22 10:55:30 +09:00
tcp_txdrain.c sched: Don't include nuttx/sched.h inside sched.h 2021-05-24 12:11:53 +09:00
tcp_wrbuffer_dump.c net: Author Gregory Nutt: update licenses to Apache 2021-02-20 00:38:18 -08:00
tcp_wrbuffer.c net: update licenses to Apache 2021-05-27 08:07:25 +09:00
tcp.h net/tcp: change all window relative value type to uint32_t 2021-07-07 03:55:41 -05:00