mirror of
https://github.com/apache/nuttx.git
synced 2026-10-23 23:08:44 +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 | ||
| Kconfig | ||
| Make.defs | ||
| udp.h | ||
| udp_callback.c | ||
| udp_close.c | ||
| udp_conn.c | ||
| udp_devpoll.c | ||
| udp_finddev.c | ||
| udp_input.c | ||
| udp_ioctl.c | ||
| udp_ipselect.c | ||
| udp_netpoll.c | ||
| udp_notifier.c | ||
| udp_recvfrom.c | ||
| udp_send.c | ||
| udp_sendto_buffered.c | ||
| udp_sendto_unbuffered.c | ||
| udp_setsockopt.c | ||
| udp_txdrain.c | ||
| udp_wrbuffer.c | ||
| udp_wrbuffer_dump.c | ||