mirror of
https://github.com/apache/nuttx.git
synced 2026-10-03 04:07:55 +00:00
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> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| inet.h | ||
| inet_globals.c | ||
| inet_sockif.c | ||
| inet_txdrain.c | ||
| ipv4_build_header.c | ||
| ipv4_getpeername.c | ||
| ipv4_getsockname.c | ||
| ipv4_getsockopt.c | ||
| ipv4_setsockopt.c | ||
| ipv6_build_header.c | ||
| ipv6_getpeername.c | ||
| ipv6_getsockname.c | ||
| ipv6_getsockopt.c | ||
| ipv6_setsockopt.c | ||
| Kconfig | ||
| Make.defs | ||