in reply to Re: UDP SNTP Client/Server RFC
in thread UDP SNTP Client/Server RFC
Hello VinsWorldcom,
Thank you for your time and effort trying to make it also compatible the code for Windows OS.
To be honest based on my research also the closest module on CPAN that I can found is the Net::NTP.
I have created a sample of working code for demonstrating purposes.
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use Net::NTP qw(get_ntp_response); $| = 1; my %response = get_ntp_response(<127.0.0.1>,123); printf "This is the responce: ".Dumper(\%response)."\n"; __END__ This is the responce: $VAR1 = { 'Version Number' => 3, 'Reference Timestamp' => '1410860919.93141', 'Leap Indicator' => 0, 'Root Dispersion' => '0.0000', 'Precision' => -22, 'Poll Interval' => '3.0000', 'Stratum' => 2, 'Originate Timestamp' => '1410862457.72461', 'Transmit Timestamp' => '1410862457.44422', 'Mode' => 4, 'Reference Clock Identifier' => '192.36.143.153', 'Receive Timestamp' => '1410862457.44415', 'Root Delay' => '0.0129241943359375' };
Regarding your great idea.
I don't see an SNTP module on CPAN. Have you considered make the code a module "Net::SNTP" and including the client and server as bin/ scripts?I would love to that but since I had never attempted to make a submission before I might need some advises from the experts. To be honest I think that even my code can be modified and improved even more up to some extend. I did not improve it more because it is way too much detailed after and there are not many people interested in such a detail.
But yeah for sure I would be interested if some monks can provide me some reviews and guidance on how to make the submission I would be very interested to contribute to the society as much as possible.
Again thank you for your time and effort, reading and replying to my question.
|
|---|