Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!mimsy!steve From: steve@mimsy.UUCP (Steve D. Miller) Newsgroups: comp.unix.wizards Subject: Re: Sun 3.4 ICMP Timestamp (RAW ICMP) Message-ID: <9063@mimsy.UUCP> Date: Wed, 21-Oct-87 09:49:14 EDT Article-I.D.: mimsy.9063 Posted: Wed Oct 21 09:49:14 1987 Date-Received: Sat, 24-Oct-87 06:48:47 EDT References: <14567@bu-cs.BU.EDU> Reply-To: steve@mimsy.UUCP (Steve D. Miller) Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 40 Keywords: sun icmp timestamp raw From the fiddling I did on a SunOS 3.4 machine, it seems that 3.4 is still returning only the ICMP header on raw ICMP sockets. This was a 4.2-ism; 4.3BSD returns both the IP and ICMP headers for such sockets. The patch for 4.2BSD is as follows: *** /usr/src/etc/timed/measure.c Wed May 28 23:10:26 1986 --- /usr/src/etc/timed/measure.c.42 Wed Oct 21 09:45:49 1987 *************** *** 47,53 **** u_char packet[PACKET_IN], opacket[64]; register struct icmp *icp = (struct icmp *) packet; register struct icmp *oicp = (struct icmp *) opacket; - struct ip *ip = (struct ip *) packet; min1 = min2 = 0x7fffffff; status = HOSTDOWN; --- 47,52 ---- *************** *** 113,119 **** (void)gettimeofday(&tv1, (struct timezone *)0); if (cc < 0) return(-1); - icp = (struct icmp *)(packet + (ip->ip_hl << 2)); if((icp->icmp_type == ICMP_TSTAMPREPLY) && icp->icmp_id == id && icp->icmp_seq == seqno) break; --- 112,117 ---- This patch is clearly necessary in this case, but it's unclear to me what else might need to be done to get the 4.3 timed up under SunOS 3.4. It does seem from other things I've looked at that 3.4 is capable of handling Timestamp Request and Timestamp Reply messages more-or-less properly, whatever that means. -Steve -- Spoken: Steve Miller Domain: steve@mimsy.umd.edu UUCP: uunet!mimsy!steve Phone: +1-301-454-1516 USPS: UMIACS, Univ. of Maryland, College Park, MD 20742