Skip to main content

Crate ntp_usg

Crate ntp_usg 

Source
👎Deprecated since 3.0.0: The ntp_usg crate has been split into separate crates. Use ntp_usg-proto for protocol types, ntp_usg-client for client functionality, and ntp_usg-server for server functionality.
Expand description

§DEPRECATED: This crate has been split into multiple crates

This crate is deprecated as of version 3.0.0.

The monolithic ntp_usg crate has been split into three focused crates:

  • ntp_usg-proto: NTP protocol types, extension fields, and NTS cryptographic primitives
  • ntp_usg-client: NTP client library with sync, async (tokio/smol), and NTS support
  • ntp_usg-server: NTP server library with tokio/smol and NTS-KE support

§Migration Guide

§For Client Users

Replace:

[dependencies]
ntp_usg = "2.0"

With:

[dependencies]
ntp_usg-client = "3.0"

Update imports:

ⓘ
// Old
use ntp_usg::*;

// New
use ntp_client::*;

§For Server Users

Add:

[dependencies]
ntp_usg-server = "3.0"

Update imports:

ⓘ
use ntp_server::*;

§For Protocol/Type Users

If you only need protocol types and parsing:

[dependencies]
ntp_usg-proto = "3.0"

Update imports:

ⓘ
use ntp_proto::*;

§Compatibility Re-exports

This crate re-exports all three new crates for backwards compatibility, but you will receive deprecation warnings when using it. We strongly recommend migrating to the new crates.

Re-exports§

pub use ntp_proto as proto;
pub use ntp_client as client;
pub use ntp_server as server;

Modules§

error
Custom error types for buffer-based NTP packet parsing and serialization. Custom error types for buffer-based NTP packet parsing and serialization.
extension
NTP extension field parsing and NTS extension types. NTP extension field parsing and NTS (Network Time Security) extension types.
protocol
NTP protocol types and constants (RFC 5905). Types and constants that precisely match the specification.
unix_time
Unix time conversion utilities for NTP timestamps.

Functions§

request
Send a blocking request to an NTP server with a hardcoded 5 second timeout.