SNTP client - NTP

This is a discussion on SNTP client - NTP ; Hi, I am trying to implement a light weight SNTP client in C. Can someone tell me how to convert human readable time format into 64 bit NTP time stamp and vice versa? Is there any C function or library ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: SNTP client

  1. SNTP client

    Hi,

    I am trying to implement a light weight SNTP client in C. Can someone tell
    me how to convert human readable time format into 64 bit NTP time stamp and
    vice versa? Is there any C function or library available for doing that ?
    Your help will be highly appreciated.

    Thanks,
    Praveen.

  2. Re: SNTP client

    praveen.nallasamy@gmail.com (praveen kumar) writes:

    >Hi,


    >I am trying to implement a light weight SNTP client in C. Can someone tell
    >me how to convert human readable time format into 64 bit NTP time stamp and
    >vice versa? Is there any C function or library available for doing that ?
    >Your help will be highly appreciated.



    You are trying to do this why? There are loads of free GPL/free license
    versions out there, including the reference implimentation (which also
    includes a conversion routine). Why would you want to reinvent the wheel,
    and trip over all of the problems others have figured out how to avoid,
    especially when they are willing to make them available for free.
    Have you been handed this job by a gps manufacturer?

    >Thanks,
    >Praveen.


  3. Re: SNTP client

    praveen kumar wrote:
    > Hi,
    >
    > I am trying to implement a light weight SNTP client in C. Can someone tell
    > me how to convert human readable time format into 64 bit NTP time stamp and
    > vice versa? Is there any C function or library available for doing that ?
    > Your help will be highly appreciated.


    Take a look at the process_packet() function in ntpd/ntp_proto.c in the
    reference implementation. That should give you an idea of what you need
    to do.

    Danny

+ Reply to Thread