#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.85 2000-10-07 05:53:14 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.89 2000-11-17 19:08:16 itojun Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#include <sys/param.h>
#include <sys/time.h>
-#include <sys/socket.h>
#include <netinet/in.h>
#endif
void
-udp_print(register const u_char *bp, u_int length, register const u_char *bp2)
+udp_print(register const u_char *bp, u_int length,
+ register const u_char *bp2, int fragmented)
{
register const struct udphdr *up;
register const struct ip *ip;
(atalk_port(sport) || atalk_port(dport))) {
if (vflag)
fputs("kip ", stdout);
- atalk_print(cp, length);
+ llap_print(cp, length);
return;
}
}
}
#endif
- if (IP_V(ip) == 4 && vflag) {
+ if (IP_V(ip) == 4 && vflag && !fragmented) {
int sum = up->uh_sum;
if (sum == 0) {
(void)printf(" [no cksum]");
}
}
#ifdef INET6
- if (IP_V(ip) == 6 && ip6->ip6_plen && vflag) {
+ if (IP_V(ip) == 6 && ip6->ip6_plen && vflag && !fragmented) {
int sum = up->uh_sum;
/* for IPv6, UDP checksum is mandatory */
if (TTEST2(cp[0], length)) {