/*
- * $Id: pinger.cc,v 1.18 1996/12/14 18:55:00 wessels Exp $
+ * $Id: pinger.cc,v 1.19 1997/01/24 22:18:39 wessels Exp $
*
* DEBUG: section 42 ICMP Pinger program
* AUTHOR: Duane Wessels
static int
ipHops(int ttl)
{
- if (ttl < 32)
- return 32 - ttl;
- if (ttl < 64)
- return 62 - ttl; /* 62 = (64+60)/2 */
- if (ttl < 128)
- return 128 - ttl;
- if (ttl < 192)
- return 192 - ttl;
- return 255 - ttl;
+ if (ttl < 33)
+ return 33 - ttl;
+ if (ttl < 63)
+ return 63 - ttl; /* 62 = (64+60)/2 */
+ if (ttl < 65)
+ return 65 - ttl; /* 62 = (64+60)/2 */
+ if (ttl < 129)
+ return 129 - ttl;
+ if (ttl < 193)
+ return 193 - ttl;
+ return 256 - ttl;
}
static int