SNTP in C

Started by
1 comment, last by Daedalus AI 18 years, 7 months ago
Hey again, Still stuck on this assignment (creating an SNTP client). The last time I was getting problems with the assignment, I was unable to receive a response from any time servers as it was just hanging on the recv() function after I sent the Time Request Packet to the Host I was connected to(I'm coding it in Linux). I'm now receiving the packet (all 48 bytes) back with the timestamp inserted by the Host....the problem now is that I have no idea what to do with it (the 64 bit timestamp, that I've stripped from the packet). This number also to appears to fluptuate a lot each time I run the program. Does anyone know what I'm supposed to do with this number to make it into a human readable format (i.e. 10:25PM etc)? Thanx Daed.
Advertisement
Perhaps these references will help.

RFC 1361 Simple Network Time Protocol (SNTP)
RFC 1305 Network Time Protocol (Version 3) Specification, Implementation and Analysis.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Lol, I wish. I've read (well, scanned through) all the RFC's I need, but I guess I keep misunderstanding them. They always have to write them as cryptic as possible, just wish there was more out on the net about this protocol rather than just the RFC's and SNTP products.

Thanx though, I guess I'm gonna have to try to properly understand the RFC's better, by reading them more.

Daed.

This topic is closed to new replies.

Advertisement