Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find an implementation of the [S]NTP protocol that could be used in Renode #4

Open
PiotrZierhoffer opened this issue Mar 10, 2021 · 0 comments
Labels

Comments

@PiotrZierhoffer
Copy link

PiotrZierhoffer commented Mar 10, 2021

To implement the NTP support, we need the to have the NTP server.

As embedded applications usually use SNTP, we should investigate if we could serve both purposes in one go or if we should have the simplified version first.

We can

a) implement it ourselves
b) find an implementation and use it

Both options are fine. Our own implementation has to be simple though, and I'm not very familiar with the protocol itself to judge how much work it would be. I do believe SNTP is relatively easy though and it might be easier to implement the protocol than to integrate something external.

External library has to have a permissive license (Apache, MIT etc).

It needs to compile well on Mono and .NET Framework and should not rely on external software.
It should also be configurable from code, not config files.

We should also be able to time it with virtual time. Renode tracks its time flow independently of the host machine.
In src/Infrastructure/src/Emulator/Main/TimeRealTimeClockMode.cs you will find some options that we use for real time clocks, that is: VirtualTime counting from the epoch time and VirtualTimeWithHostBeginning that takes the moment when the simulation starts and adds the current virtual time to it.

Similar options could be used here.

Please note all options you're investigating in this issue (along with the decision and its justification).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant