Skip to content

Commit fb6e1e5

Browse files
committed
Auto merge of #2415 - ghedo:sock_txtime, r=JohnTitor
Add struct sock_txtime and related flags These are needed to use the SO_TXTIME socket option on Linux, which is already exposed.
2 parents 8a7e251 + a09bc47 commit fb6e1e5

File tree

1 file changed

+8
-0
lines changed
  • src/unix/linux_like/linux

1 file changed

+8
-0
lines changed

src/unix/linux_like/linux/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,12 @@ s! {
563563
pub instruction_pointer: ::__u64,
564564
pub args: [::__u64; 6],
565565
}
566+
567+
// linux/net_tstamp.h
568+
pub struct sock_txtime {
569+
pub clockid: ::clockid_t,
570+
pub flags: ::__u32,
571+
}
566572
}
567573

568574
s_no_extra_traits! {
@@ -2510,6 +2516,8 @@ pub const SOF_TIMESTAMPING_RX_SOFTWARE: ::c_uint = 1 << 3;
25102516
pub const SOF_TIMESTAMPING_SOFTWARE: ::c_uint = 1 << 4;
25112517
pub const SOF_TIMESTAMPING_SYS_HARDWARE: ::c_uint = 1 << 5;
25122518
pub const SOF_TIMESTAMPING_RAW_HARDWARE: ::c_uint = 1 << 6;
2519+
pub const SOF_TXTIME_DEADLINE_MODE: u32 = 1 << 0;
2520+
pub const SOF_TXTIME_REPORT_ERRORS: u32 = 1 << 1;
25132521

25142522
// linux/if_alg.h
25152523
pub const ALG_SET_KEY: ::c_int = 1;

0 commit comments

Comments
 (0)