Skip to content

Add support for SO_TS_CLOCK sockopt for packet timestamping on FreeBSD. #2058

Closed
@recatek

Description

@recatek

As of FreeBSD 11.3, callers can control which clock is used for reporting packet receipt timestamps (in part for choosing between CLOCK_MONOTONIC and CLOCK_REALTIME). See the SO_TS_CLOCK section in man getsockopt(2). As of 0.2.146 Rust's libc added the relevant optvals for doing this (see rust-lang/libc@694e371).

I've been working on a handwritten proof of concept implementation in Rust for CLOCK_MONOTONIC here, and would be up for trying to add it back into nix if there's interest. Note that this is exclusive to FreeBSD as far as I know, no other bsd-likes support this to my knowledge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions