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).
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 andVirtualTimeWithHostBeginning
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).