Crate clock_bound_c
source · [−]Expand description
A client library to communicate with ClockBoundD.
Usage
ClockBoundC requires ClockBoundD to be running to work. See ClockBoundD documentation for installation instructions.
For Rust programs built with Cargo, add “clock-bound-c” as a dependency in your Cargo.toml.
For example:
[dependencies]
clock-bound-c = "0.1.0"
Examples
Runnable examples exist at examples and can be run with Cargo.
“/run/clockboundd/clockboundd.sock” is the expected default clockboundd.sock location, but the examples can be run with a different socket location if desired:
cargo run --example now /run/clockboundd/clockboundd.sock
cargo run --example before /run/clockboundd/clockboundd.sock
cargo run --example after /run/clockboundd/clockboundd.sock
cargo run --example timing /run/clockboundd/clockboundd.sock
Updating README
This README is generated via cargo-readme. Updating can be done by running:
cargo readme > README.md
Structs
A structure for containing the error bounds returned from ClockBoundD. The values represent the time since the Unix Epoch in nanoseconds.
A structure for holding a client to communicate with ClockBoundD.
A structure for holding the response of an after request.
A structure for holding the response of a before request.
A structure for holding the header of the received response.
A structure for holding the response of a now request.
A structure for holding the response of a timing request.
Constants
The prefix of a ClockBoundC socket name. It is appended with a randomized string Ex: clockboundc-G0uv7ULMLNyeLIGKSejG.sock
The default Unix Datagram Socket file that is generated by ClockBoundD.
Setting clock frequency to 1ppm to match chrony