bytecodealliance / bytecodealliance/rustix
socket/sockopt: kernel timestamping support
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 294
- Avg merge
- 4h 7m
- Merged PRs (30d)
- 2
Description
I'm trying to switch away from nix/libc to this crate & I found that rustix currently doesn't provide functions for using kernel timestamping. The `nix` crate provides the following required for kernel timestamping:
- sockopt: [ReceiveTimestamp](https://docs.rs/nix/latest/nix/sys/socket/sockopt/struct.ReceiveTimestamp.html)
- sockopt: [ReceiveTimestampns](https://docs.rs/nix/latest/nix/sys/socket/sockopt/struct.ReceiveTimestampns.html)
- sockopt: [Timestamping](https://docs.rs/nix/latest/nix/sys/socket/sockopt/struct.Timestamping.html)
- sockopt: [TimestampingFlag](https://docs.rs/nix/latest/nix/sys/socket/struct.TimestampingFlag.html) (for `Timestamping`)
- socket: [ControlMessageOwned::ScmTimestamp](https://docs.rs/nix/latest/nix/sys/socket/enum.ControlMessageOwned.html#variant.ScmTimestamp) (for `ReceiveTimestamp`)
- socket: [ControlMessageOwned::ScmTimestampns](https://docs.rs/nix/latest/nix/sys/socket/enum.ControlMessageOwned.html#variant.ScmTimestampns) (for `ReceiveTimestampns`)
- socket: [ControlMessageOwned::ScmTimestampsns](https://docs.rs/nix/latest/nix/sys/socket/enum.ControlMessageOwned.html#variant.ScmTimestampsns) (for `Timestamping`)
- socket: [Timestamps](https://docs.rs/nix/latest/nix/sys/socket/struct.Timestamps.html) (for `Timestamping`)
I'm willing to work on a PR contributing a similar API (with individual functions for each sockopt variant, as is the rustix way).
Contributor guide
Assessment
This issue has not been assessed yet.