.Op Fl d
.Op Fl D
.Op Fl g Ar gateway_addr
+.Op Fl l
.Op Fl m Ar max_ttl
.Op Fl n
.Op Fl p Ar port
.Ar gateway_addr
to the list of addresses in the IP Loose Source Record Route (LSRR)
option. If no gateways are specified, the LSRR option is omitted.
+.It Fl l
+Display the ttl value of the returned packet. This is useful for
+checking for assymetric routing.
.It Fl m Ar max_ttl
Set the max time-to-live (max number of hops) used in outgoing probe
packets. The default is 30 hops (the same default used for
struct hostent *hp;
struct protoent *pe;
struct sockaddr_in from, to;
- int ch, i, lsrr, on, probe, seq, tos, ttl;
+ int ch, i, lsrr, on, probe, seq, tos, ttl, ttl_flag;
struct ip *ip;
if ((pe = getprotobyname("icmp")) == NULL) {
seteuid(getuid());
setuid(getuid());
+ ttl_flag = 0;
lsrr = 0;
on = 1;
seq = tos = 0;
- while ((ch = getopt(argc, argv, "dDg:m:np:q:rs:t:w:v")) != -1)
+ while ((ch = getopt(argc, argv, "dDg:m:np:q:rs:t:w:vl")) != -1)
switch (ch) {
case 'd':
options |= SO_DEBUG;
lsrrlen = 4;
lsrrlen += 4;
break;
+ case 'l':
+ ttl_flag++;
+ break;
case 'm':
max_ttl = atoi(optarg);
if (max_ttl < 1 || max_ttl > MAXTTL)
print(packet, cc, &from);
lastaddr = from.sin_addr.s_addr;
}
+ ip = (struct ip *)packet;
Printf(" %g ms", deltaT(&t1, &t2));
+ if (ttl_flag)
+ Printf(" (%d)", ip->ip_ttl);
switch(i - 1) {
case ICMP_UNREACH_PORT:
#ifndef ARCHAIC