Skip to content

Commit

Permalink
Auto merge of #2415 - ghedo:sock_txtime, r=JohnTitor
Browse files Browse the repository at this point in the history
Add struct sock_txtime and related flags

These are needed to use the SO_TXTIME socket option on Linux, which is
already exposed.
  • Loading branch information
bors committed Sep 24, 2021
2 parents 8a7e251 + a09bc47 commit fb6e1e5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,12 @@ s! {
pub instruction_pointer: ::__u64,
pub args: [::__u64; 6],
}

// linux/net_tstamp.h
pub struct sock_txtime {
pub clockid: ::clockid_t,
pub flags: ::__u32,
}
}

s_no_extra_traits! {
Expand Down Expand Up @@ -2510,6 +2516,8 @@ pub const SOF_TIMESTAMPING_RX_SOFTWARE: ::c_uint = 1 << 3;
pub const SOF_TIMESTAMPING_SOFTWARE: ::c_uint = 1 << 4;
pub const SOF_TIMESTAMPING_SYS_HARDWARE: ::c_uint = 1 << 5;
pub const SOF_TIMESTAMPING_RAW_HARDWARE: ::c_uint = 1 << 6;
pub const SOF_TXTIME_DEADLINE_MODE: u32 = 1 << 0;
pub const SOF_TXTIME_REPORT_ERRORS: u32 = 1 << 1;

// linux/if_alg.h
pub const ALG_SET_KEY: ::c_int = 1;
Expand Down

0 comments on commit fb6e1e5

Please sign in to comment.