#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.155 2006-02-19 05:00:19 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.159 2007-09-14 01:29:28 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
{ IPOPT_SSRR, "SSRR" },
{ IPOPT_LSRR, "LSRR" },
{ IPOPT_RA, "RA" },
+ { IPOPT_RFC1393, "traceroute" },
{ 0, NULL }
};
break;
case IPPROTO_PIM:
- pim_print(ipds->cp, ipds->len);
+ pim_print(ipds->cp, ipds->len,
+ in_cksum((const u_short*)ipds->cp, ipds->len, 0));
break;
case IPPROTO_VRRP:
}
if (ipds->ip->ip_ttl >= 1)
- (void)printf(", ttl %3u", ipds->ip->ip_ttl);
+ (void)printf(", ttl %u", ipds->ip->ip_ttl);
/*
* for the firewall guys, print id, offset.
* For unfragmented datagrams, note the don't fragment flag.
*/
- (void)printf(", id %u, offset %u, flags [%s], proto: %s (%u)",
+ (void)printf(", id %u, offset %u, flags [%s], proto %s (%u)",
EXTRACT_16BITS(&ipds->ip->ip_id),
(ipds->off & 0x1fff) * 8,
- bittok2str(ip_frag_values, "none", ipds->off&0xe000 ),
+ bittok2str(ip_frag_values, "none", ipds->off&0xe000),
tok2str(ipproto_values,"unknown",ipds->ip->ip_p),
ipds->ip->ip_p);
- (void)printf(", length: %u", EXTRACT_16BITS(&ipds->ip->ip_len));
+ (void)printf(", length %u", EXTRACT_16BITS(&ipds->ip->ip_len));
if ((hlen - sizeof(struct ip)) > 0) {
printf(", options (");
printf(")");
}
- if ((u_char *)ipds->ip + hlen <= snapend) {
+ if (!Kflag && (u_char *)ipds->ip + hlen <= snapend) {
sum = in_cksum((const u_short *)ipds->ip, hlen, 0);
if (sum != 0) {
ip_sum = EXTRACT_16BITS(&ipds->ip->ip_sum);
}
}
- printf(") ");
+ printf(")\n ");
}
/*