nuttx/net/inet
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
inet.h
inet_globals.c
inet_sockif.c net/socket: use s_options for SO_TIMESTAMP instead of per-conn field 2026-09-18 20:00:49 +08:00
inet_txdrain.c
ipv4_build_header.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
ipv4_getpeername.c
ipv4_getsockname.c net/inet: replace net_lock with conn_lock 2025-12-29 09:42:18 +08:00
ipv4_getsockopt.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
ipv4_setsockopt.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
ipv6_build_header.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
ipv6_getpeername.c
ipv6_getsockname.c net/inet: replace net_lock with conn_lock 2025-12-29 09:42:18 +08:00
ipv6_getsockopt.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
ipv6_setsockopt.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
Kconfig
Make.defs