nuttx/net/udp
wenquan1 7c87b4586c net/socket: use s_options for SO_TIMESTAMP instead of per-conn field
Remove the redundant `timestamp` field from `udp_conn_s` and use the
existing `s_options` bitmask to track SO_TIMESTAMP/SO_TIMESTAMPNS state.

The socket-level setsockopt/getsockopt already handles SO_TIMESTAMP via
_SO_SETOPT/_SO_GETOPT on s_options. The protocol-level handlers in
inet_sockif.c were intercepting the option before the socket layer,
causing s_options to never be set. This also meant SO_TIMESTAMPNS was
broken since inet_sockif.c only handled SO_TIMESTAMP.

Changes:
- Remove udp_conn_s.timestamp field from udp.h
- Remove SO_TIMESTAMP get/set handlers from inet_sockif.c, letting
  them fall through to the socket-level handler
- Simplify udp_recvfrom.c to call cmsg_store_timestamp() directly,
  which already checks s_options internally
- Align pkt_input.c software timestamp generation with ipv4/can by
  removing per-socket SO_TIMESTAMP option check, only checking
  hardware timestamp capability

Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
2026-09-18 20:00:49 +08:00
..
CMakeLists.txt net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
Kconfig net: Enable dynamic allocation of tcp/udp/ipfwd buffer by default 2025-01-07 22:00:21 +08:00
Make.defs net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
udp.h net/socket: use s_options for SO_TIMESTAMP instead of per-conn field 2026-09-18 20:00:49 +08:00
udp_callback.c net: move rx timestamp from d_rxtime to iob_s.io_time 2026-09-18 20:00:49 +08:00
udp_close.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
udp_conn.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
udp_devpoll.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
udp_finddev.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
udp_input.c net/udp: fix d_len corruption for 2nd+ SO_REUSEADDR listener 2026-08-12 09:41:52 -03:00
udp_ioctl.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
udp_ipselect.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
udp_netpoll.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
udp_notifier.c udp:Resolve UDP exit delay due to high CPU usage 2025-12-29 09:42:18 +08:00
udp_recvfrom.c net/socket: use s_options for SO_TIMESTAMP instead of per-conn field 2026-09-18 20:00:49 +08:00
udp_send.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
udp_sendto_buffered.c net/udp: fix conn_unlock not called outside conditional block 2026-04-09 03:04:15 +08:00
udp_sendto_unbuffered.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
udp_setsockopt.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
udp_txdrain.c net: replace net_sem*wait with conn_dev_sem*wait to simplify code logic 2026-01-02 07:48:06 -03:00
udp_wrbuffer.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
udp_wrbuffer_dump.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00