Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
pacak committed Oct 6, 2021
1 parent a7b4640 commit 06ce5b7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Expand Up @@ -3,9 +3,14 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).

## [0.23.0] - 2021-09-28

## [0.23.1] - 2021-10-06
### Added
- Added the `SO_TIMESTAMPING` support
(#[1547](https://github.com/nix-rust/nix/pull/1547))

## [0.23.0] - 2021-09-28
### Added
- Added the `LocalPeerCred` sockopt.
(#[1482](https://github.com/nix-rust/nix/pull/1482))
- Added `TimeSpec::from_duration` and `TimeSpec::from_timespec`
Expand Down
9 changes: 5 additions & 4 deletions src/sys/socket/mod.rs
Expand Up @@ -171,7 +171,11 @@ pub enum SockProtocol {
}

#[cfg(any(target_os = "linux"))]
libc_bitflags!{
libc_bitflags! {
/// Configuration flags for `SO_TIMESTAMPING` interface
///
/// For use with [`Timestamping`][sockopt::Timestamping].
/// [Further reading](https://www.kernel.org/doc/html/latest/networking/timestamping.html)
pub struct TimestampingFlag: c_uint {
/// Report any software timestamps when available.
SOF_TIMESTAMPING_SOFTWARE;
Expand Down Expand Up @@ -614,9 +618,6 @@ pub enum ControlMessageOwned {
/// [Further reading](https://www.kernel.org/doc/html/latest/networking/timestamping.html)
#[cfg(all(target_os = "linux"))]
ScmTimestampsns(Timestamps),
#[cfg(any(
target_os = "linux",
))]
/// Nanoseconds resolution timestamp
///
/// [Further reading](https://www.kernel.org/doc/html/latest/networking/timestamping.html)
Expand Down
2 changes: 1 addition & 1 deletion test/sys/test_socket.rs
Expand Up @@ -58,7 +58,7 @@ pub fn test_inetv4_addr_roundtrip_sockaddr_storage_to_addr() {
}

#[cfg(any(target_os = "linux"))]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
#[cfg_attr(qemu, ignore)]
#[test]
pub fn test_timestamping() {
use nix::sys::socket::{
Expand Down

0 comments on commit 06ce5b7

Please sign in to comment.