#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.157 2007-01-17 17:55:01 hannes 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 }
};
case IPPROTO_IPV4:
/* DVMRP multicast tunnel (ip-in-ip encapsulation) */
- ip_print(gndo, ipds->cp, ipds->len);
+ ip_print(ndo, ipds->cp, ipds->len);
if (! vflag) {
ND_PRINT((ndo, " (ipip-proto-4)"));
return;
#ifdef INET6
case IPPROTO_IPV6:
/* ip6-in-ip encapsulation */
- ip6_print(ipds->cp, ipds->len);
+ ip6_print(ndo, ipds->cp, ipds->len);
break;
#endif /*INET6*/
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:
else if (!eflag)
printf("IP ");
- if ((u_char *)(ipds->ip + 1) > snapend) {
+ if ((u_char *)(ipds->ip + 1) > ndo->ndo_snapend) {
printf("[|ip]");
return;
}
* Cut off the snapshot length to the end of the IP payload.
*/
ipend = bp + ipds->len;
- if (ipend < snapend)
- snapend = ipend;
+ if (ipend < ndo->ndo_snapend)
+ ndo->ndo_snapend = ipend;
ipds->len -= hlen;
printf(")");
}
- if ((u_char *)ipds->ip + hlen <= snapend) {
+ if (!Kflag && (u_char *)ipds->ip + hlen <= ndo->ndo_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 ");
}
/*
return;
#ifdef INET6
case 6:
- ip6_print (bp, length);
+ ip6_print (gndo, bp, length);
return;
#endif
default: