-/* $OpenBSD: traceroute.c,v 1.97 2014/03/29 11:19:41 florian Exp $ */
+/* $OpenBSD: traceroute.c,v 1.98 2014/04/18 08:44:25 florian Exp $ */
/* $NetBSD: traceroute.c,v 1.10 1995/05/21 15:50:45 mycroft Exp $ */
/*-
if (ttl_flag)
printf(" (%u)", ip->ip_ttl);
if (i == -2) {
-#ifndef ARCHAIC
ip = (struct ip *)packet;
if (ip->ip_ttl <= 1)
printf(" !");
-#endif
++got_there;
break;
}
code = i - 1;
switch (code) {
case ICMP_UNREACH_PORT:
-#ifndef ARCHAIC
ip = (struct ip *)packet;
if (ip->ip_ttl <= 1)
printf(" !");
-#endif /* ARCHAIC */
++got_there;
break;
case ICMP_UNREACH_NET:
u_char code;
u_int8_t type;
int hlen;
-#ifndef ARCHAIC
struct ip *ip;
ip = (struct ip *) buf;
}
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) ||
return (type == ICMP_TIMXCEED? -1 : code + 1);
}
}
-#ifndef ARCHAIC
if (verbose) {
int i;
in_addr_t *lp = (in_addr_t *)&icp->icmp_ip;
for (i = 4; i < cc ; i += sizeof(in_addr_t))
printf("%2d: x%8.8lx\n", i, (unsigned long)*lp++);
}
-#endif /* ARCHAIC */
return (0);
}