genode/repos/libports/src/app/sntp_client
2019-08-28 14:21:36 +02:00
..
config.xsd sntp_client: improve README, clean source code 2019-08-28 14:21:36 +02:00
dhcp_client.cc sntp_client: report received transmit timestamp 2019-08-21 12:37:02 +02:00
dhcp_client.h sntp_client: report received transmit timestamp 2019-08-21 12:37:02 +02:00
ipv4_address_prefix.cc sntp_client: report received transmit timestamp 2019-08-21 12:37:02 +02:00
ipv4_address_prefix.h sntp_client: report received transmit timestamp 2019-08-21 12:37:02 +02:00
ipv4_config.cc sntp_client: report received transmit timestamp 2019-08-21 12:37:02 +02:00
ipv4_config.h sntp_client: report received transmit timestamp 2019-08-21 12:37:02 +02:00
main.cc sntp_client: improve README, clean source code 2019-08-28 14:21:36 +02:00
nic.cc sntp_client: report received transmit timestamp 2019-08-21 12:37:02 +02:00
nic.h sntp_client: report received transmit timestamp 2019-08-21 12:37:02 +02:00
protocol.h sntp_client: report received transmit timestamp 2019-08-21 12:37:02 +02:00
README sntp_client: improve README, clean source code 2019-08-28 14:21:36 +02:00
target.mk sntp_client: report received transmit timestamp 2019-08-21 12:37:02 +02:00
xml_node.cc sntp_client: report received transmit timestamp 2019-08-21 12:37:02 +02:00
xml_node.h sntp_client: report received transmit timestamp 2019-08-21 12:37:02 +02:00

The 'sntp_client' component periodically requests the current time from a
given SNTP server and reports it as GMT in a format that can also be used
to re-program Genodes RTC driver.


Configuration
~~~~~~~~~~~~~

This is an example configuration of the component with a static IP config,
an individual request interval, and debugging output enabled:

! <config interface="10.0.0.72/24"
!         gateway="10.0.0.1"
!         dst_ip="10.0.0.24"
!         period_min="10"
!         verbose="yes" />


This is an example configuration of the component with DHCP:

! <config dst_ip="10.0.0.24" />


This is a short description of the tags and attributes:

:config.interface:
  Optional. Determined via DHCP if not configured. IP address and subnet of
  the component. If not set, the component requests and maintains the IP
  configuration via DHCP.

:config.gateway:
  Optional. Determined via DHCP if not configured. IP address of the gateway
  of the IP subnet.

:config.dst_ip:
  Mandatory. IP address of the SNTP server.

:config.period_min:
  Optional. Default is 60. Length of request interval in minutes.

:config.verbose:
  Optional. Default is "false". Toggles wether the component shall log
  debugging information.


Sessions
~~~~~~~~

This is an overview of the sessions required and provided by the
component apart from the environment sessions:

* One Timer session.
* One Report session with label 'set_rtc'.


Report 'set_rtc' provided by the component
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is an example content of the report:

! <set_rtc year="2018"
!          month="11"
!          day="27"
!          hour="22"
!          minute="45"
!          second="32" />

The format of the report is exactly what is expected by the Genode RTC driver.
The time is given as GMT in 24H mode, leap seconds considered, but without
taking the round trip time between SNTP server and client in account.


Examples
~~~~~~~~

An example of how to use the component can be found in the test script
'libports/run/sntp_client.run' and 'os/run/ping_nic_router.run'.