Skip to content

Latest commit

 

History

History
85 lines (56 loc) · 2.3 KB

README.md

File metadata and controls

85 lines (56 loc) · 2.3 KB

Cocom - NTP client written in Rust Cocom build License: GPL v3

Cocom is an implementation of the NTP-protocol, to receive the time from NTP-server. The client does not necessarily need arguments.

The implementation does not use any NTP-libraries.

For further information on NTP, see RFC-5905.

Setup

The installation can be applied by running the following makefile target:

make build && make install 

Cocom will be installed to /usr/local/bin/ and the installation target might need higher access privileges. Therefore, it is supposed to be in the global interpreter path. If an installation is not intended, it can be run locally. As a default host the NTP server from the PTB-Braunschweig is set.

make run-dev

Alternatively it can be run with the release profile.

make run

Usage

Currently, Cocom expects an NTP host, if not provided the default NTP server is used. If no flag is provided the client will return the current timestamp from the given NTP host.

Cocom 1.1.3
LamdaLamdaLamda
NTP-Client purely written in Rust.

USAGE:
    cocom [FLAGS] [OPTIONS] [HOST]

FLAGS:
    -d, --debug      Prints the fields of the received NTP-packet.
    -h, --help       Prints help information
    -v, --verbose    Activates terminal output
    -V, --version    Prints version information

OPTIONS:
    -b, --bind <bind>    Specifies the binding address for the UDP socket. The following format is required; [IP]:[PORT]

ARGS:
    <HOST>    Specifies the desired NTP-server.

Docker

A Docker-container can be build by running the Dockerfile:

docker build -t cocom . && docker run cocom 

Documentation

The documentation can be generated with the following makefile target:

make doc

Documentation artifacts can be found in cocom/doc.

Licence

See LICENSE.

Further-Reading

NTP.org

RFC-5905

NTP-Pool