Files
zhanghongyu 746d68916f net/tcp: add support for the CLOSE_WAIT state
CLOSE-WAIT - represents waiting for a connection termination request
             from the local user.
      TCP A                                                TCP B

  1.  ESTABLISHED                                          ESTABLISHED
  2.  (Close)
      FIN-WAIT-1  --> <SEQ=100><ACK=300><CTL=FIN,ACK>  --> CLOSE-WAIT
  3.  FIN-WAIT-2  <-- <SEQ=300><ACK=101><CTL=ACK>      <-- CLOSE-WAIT
  4.                                                       (Close)
      TIME-WAIT   <-- <SEQ=300><ACK=101><CTL=FIN,ACK>  <-- LAST-ACK
  5.  TIME-WAIT   --> <SEQ=101><ACK=301><CTL=ACK>      --> CLOSED
  6.  (2 MSL)
      CLOSED

in the current state, we can continue to send data until the user
calls shutdown or close, then directly enter the TCP_LAST_ACK state

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-27 21:06:23 +08:00

77 lines
3.6 KiB
ReStructuredText

===============
Network Support
===============
.. toctree::
:maxdepth: 1
sixlowpan.rst
socketcan.rst
pkt.rst
ipfilter.rst
nat.rst
netdev.rst
netdriver.rst
mdio.rst
netguardsize.rst
netlink.rst
slip.rst
wqueuedeadlocks.rst
tcp_network_perf.rst
delay_act_and_tcp_perf.rst
tcp_state_machine.rst
``net`` Directory Structure ::
nuttx/
|
`- net/
|
+- arp - Address resolution protocol (IPv4)
+- bluetooth - PF_BLUETOOTH socket interface
+- can - SocketCAN
+- devif - Stack/device interface layer
+- icmp - Internet Control Message Protocol (IPv4)
+- icmpv6 - Internet Control Message Protocol (IPv6)
+- ieee802154 - PF_IEEE802154 socket interface
+- igmp - IGMPv2 client
+- inet - PF_INET/PF_INET6 socket interface
+- ipforward - IP forwarding logic
+- ipfrag - Fragmentation and reassembly
+- local - Unix domain (local) sockets
+- mld - Multicast Listener Discovery (MLD)
+- nat - Network Address Translation (NAT)
+- neighbor - Neighbor Discovery Protocol (IPv6)
+- netdev - Socket network device interface
+- netfilter - Iptables Interface
+- netlink - Netlink IPC socket interface
+- pkt - "Raw" packet socket support
+- procfs - net devices PROCFS support
+- route - Routing table support
+- rpmsg - Rpmsg domain (remote) sockets
+- sixlowpan - 6LoWPAN implementation
+- socket - BSD socket interface
+- 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 |
+----------------------------------------------------------------+ +--------------------------+