walnux/net
chao an 98724477e7 net/procfs: fix runtime error AddressSanitizer(global-buffer-overflow)
NuttShell (NSH) NuttX-10.3.0
ap> ifconfig
=================================================================
Program received signal SIGSEGV, Segmentation fault.
==3920365==ERROR: AddressSanitizer: global-buffer-overflow on address 0x57fb4f2a at pc 0x57177067 bp 0xf1ffebb8 sp 0xf1ffeba8
READ of size 1 at 0x57fb4f2a thread T0

...................
| #10 0xf7ac4339 in __asan::__asan_report_load1 (addr=1476087594) at ../../../../../src/libsanitizer/asan/asan_rtl.cpp:117
| #11 0x57177067 in strncmp (cs=0x57fb4f2a "", ct=0x582d36e0 "stat", nb=4) at string/lib_strncmp.c:40
| #12 0x57f3b467 in netprocfs_opendir (relpath=0x57fb4f26 "net", dir=0xf1ffed80) at procfs/net_procfs.c:398
| #13 0x572b3ae1 in procfs_opendir (mountpt=0xf4602c20, relpath=0x57fb4f26 "net", dir=0xf1ffed80) at procfs/fs_procfs.c:625
| #14 0x572879ff in open_mountpoint (inode=0xf4602c20, relpath=0x57fb4f26 "net", dir=0xf1ffed80) at vfs/fs_dir.c:127
...................

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-27 09:41:55 +08:00
..
arp libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
bluetooth libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
can libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
devif net: cleanup pvconn reference to avoid confuse 2022-08-26 20:58:11 +08:00
icmp libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
icmpv6 libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
ieee802154 libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
igmp libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
inet net/inet: invalid addrlen length should return EINVAL 2022-09-08 09:02:30 +08:00
ipforward net: cleanup pvconn reference to avoid confuse 2022-08-26 20:58:11 +08:00
local libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
mld libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
neighbor net: use HTONS, NTOHS, HTONL, NTOHL macro in kernel code 2022-01-18 10:59:47 +01:00
netdev net/wireless: separate command catagory of bt/pktradio from wireless ioctl 2022-09-20 01:16:22 +08:00
netlink libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
pkt libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
procfs net/procfs: fix runtime error AddressSanitizer(global-buffer-overflow) 2022-09-27 09:41:55 +08:00
route net/mld/route: fix build warning 2022-09-06 18:24:20 +08:00
rpmsg poll: add poll_notify() api and call it in all drivers 2022-09-26 12:06:32 +08:00
sixlowpan net: cleanup pvconn reference to avoid confuse 2022-08-26 20:58:11 +08:00
socket net: Implement SO_RCVBUF and SO_SNDBUF for getsockopt 2022-09-21 09:03:20 +02:00
tcp libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
udp libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
usrsock libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
utils net:add btsnoop and snoop 2022-08-24 21:42:30 +08:00
Kconfig net/slip: Rename and clarify orphaned Kconfig options 2022-07-20 13:17:09 +08:00
Makefile net/socket_rpmsg: add net socket rpmsg support 2021-03-07 01:45:51 -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   |
    +----------------------------------------------------------------+ +--------------------------+