nuttx/net
Zhe Weng 8b211128f1 net/nat: Support param to manipulate src or dest
This commit is for later ICMP error types processing, and does not change any current logic.

Reason for supporting both side of modification is that an inbound ICMP Error MSG may carry original packet like this:

|          IP HDR: SRC = Peer IP,       DST = External IP |
|        ICMP HDR: ERROR MSG                              |
| <Origin> IP HDR: SRC = External IP,   DST = Peer IP     |
| <Origin> L4 HDR: SRC = External Port, DST = Peer Port   |

So we need to support inbound translation (External -> Local) on SRC or DST of each header.

And so do the outbound direction.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-01 22:45:22 +08:00
..
arp net/devif: add common interface to build L2 headers 2022-11-28 14:44:15 +01:00
bluetooth sem:remove sem default protocl 2022-10-22 14:50:48 +08:00
can net: remove psock reference from connect 2022-11-24 22:57:42 +08:00
devif net/devif: fix devif loopback 2022-12-01 19:48:23 +08:00
icmp net: extract l3 header build code into new functions 2022-11-29 18:36:15 +08:00
icmpv6 net: extract l3 header build code into new functions 2022-11-29 18:36:15 +08:00
ieee802154 sem:remove sem default protocl 2022-10-22 14:50:48 +08:00
igmp net: extract l3 header build code into new functions 2022-11-29 18:36:15 +08:00
inet net: extract l3 header build code into new functions 2022-11-29 18:36:15 +08:00
ipforward net: add basic NAT workflow 2022-11-11 14:36:55 +08:00
local local: add net_lock to local_listen 2022-11-28 16:36:39 +08:00
mld net: extract l3 header build code into new functions 2022-11-29 18:36:15 +08:00
nat net/nat: Support param to manipulate src or dest 2022-12-01 22:45:22 +08:00
neighbor net: move device buffer define to common header 2022-10-28 00:32:16 -04:00
netdev Fix Error: netdev/netdev_findbyindex.c:59:7: error: variable 'i' set but not used 2022-11-23 07:27:48 +01:00
netlink sched/task/task_getpid: getpid should return process id not thread id 2022-11-17 17:58:08 +08:00
pkt net: move device buffer define to common header 2022-10-28 00:32:16 -04:00
procfs net/procfs: fix runtime error AddressSanitizer(global-buffer-overflow) 2022-09-27 09:41:55 +08: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 net: remove psock reference from connect 2022-11-24 22:57:42 +08:00
sixlowpan Fix error: variable 'buflen' is uninitialized when used here 2022-11-20 14:34:44 +01:00
socket net: add parameter check in psock_setsockopt 2022-11-29 00:20:09 +08:00
tcp net: extract l3 header build code into new functions 2022-11-29 18:36:15 +08:00
udp net: extract l3 header build code into new functions 2022-11-29 18:36:15 +08:00
usrsock net: Remove usrsock specific process from common code as much as possible 2022-11-28 16:32:41 +09:00
utils net/chksum: move all chksum api declarations to common header 2022-11-30 15:08:14 +08:00
Kconfig net: add basic NAT workflow 2022-11-11 14:36:55 +08:00
Makefile net: add basic NAT workflow 2022-11-11 14:36:55 +08:00
net_initialize.c net: Reoder the initialize sequence(mac->ip->tcp/udp) 2022-03-12 19:24:17 +02:00
README.txt net/loopback: Move g_lo_* global variable to libc/net/ 2020-03-30 09:47:28 -06:00

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   |
    +----------------------------------------------------------------+ +--------------------------+