Skip to content

Commit b8ebcf9

Browse files
committed
Add additional socket timestamping flags
While trying to collect the ACK timestamps, it appeared SOF_TIMESTAMPING_TX_ACK was missing from TimestampingFlag. It was already added to libc a few years ago in rust-lang/libc#2881 . Add the missing flags to TimestampingFlag.
1 parent e4895d3 commit b8ebcf9

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

changelog/2606.added.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add additional socket timestamping flags to `sys::socket::TimestampingFlag`.

src/sys/socket/mod.rs

+13
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,21 @@ libc_bitflags! {
281281
SOF_TIMESTAMPING_RX_SOFTWARE;
282282
/// Generate a unique identifier along with each transmitted packet
283283
SOF_TIMESTAMPING_OPT_ID;
284+
/// Collect transmitting timestamps prior to entering the packet scheduler
285+
SOF_TIMESTAMPING_TX_SCHED;
286+
/// Collect transmitting timestamps when all data in the send buffer has been acknowledged
287+
SOF_TIMESTAMPING_TX_ACK;
288+
/// Support receive control messages for all timestamped packets
289+
SOF_TIMESTAMPING_OPT_CMSG;
284290
/// Return transmit timestamps alongside an empty packet instead of the original packet
285291
SOF_TIMESTAMPING_OPT_TSONLY;
292+
/// Collect optional stats that are obtained along with the transmit timestamps
293+
SOF_TIMESTAMPING_OPT_STATS;
294+
/// Enable the SCM_TIMESTAMPING_PKTINFO control message for incoming packets with hardware timestamps
295+
SOF_TIMESTAMPING_OPT_PKTINFO;
296+
/// Request both hardware and software timestamps for outgoing packets when SOF_TIMESTAMPING_TX_HARDWARE and
297+
/// SOF_TIMESTAMPING_TX_SOFTWARE are enabled at the same time
298+
SOF_TIMESTAMPING_OPT_TX_SWHW;
286299
}
287300
}
288301

0 commit comments

Comments
 (0)