if (hlen + 12 <= cc && hip->ip_p == IPPROTO_UDP &&
if (hlen + 12 <= cc && hip->ip_p == proto &&
packet_ok(buf, cc, from, seq)	u_char *buf;	int cc;	struct sockaddr_in *from;	int seq;{	register struct icmp *icp;	u_char type, code;	int hlen;#ifndef ARCHAIC	struct ip *ip;	ip = (struct ip *) buf;	hlen = ip->ip_hl << 2;	if (cc < hlen + ICMP_MINLEN) {		if (verbose)			Printf("packet too short (%d bytes) from %s\n", cc,				inet_ntoa(from->sin_addr));		return (0);	}	cc -= hlen;	icp = (struct icmp *)(buf + hlen);#else	icp = (struct icmp *)buf;#endif ARCHAIC	type = icp->icmp_type; code = icp->icmp_code;	if ((type == ICMP_TIMXCEED && code == ICMP_TIMXCEED_INTRANS) ||	    type == ICMP_UNREACH) {		struct ip *hip;		struct udphdr *up;		hip = &icp->icmp_ip;		hlen = hip->ip_hl << 2;		up = (struct udphdr *)((u_char *)hip + hlen);		if (hlen + 12 <= cc && hip->ip_p == IPPROTO_UDP &&		    up->uh_sport == htons(ident) &&		    up->uh_dport == htons(port+seq))			return (type == ICMP_TIMXCEED? -1 : code+1);	}#ifndef ARCHAIC	if (verbose) {		int i;		u_long *lp = (u_long *)&icp->icmp_ip;		Printf("\n%d bytes from %s", cc, inet_ntoa(from->sin_addr));		Printf(" to %s", inet_ntoa(ip->ip_dst));		Printf(": icmp type %d (%s) code %d\n", type, pr_type(type),		       icp->icmp_code);		for (i = 4; i < cc ; i += sizeof(long))			Printf("%2d: x%8.8lx\n", i, *lp++);	}#endif ARCHAIC	return(0);}