[ntp:questions] sntp code: what pack_ntp is doung,

David Woolley david at ex.djwhome.demon.co.uk.invalid
Thu Apr 10 19:34:39 UTC 2008


Pg wrote:

>     for (i = 0; i < 8; ++i) {
>         if ((k = (int)(d *= 256.0)) >= 256) k = 255;
>         packet[NTP_TRANSMIT+i] = k;
>         d -= k;
>     }

> 
> in this what is happening after deviding by NTP_SCALE and what is
> happening inside for loop.

Putting the values into network byte order.




More information about the questions mailing list