Skip to content

Commit

Permalink
Add recent socket timestamping flags for Linux and Android
Browse files Browse the repository at this point in the history
  • Loading branch information
fishilico authored and tgross35 committed Feb 22, 2025
1 parent 7a7fe46 commit a0021d2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2083,6 +2083,9 @@ fn test_android(target: &str) {
| "PF_BLOCK_TS"
| "PF_SUSPEND_TASK" => true,

// FIXME(android): Requires >= 6.12 kernel headers.
"SOF_TIMESTAMPING_OPT_RX_FILTER" => true,

_ => false,
}
});
Expand Down Expand Up @@ -4338,6 +4341,12 @@ fn test_linux(target: &str) {
// FIXME: Requires >= 6.11 kernel headers.
"MAP_DROPPABLE" => true,

// FIXME(linux): Requires >= 6.2 kernel headers.
"SOF_TIMESTAMPING_OPT_ID_TCP" => true,

// FIXME(linux): Requires >= 6.12 kernel headers.
"SOF_TIMESTAMPING_OPT_RX_FILTER" => true,

_ => false,
}
});
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2385,9 +2385,12 @@ SOCK_RAW
SOCK_RDM
SOCK_SEQPACKET
SOCK_STREAM
SOF_TIMESTAMPING_BIND_PHC
SOF_TIMESTAMPING_OPT_CMSG
SOF_TIMESTAMPING_OPT_ID
SOF_TIMESTAMPING_OPT_ID_TCP
SOF_TIMESTAMPING_OPT_PKTINFO
SOF_TIMESTAMPING_OPT_RX_FILTER
SOF_TIMESTAMPING_OPT_STATS
SOF_TIMESTAMPING_OPT_TSONLY
SOF_TIMESTAMPING_OPT_TX_SWHW
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2898,9 +2898,12 @@ SOCK_NONBLOCK
SOCK_PACKET
SOCK_RAW
SOCK_RDM
SOF_TIMESTAMPING_BIND_PHC
SOF_TIMESTAMPING_OPT_CMSG
SOF_TIMESTAMPING_OPT_ID
SOF_TIMESTAMPING_OPT_ID_TCP
SOF_TIMESTAMPING_OPT_PKTINFO
SOF_TIMESTAMPING_OPT_RX_FILTER
SOF_TIMESTAMPING_OPT_STATS
SOF_TIMESTAMPING_OPT_TSONLY
SOF_TIMESTAMPING_OPT_TX_SWHW
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2942,6 +2942,9 @@ pub const SOF_TIMESTAMPING_OPT_TSONLY: c_uint = 1 << 11;
pub const SOF_TIMESTAMPING_OPT_STATS: c_uint = 1 << 12;
pub const SOF_TIMESTAMPING_OPT_PKTINFO: c_uint = 1 << 13;
pub const SOF_TIMESTAMPING_OPT_TX_SWHW: c_uint = 1 << 14;
pub const SOF_TIMESTAMPING_BIND_PHC: c_uint = 1 << 15;
pub const SOF_TIMESTAMPING_OPT_ID_TCP: c_uint = 1 << 16;
pub const SOF_TIMESTAMPING_OPT_RX_FILTER: c_uint = 1 << 17;

#[deprecated(
since = "0.2.55",
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4544,6 +4544,9 @@ pub const SOF_TIMESTAMPING_OPT_TSONLY: c_uint = 1 << 11;
pub const SOF_TIMESTAMPING_OPT_STATS: c_uint = 1 << 12;
pub const SOF_TIMESTAMPING_OPT_PKTINFO: c_uint = 1 << 13;
pub const SOF_TIMESTAMPING_OPT_TX_SWHW: c_uint = 1 << 14;
pub const SOF_TIMESTAMPING_BIND_PHC: c_uint = 1 << 15;
pub const SOF_TIMESTAMPING_OPT_ID_TCP: c_uint = 1 << 16;
pub const SOF_TIMESTAMPING_OPT_RX_FILTER: c_uint = 1 << 17;
pub const SOF_TXTIME_DEADLINE_MODE: u32 = 1 << 0;
pub const SOF_TXTIME_REPORT_ERRORS: u32 = 1 << 1;

Expand Down

0 comments on commit a0021d2

Please sign in to comment.