mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-11 23:43:15 +00:00
2eb8c5e21a
The combination of Net::Mac_address and Genode::ascii_to(Net::Mac_address) required shaky quirks in several places because GCC is not able to resolve the ascii_to overload if base/xml_node.h was included to early. The current solution moves the several ascii_to overloads "closer" to the Net types by putting them into the Net namespace, where GCC reliably picks them up. Hence, co-locating the ascii_to() utility with the overload type in the same scope/namespace is good practice. This patch removes the now obsolete <nic/xml_node.h> header file. |
||
---|---|---|
.. | ||
config.xsd | ||
dhcp_client.cc | ||
dhcp_client.h | ||
ipv4_address_prefix.cc | ||
ipv4_address_prefix.h | ||
ipv4_config.cc | ||
ipv4_config.h | ||
main.cc | ||
nic.cc | ||
nic.h | ||
protocol.h | ||
README | ||
target.mk | ||
xml_node.cc | ||
xml_node.h |
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'.