Skip to content
Commit ee06da54 authored by Adam Wojasinski's avatar Adam Wojasinski Committed by Anas Nashif
Browse files

net: socket: Add SO_TIMESTAMPING data to messages received via socket



Add returning timestamp of received packet in ancillary data buffer
in `msghdr` structure. This commit enables getting timestamp of
the received packet by calling `recvmsg()` function. The function
returns in the `msg_control` field timestamp if following criteria
are met:
- `CONFIG_NET_CONTEXT_TIMESTAMPING` is set
- `SO_TIMESTAMPING` socket option has `SOF_TIMESTAMPING_RX_HARDWARE`
  option enabled for that socket
- driver used by sockets supports packet timestamping

Signed-off-by: default avatarAdam Wojasinski <awojasinski@baylibre.com>
parent 50cfe12f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment