Can be called instead of setsockopt(SO_TIMESTAMPING)
to enable packet timestamping in multiple formats.
Description
Receive packet timestamps from multiple sources with sub-nanosecond resolution. Supported sources are hardware timestamps generated by the Solarflare adapter and timestamps applied by an external equipment using the cPacket format.
Definition
int onload_timestamping_request (int fd, unsigned flags);
Formal Parameters
-
fd
- Socket file descriptor
-
flags
-
Onload_timestamping_flags:
enum onload_timestamping_flags { /* Request NIC timestamps for sent packets */ ONLOAD_TIMESTAMPING_FLAG_TX_NIC = 1 << 0, /* Request NIC and/or external timestamps for received packets */ ONLOAD_TIMESTAMPING_FLAG_RX_NIC = 1 << 1, ONLOAD_TIMESTAMPING_FLAG_RX_CPACKET = 1 << 2, };
Return Value
0 on success
EINVAL unknown flag is set
ENOTTY fd does not refer to an Onload-accelerated socket
EOPNOTSUPP this build of Onload does not support timestamping