nuttx/net
Lingao Meng 3d20844903 arch/sim: Add AF_LOCAL support to host usrsock
The sim host usrsock backend only accepted INET/NETLINK domains and
translated socket addresses through plain struct sockaddr. That prevents
simulated applications from using POSIX AF_LOCAL sockets through the
standard socket API when CONFIG_NET_USRSOCK is used.

Add AF_LOCAL address conversion for struct sockaddr_un, allow PF_LOCAL
sockets through usrsock, handle NuttX socket type flags, and poll host
descriptors from the sim usrsock work item so nonblocking
connect/read/write readiness is reported back to NuttX. Use
sockaddr_storage for native address translation so larger address
structures are not truncated.

Testing:

  - Host: Ubuntu 22.04 x86_64.

  - Board/config: sim:nsh with CONFIG_NET_USRSOCK=y and
    CONFIG_EXAMPLES_HELLO=y.

  - make clean && make -j16.

  - Ran a temporary hello example that connected to host AF_UNIX
    SOCK_STREAM and SOCK_SEQPACKET sockets through NuttX socket(),
    connect(), write(), and read(). Both received pong and printed
    "AF_LOCAL usrsock test passed".

Assisted-by: Claude:Claude-Fable-5
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2026-07-23 15:34:02 +08:00
..
arp
bluetooth net/bluetooth: fix BTPROTO_HCI socket device lookup 2026-05-06 14:45:46 +08:00
can
devif net/devif: harden devif_conn_event() against list mutation 2026-06-25 15:19:02 -03:00
icmp !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
icmpv6 !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
ieee802154
igmp fix(net/igmp): restore General Query handling broken by pointer compare 2026-07-15 08:46:23 +02:00
inet
ipfilter
ipforward
ipfrag !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
local
mld !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
nat
neighbor
netdev
netfilter
netlink
pkt
procfs !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +08:00
route
rpmsg
sixlowpan
socket
tcp !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
udp
usrsock arch/sim: Add AF_LOCAL support to host usrsock 2026-07-23 15:34:02 +08:00
utils !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
CMakeLists.txt
Kconfig
Makefile
net_initialize.c