nuttx/net
wangchen 2e6d0815b2 nuttx/net:Support to PMTUD
RFC 1191
When a router is unable to forward a datagram because it exceeds the
   MTU of the next-hop network and its Don't Fragment bit is set, the
   router is required to return an ICMP Destination Unreachable message
   to the source of the datagram, with the Code indicating
   "fragmentation needed and DF set".  To support the Path MTU Discovery
   technique specified in this memo, the router MUST include the MTU of
   that next-hop network in the low-order 16 bits of the ICMP header
   field that is labelled "unused" in the ICMP specification [7].  The
   high-order 16 bits remain unused, and MUST be set to zero.  Thus, the
   message has the following format:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Type = 3    |   Code = 4    |           Checksum            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           unused = 0          |         Next-Hop MTU          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |      Internet Header + 64 bits of Original Datagram Data      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
RFC 1185
Packet Too Big Message

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |     Code      |          Checksum             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                             MTU                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    As much of invoking packet                 |
      +               as will fit without the ICMPv6 packet           +
      |                       exceeding 576 octets                    |

   IPv6 Fields:

   Destination Address

                  Copied from the Source Address field of the invoking
                  packet.

   ICMPv6 Fields:

   Type           2

   Code           0

   MTU            The Maximum Transmission Unit of the next-hop link.

   Description

   A Packet Too Big MUST be sent by a router in response to a packet
   that it cannot forward because the packet is larger than the MTU of
   the outgoing link.  The information in this message is used as part
   of the Path MTU Discovery process [RFC-1191].

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2023-05-12 10:21:52 -03:00
..
arp net: Remove the extra space 2023-05-03 15:18:21 +02:00
bluetooth net: remove conn-related casts 2023-05-10 19:32:09 -03:00
can net: remove conn-related casts 2023-05-10 19:32:09 -03:00
devif nuttx/net:Support to PMTUD 2023-05-12 10:21:52 -03:00
icmp nuttx/net:Support to PMTUD 2023-05-12 10:21:52 -03:00
icmpv6 nuttx/net:Support to PMTUD 2023-05-12 10:21:52 -03:00
ieee802154 net: remove conn-related casts 2023-05-10 19:32:09 -03:00
igmp support ipv4 ToS and ipv6 TrafficClass 2023-01-29 13:43:44 +08:00
inet net: remove conn-related casts 2023-05-10 19:32:09 -03:00
ipforward forward: copy iob when broadcast forward 2023-05-06 03:18:08 +08:00
ipfrag nuttx/net:Support to PMTUD 2023-05-12 10:21:52 -03:00
local net/local: fix blocking local sockets 2023-05-11 11:39:00 +08:00
mld support ipv4 ToS and ipv6 TrafficClass 2023-01-29 13:43:44 +08:00
nat net/ip: fix compile break if disable NET_TCP 2023-02-07 12:46:40 +02:00
neighbor Replace all sprintf with snprintf 2023-05-08 09:57:01 +02:00
netdev net/procfs: Support to show MTU in netdev statistics 2023-04-28 09:45:21 +08:00
netfilter change strcpy to strlcpy 2023-02-24 12:15:40 +08:00
netlink net: remove conn-related casts 2023-05-10 19:32:09 -03:00
pkt net: remove conn-related casts 2023-05-10 19:32:09 -03:00
procfs net: Simplify the tcp/udp existence check 2023-05-03 17:40:00 +03:00
route net: use NXRMUTEX_INITIALIZER for rmutex init 2023-03-15 13:57:08 +01:00
rpmsg net/rpmsg: Set family for rpaddr in ns_bind 2023-04-21 13:18:48 +03:00
sixlowpan net: remove conn-related casts 2023-05-10 19:32:09 -03:00
socket net: remove conn-related casts 2023-05-10 19:32:09 -03:00
tcp net: remove conn-related casts 2023-05-10 19:32:09 -03:00
udp net: remove conn-related casts 2023-05-10 19:32:09 -03:00
usrsock net/local: Return the unblock handle correctly in local_accept 2023-03-09 09:17:19 +01:00
utils net/net_cmsg.c: Fix warning about using void* arithmetics 2023-05-10 17:58:25 +08:00
Kconfig net/can: fix can mssage corruption if enable NET_TIMESTAMP 2023-04-27 00:30:58 +08:00
Makefile Support fragmentation and reassembly 2023-01-17 14:01:37 +08:00
net_initialize.c
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   |
    +----------------------------------------------------------------+ +--------------------------+