Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: chuck@trantor.harris-atd.com (Chuck Musciano) Newsgroups: comp.sys.sun Subject: Re: rdate Keywords: SunOS Message-ID: <115@brazos.Rice.edu> Date: 5 Jul 89 12:31:28 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 20 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 70, message 2 of 15 > Does anyone have the protocol for Sun's rdate and the corresponding > daemon? I am sure other more enlightened readers will provide more detailed information, but I discovered that rdate uses the most trivial of "protocols". Simply open a socket to the desired host on port 37. The host will send back four bytes, in network byte order, which contain the time, in seconds, since 1 Jan 1900. If you subtract (unsigned) 2208988800 from this, you'll get Unix time (from 1 Jan 1970). This service on port 37 seems to be a fundmanetal service of inetd on most any Unix machine. I used this to implement rdate for our MIPS machines. Chuck Musciano ARPA : chuck@trantor.harris-atd.com Harris Corporation Usenet: ...!uunet!x102a!trantor!chuck PO Box 37, MS 3A/1912 AT&T : (407) 727-6131 Melbourne, FL 32902 FAX : (407) 727-{5118,5227,4004} Oh yeah, laugh now! But when the millions start pouring in, I'll be the one at Burger King, sucking down Whoppers at my own private table! --Al Bundy